зеркало из https://github.com/mozilla/gecko-dev.git
Bug 888552 - Use SET ps command to configure power save mode, r=vchang
This commit is contained in:
Родитель
1d6572690c
Коммит
ce066e521a
|
@ -507,10 +507,14 @@ var WifiManager = (function() {
|
|||
});
|
||||
}
|
||||
|
||||
function setPowerModeCommand(mode, callback) {
|
||||
function setPowerModeCommandICS(mode, callback) {
|
||||
doBooleanCommand("DRIVER POWERMODE " + (mode === "AUTO" ? 0 : 1), "OK", callback);
|
||||
}
|
||||
|
||||
function setPowerModeCommandJB(mode, callback) {
|
||||
doBooleanCommand("SET ps " + (mode === "AUTO" ? 1 : 0), "OK", callback);
|
||||
}
|
||||
|
||||
function getPowerModeCommand(callback) {
|
||||
doStringCommand("DRIVER GETPOWER", function(reply) {
|
||||
if (reply)
|
||||
|
@ -1508,7 +1512,9 @@ var WifiManager = (function() {
|
|||
manager.wpsPbc = wpsPbcCommand;
|
||||
manager.wpsPin = wpsPinCommand;
|
||||
manager.wpsCancel = wpsCancelCommand;
|
||||
manager.setPowerMode = setPowerModeCommand;
|
||||
manager.setPowerMode = (sdkVersion >= 16)
|
||||
? setPowerModeCommandJB
|
||||
: setPowerModeCommandICS;
|
||||
manager.setSuspendOptimizations = setSuspendOptimizationsCommand;
|
||||
manager.setStaticIpMode = setStaticIpMode;
|
||||
manager.getRssiApprox = getRssiApproxCommand;
|
||||
|
|
Загрузка…
Ссылка в новой задаче