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: see above Test: atest CtsMultiUserHostTestCases:android.host.multiuser.PreCreateUsersTest # will be added later on AOSP branch Bug: 160252062 Change-Id: I46c2ec94a3ab422e3e39b66239c21fb6cbff5a8e Merged-In: I46c2ec94a3ab422e3e39b66239c21fb6cbff5a8e (cherry picked from commit 2c43b50331eaf428df3e7cb1886fd7d60f41ad54)
Loading
Please register or sign in to comment