зеркало из https://github.com/mozilla/gecko-dev.git
Bug 950124 - Use different powersave command based on sdk version. r=vchang
This commit is contained in:
Родитель
335bcadaa9
Коммит
2b45cc4e49
|
@ -310,11 +310,16 @@ this.WifiCommand = function(aControlMessage, aInterface) {
|
|||
doBooleanCommand("BLACKLIST clear", "OK", callback);
|
||||
};
|
||||
|
||||
command.setSuspendOptimizations = function (enabled, callback) {
|
||||
command.setSuspendOptimizationsICS = function (enabled, callback) {
|
||||
doBooleanCommand("DRIVER SETSUSPENDOPT " + (enabled ? 0 : 1),
|
||||
"OK", callback);
|
||||
};
|
||||
|
||||
command.setSuspendOptimizationsJB = function (enabled, callback) {
|
||||
doBooleanCommand("DRIVER SETSUSPENDMODE " + (enabled ? 1 : 0),
|
||||
"OK", callback);
|
||||
};
|
||||
|
||||
command.connectToSupplicant = function(callback) {
|
||||
voidControlMessage("connect_to_supplicant", callback);
|
||||
};
|
||||
|
|
|
@ -1156,7 +1156,9 @@ var WifiManager = (function() {
|
|||
manager.getHttpProxyNetwork = getHttpProxyNetwork;
|
||||
manager.setHttpProxy = setHttpProxy;
|
||||
manager.configureHttpProxy = configureHttpProxy;
|
||||
manager.setSuspendOptimizations = wifiCommand.setSuspendOptimizations;
|
||||
manager.setSuspendOptimizations = (sdkVersion >= 16)
|
||||
? wifiCommand.setSuspendOptimizationsJB
|
||||
: wifiCommand.setSuspendOptimizationsICS;
|
||||
manager.setStaticIpMode = setStaticIpMode;
|
||||
manager.getRssiApprox = wifiCommand.getRssiApprox;
|
||||
manager.getLinkSpeed = wifiCommand.getLinkSpeed;
|
||||
|
|
Загрузка…
Ссылка в новой задаче