Bug 786020 - B2G RIL: get rid of NETWORK_STATE_SUSPENDED. r=marshall_law

This commit is contained in:
Philipp von Weitershausen 2012-08-28 11:37:43 -03:00
Родитель 7cc4ff3d65
Коммит e01c1ae289
5 изменённых файлов: 6 добавлений и 18 удалений

Просмотреть файл

@ -1724,7 +1724,6 @@ let RILNetworkInterface = {
NETWORK_STATE_UNKNOWN: Ci.nsINetworkInterface.NETWORK_STATE_UNKNOWN,
NETWORK_STATE_CONNECTING: Ci.nsINetworkInterface.CONNECTING,
NETWORK_STATE_CONNECTED: Ci.nsINetworkInterface.CONNECTED,
NETWORK_STATE_SUSPENDED: Ci.nsINetworkInterface.SUSPENDED,
NETWORK_STATE_DISCONNECTING: Ci.nsINetworkInterface.DISCONNECTING,
NETWORK_STATE_DISCONNECTED: Ci.nsINetworkInterface.DISCONNECTED,
@ -1829,9 +1828,7 @@ let RILNetworkInterface = {
},
connect: function connect(options) {
if (this.connecting ||
this.state == RIL.GECKO_NETWORK_STATE_CONNECTED ||
this.state == RIL.GECKO_NETWORK_STATE_SUSPENDED) {
if (this.connecting || this.connected) {
return;
}

Просмотреть файл

@ -7,15 +7,14 @@
/**
* Information about networks that is exposed to network manager API consumers.
*/
[scriptable, uuid(49cc227c-3fe7-40a2-bdb5-55e9af797fde)]
[scriptable, uuid(463ed2f3-1739-41bc-a967-1e816764f915)]
interface nsINetworkInterface : nsISupports
{
const long NETWORK_STATE_UNKNOWN = -1;
const long NETWORK_STATE_CONNECTING = 0;
const long NETWORK_STATE_CONNECTED = 1;
const long NETWORK_STATE_SUSPENDED = 2;
const long NETWORK_STATE_DISCONNECTING = 3;
const long NETWORK_STATE_DISCONNECTED = 4;
const long NETWORK_STATE_DISCONNECTING = 2;
const long NETWORK_STATE_DISCONNECTED = 3;
/**
* Current network state, one of the NETWORK_STATE_* constants.

Просмотреть файл

@ -1416,9 +1416,8 @@ const DATACALL_FAIL_ERROR_UNSPECIFIED = 0xffff;
const GECKO_NETWORK_STATE_UNKNOWN = -1;
const GECKO_NETWORK_STATE_CONNECTING = 0;
const GECKO_NETWORK_STATE_CONNECTED = 1;
const GECKO_NETWORK_STATE_SUSPENDED = 2;
const GECKO_NETWORK_STATE_DISCONNECTING = 3;
const GECKO_NETWORK_STATE_DISCONNECTED = 4;
const GECKO_NETWORK_STATE_DISCONNECTING = 2;
const GECKO_NETWORK_STATE_DISCONNECTED = 3;
// Used for QUERY_AVAILABLE_NETWORKS status of "unknown"
const GECKO_QAN_STATE_UNKNOWN = null;

Просмотреть файл

@ -54,7 +54,6 @@ const PDU_HEX_OCTET_SIZE = 4;
const DEFAULT_EMERGENCY_NUMBERS = ["112", "911"];
let RILQUIRKS_CALLSTATE_EXTRA_UINT32 = libcutils.property_get("ro.moz.ril.callstate_extra_int");
let RILQUIRKS_DATACALLSTATE_DOWN_IS_UP = libcutils.property_get("ro.moz.ril.callstate_down_is_up");
// This may change at runtime since in RIL v6 and later, we get the version
// number via the UNSOLICITED_RIL_CONNECTED parcel.
let RILQUIRKS_V5_LEGACY = libcutils.property_get("ro.moz.ril.v5_legacy");
@ -2495,11 +2494,6 @@ let RIL = {
datacall.state = GECKO_NETWORK_STATE_DISCONNECTED;
break;
case DATACALL_ACTIVE_DOWN:
datacall.state = GECKO_NETWORK_STATE_SUSPENDED;
if (RILQUIRKS_DATACALLSTATE_DOWN_IS_UP) {
datacall.state = GECKO_NETWORK_STATE_CONNECTED;
}
break;
case DATACALL_ACTIVE_UP:
datacall.state = GECKO_NETWORK_STATE_CONNECTED;
break;

Просмотреть файл

@ -1283,7 +1283,6 @@ let WifiNetworkInterface = {
NETWORK_STATE_UNKNOWN: Ci.nsINetworkInterface.NETWORK_STATE_UNKNOWN,
NETWORK_STATE_CONNECTING: Ci.nsINetworkInterface.CONNECTING,
NETWORK_STATE_CONNECTED: Ci.nsINetworkInterface.CONNECTED,
NETWORK_STATE_SUSPENDED: Ci.nsINetworkInterface.SUSPENDED,
NETWORK_STATE_DISCONNECTING: Ci.nsINetworkInterface.DISCONNECTING,
NETWORK_STATE_DISCONNECTED: Ci.nsINetworkInterface.DISCONNECTED,