Disable disable button according to user restrictions.

Bug: 16891777
Change-Id: I5223af905dc43d259c5fd3e03eedf8c71bf23ae9
This commit is contained in:
Julia Reynolds
2014-08-08 12:22:42 -04:00
parent 841f760fd7
commit d093c9f059

View File

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