在Android P的Auto版本中,多用户会根据Global.DEVICE_PROVISIONED的值选择一个导航栏的锁屏画面。
官网解释:
https://developer.android.com/reference/android/provider/Settings.Global#DEVICE_PROVISIONED
DEVICE_PROVISIONED
Added in API level 17
public static final String DEVICE_PROVISIONED
Whether the device has been provisioned (0 = false, 1 = true).
On a multiuser device with a separate system user, the screen may be locked as soon as this is set to true and further activities cannot be launched on the system user unless they are marked to show over keyguard.
Constant Value: “device_provisioned”
即:在具有单独系统用户的多用户设备上,一旦将此屏幕设置为true,屏幕就可能被锁定,并且除非将其标记为显示在键盘锁上,否则无法在系统用户上启动其他活动。
设置:
adb shell settings put global device_provisioned 1
或者:
adb shell settings put global device_provisioned 0
数据库存放位置:
/data/system/users/0/settings_global.xml
注意的事,每个用户user下面都会有一份数据保存。