Implement remaining infrastructure for user disabling apps.
Change-Id: If8135eb0e27ec36f8f159eb7b6397add7acd0299
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index c0a1d8e..454cb31 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -417,6 +417,12 @@
public boolean enabled = true;
/**
+ * For convenient access to the current enabled setting of this app.
+ * @hide
+ */
+ public int enabledSetting = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
+
+ /**
* For convenient access to package's install location.
* @hide
*/
@@ -508,6 +514,7 @@
uid = orig.uid;
targetSdkVersion = orig.targetSdkVersion;
enabled = orig.enabled;
+ enabledSetting = orig.enabledSetting;
installLocation = orig.installLocation;
manageSpaceActivityName = orig.manageSpaceActivityName;
descriptionRes = orig.descriptionRes;
@@ -544,6 +551,7 @@
dest.writeInt(uid);
dest.writeInt(targetSdkVersion);
dest.writeInt(enabled ? 1 : 0);
+ dest.writeInt(enabledSetting);
dest.writeInt(installLocation);
dest.writeString(manageSpaceActivityName);
dest.writeString(backupAgentName);
@@ -581,6 +589,7 @@
uid = source.readInt();
targetSdkVersion = source.readInt();
enabled = source.readInt() != 0;
+ enabledSetting = source.readInt();
installLocation = source.readInt();
manageSpaceActivityName = source.readString();
backupAgentName = source.readString();