Always returning the updated preference summary
AppEntry is not being updated when opening nested app info activities, which led to stale preference summary being returned for external sources details. Test: Manually checked the preference summary is correctly reflecting the state of the switch. Existing test ExternalSourcesSettingsTest passes. Bug: 37487637 Change-Id: Id3c665c7cc7231023f4110725b3b15e43284de97
This commit is contained in:
@@ -89,13 +89,9 @@ public class ExternalSourcesDetails extends AppInfoWithHeader
|
||||
return context.getString(R.string.disabled);
|
||||
}
|
||||
|
||||
final InstallAppsState appsState;
|
||||
if (entry.extraInfo instanceof InstallAppsState) {
|
||||
appsState = (InstallAppsState) entry.extraInfo;
|
||||
} else {
|
||||
appsState = new AppStateInstallAppsBridge(context, null, null)
|
||||
final InstallAppsState appsState = new AppStateInstallAppsBridge(context, null, null)
|
||||
.createInstallAppsStateFor(entry.info.packageName, entry.info.uid);
|
||||
}
|
||||
|
||||
return context.getString(appsState.canInstallApps()
|
||||
? R.string.app_permission_summary_allowed
|
||||
: R.string.app_permission_summary_not_allowed);
|
||||
|
Reference in New Issue
Block a user