2015-11-04 32 views
0

從我從Doze Editor app的源代碼中學到的東西,可以使用adb改變打盹設置。使用adb改變打盹模式設置

我的問題,我一次只能更改一個設置嗎?

例如:

adb shell settings put global device_idle_constants KEY_INACTIVE_TIMEOUT=720000 

或者我應該把所有用逗號分隔的值對?

例如:

adb shell settings put global device_idle_constants KEY_INACTIVE_TIMEOUT=720000, KEY_SENSING_TIMEOUT=xxxx, KEY_LOCATING_TIMEOUT=yyyy ... and so on 

回答

1

在同一時間,我可以改變一個設置?

是的,您不能一次更改多個設置。

命令adb shell settings僅支持一個鍵/值的時間,你可以在命令的幫助,請參閱:

adb shell settings 
usage: settings [--user NUM] get namespace key 
     settings [--user NUM] put namespace key value 
     settings [--user NUM] delete namespace key 

'namespace' is one of {system, secure, global}, case-insensitive 
If '--user NUM' is not given, the operations are performed on the owner user. 
0

根據Android的SDK正式評論,你需要把所有的值對例如: 「inactive_timeout = 60000,sensing_timeout = 400000」