Fixed PackageManager.readLPw() call.
It wasn't including pre-created users; as such, apps that were not installed on pre-created users got installed on reboot. To test it: adb shell pm create-user --pre-create-only m ApiDemos adb install --user current ~/Downloads/apk/ApiDemos.apk adb shell dumpsys package com.example.android.apis |egrep ".*User .*:"|grep installed adb shell stop && adb shell start adb shell dumpsys package com.example.android.apis |egrep ".*User .*:"|grep installed Without this fix, the second dumpsys would show the app installed for the pre-created user. Test: manual test (see above) Test: atest CtsMultiUserHostTestCases:android.host.multiuser.PreCreateUsersTest Bug: 160252062 Change-Id: I46c2ec94a3ab422e3e39b66239c21fb6cbff5a8e
Loading
Please register or sign in to comment