Fix settings crash when interact uninstalled app
Set the AdvancedAppInfoPreferenceController preference to disabled when the app is uninstalled for the current user. This results in every preference under the advanced section to be greyed out, avoiding the null pointer exception. Bug: 238839849 Test: Unit tests && Manual test on multiple apps Change-Id: I5cdf47575da96f53915f5b552213bf0176f9d1d7
This commit is contained in:
8
src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
Executable file → Normal file
8
src/com/android/settings/applications/appinfo/AppInfoDashboardFragment.java
Executable file → Normal file
@@ -218,9 +218,11 @@ public class AppInfoDashboardFragment extends DashboardFragment
|
||||
alarmsAndReminders.setPackageName(packageName);
|
||||
alarmsAndReminders.setParentFragment(this);
|
||||
|
||||
use(AdvancedAppInfoPreferenceCategoryController.class).setChildren(Arrays.asList(
|
||||
writeSystemSettings, drawOverlay, pip, externalSource, acrossProfiles,
|
||||
alarmsAndReminders));
|
||||
final AdvancedAppInfoPreferenceCategoryController advancedAppInfo =
|
||||
use(AdvancedAppInfoPreferenceCategoryController.class);
|
||||
advancedAppInfo.setChildren(Arrays.asList(writeSystemSettings, drawOverlay, pip,
|
||||
externalSource, acrossProfiles, alarmsAndReminders));
|
||||
advancedAppInfo.setAppEntry(mAppEntry);
|
||||
|
||||
final AppLocalePreferenceController appLocale =
|
||||
use(AppLocalePreferenceController.class);
|
||||
|
Reference in New Issue
Block a user