Merge "Disable disable button according to user restrictions." into lmp-dev

This commit is contained in:
Julia Reynolds
2014-08-15 20:17:27 +00:00
committed by Android (Google) Code Review

View File

@@ -350,12 +350,15 @@ public class InstalledAppDetails extends Fragment
boolean enabled = true; boolean enabled = true;
if (mUpdatedSysApp) { if (mUpdatedSysApp) {
mUninstallButton.setText(R.string.app_factory_reset); mUninstallButton.setText(R.string.app_factory_reset);
boolean specialDisable = false; boolean showSpecialDisable = false;
if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
specialDisable = handleDisableable(mSpecialDisableButton); showSpecialDisable = handleDisableable(mSpecialDisableButton);
mSpecialDisableButton.setOnClickListener(this); mSpecialDisableButton.setOnClickListener(this);
} }
mMoreControlButtons.setVisibility(specialDisable ? View.VISIBLE : View.GONE); if (mAppControlRestricted) {
showSpecialDisable = false;
}
mMoreControlButtons.setVisibility(showSpecialDisable ? View.VISIBLE : View.GONE);
} else { } else {
mMoreControlButtons.setVisibility(View.GONE); mMoreControlButtons.setVisibility(View.GONE);
if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {