Adapt to behavior change in MATCH_UNINSTALLED_PACKAGES
Don't use the PM flag to reach across users. If retrieving labels, etc., use MATCH_ANY_USER, since several Settings screens show work profile apps as well. Bug: 31000380 Test: Manual test of affected screens Change-Id: Ib6f981ae8443f640276d395c37247c8c0b610894
This commit is contained in:
@@ -502,7 +502,7 @@ public class NotificationStation extends SettingsPreferenceFragment {
|
||||
private CharSequence loadPackageName(String pkg) {
|
||||
try {
|
||||
ApplicationInfo info = mPm.getApplicationInfo(pkg,
|
||||
PackageManager.GET_UNINSTALLED_PACKAGES);
|
||||
PackageManager.MATCH_ANY_USER);
|
||||
if (info != null) return mPm.getApplicationLabel(info);
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
Log.e(TAG, "Cannot load package name", e);
|
||||
|
Reference in New Issue
Block a user