Fix opening the Settings page from the launcher.

Bug: 309107861
Test: Tested the bugfix manually
Change-Id: I40e05d0b6fc22a432895490bc51531a0eb3190ac
This commit is contained in:
Jakob Schneider
2023-11-30 20:23:14 +00:00
parent 8962b00ac4
commit b423e6b5b5
2 changed files with 14 additions and 8 deletions

View File

@@ -144,10 +144,14 @@ public abstract class AppInfoBase extends SettingsPreferenceFragment
if (mAppEntry != null) {
// Get application info again to refresh changed properties of application
try {
mPackageInfo = mPm.getPackageInfoAsUser(mAppEntry.info.packageName,
PackageManager.MATCH_DISABLED_COMPONENTS |
PackageManager.GET_SIGNING_CERTIFICATES |
PackageManager.GET_PERMISSIONS, mUserId);
mPackageInfo = mPm.getPackageInfoAsUser(
mAppEntry.info.packageName,
PackageManager.PackageInfoFlags.of(
PackageManager.MATCH_DISABLED_COMPONENTS
| PackageManager.GET_SIGNING_CERTIFICATES
| PackageManager.GET_PERMISSIONS
| PackageManager.MATCH_ARCHIVED_PACKAGES),
mUserId);
} catch (NameNotFoundException e) {
Log.e(TAG, "Exception when retrieving package:" + mAppEntry.info.packageName, e);
}