Re-enable user disabling of apps.
Change-Id: I5f3a474926cf2b93e311435f67f36837f5f56caa
This commit is contained in:
@@ -392,6 +392,14 @@ public class ApplicationsState {
|
|||||||
|
|
||||||
for (int i=0; i<mApplications.size(); i++) {
|
for (int i=0; i<mApplications.size(); i++) {
|
||||||
final ApplicationInfo info = mApplications.get(i);
|
final ApplicationInfo info = mApplications.get(i);
|
||||||
|
// Need to trim out any applications that are disabled by
|
||||||
|
// something different than the user.
|
||||||
|
if (!info.enabled && info.enabledSetting
|
||||||
|
!= PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER) {
|
||||||
|
mApplications.remove(i);
|
||||||
|
i--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
final AppEntry entry = mEntriesMap.get(info.packageName);
|
final AppEntry entry = mEntriesMap.get(info.packageName);
|
||||||
if (entry != null) {
|
if (entry != null) {
|
||||||
entry.info = info;
|
entry.info = info;
|
||||||
|
@@ -79,7 +79,7 @@ public class InstalledAppDetails extends Fragment
|
|||||||
implements View.OnClickListener, CompoundButton.OnCheckedChangeListener,
|
implements View.OnClickListener, CompoundButton.OnCheckedChangeListener,
|
||||||
ApplicationsState.Callbacks {
|
ApplicationsState.Callbacks {
|
||||||
private static final String TAG="InstalledAppDetails";
|
private static final String TAG="InstalledAppDetails";
|
||||||
static final boolean SUPPORT_DISABLE_APPS = false;
|
static final boolean SUPPORT_DISABLE_APPS = true;
|
||||||
private static final boolean localLOGV = false;
|
private static final boolean localLOGV = false;
|
||||||
|
|
||||||
public static final String ARG_PACKAGE_NAME = "package";
|
public static final String ARG_PACKAGE_NAME = "package";
|
||||||
@@ -829,7 +829,7 @@ public class InstalledAppDetails extends Fragment
|
|||||||
} else {
|
} else {
|
||||||
if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
|
if ((mAppEntry.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
|
||||||
new DisableChanger(this, mAppEntry.info, mAppEntry.info.enabled ?
|
new DisableChanger(this, mAppEntry.info, mAppEntry.info.enabled ?
|
||||||
PackageManager.COMPONENT_ENABLED_STATE_DISABLED
|
PackageManager.COMPONENT_ENABLED_STATE_DISABLED_USER
|
||||||
: PackageManager.COMPONENT_ENABLED_STATE_DEFAULT).execute((Object)null);
|
: PackageManager.COMPONENT_ENABLED_STATE_DEFAULT).execute((Object)null);
|
||||||
} else {
|
} else {
|
||||||
uninstallPkg(packageName);
|
uninstallPkg(packageName);
|
||||||
|
Reference in New Issue
Block a user