Merge "Always returning the updated preference summary"

This commit is contained in:
Suprabh Shukla
2017-06-02 18:51:09 +00:00
committed by Android (Google) Code Review

View File

@@ -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);