summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/android/content/pm/IPackageManager.aidl3
-rw-r--r--core/java/android/provider/Settings.java30
-rwxr-xr-xcore/tests/coretests/src/android/content/pm/PackageManagerTests.java14
3 files changed, 25 insertions, 22 deletions
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index f90ef63..9939478 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -316,4 +316,7 @@ interface IPackageManager {
void movePackage(String packageName, IPackageMoveObserver observer, int flags);
boolean addPermissionAsync(in PermissionInfo info);
+
+ boolean setInstallLocation(int loc);
+ int getInstallLocation();
}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index b8e5747..c07ac31 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1611,21 +1611,6 @@ public final class Settings {
public static final String NOTIFICATION_LIGHT_PULSE = "notification_light_pulse";
/**
- * Let user pick default install location.
- * @hide
- */
- public static final String SET_INSTALL_LOCATION = "set_install_location";
-
- /**
- * Default install location value.
- * 0 = auto, let system decide
- * 1 = internal
- * 2 = sdcard
- * @hide
- */
- public static final String DEFAULT_INSTALL_LOCATION = "default_install_location";
-
- /**
* Show pointer location on screen?
* 0 = no
* 1 = yes
@@ -3295,6 +3280,21 @@ public final class Settings {
* @hide
*/
public static final String UI_NIGHT_MODE = "ui_night_mode";
+
+ /**
+ * Let user pick default install location.
+ * @hide
+ */
+ public static final String SET_INSTALL_LOCATION = "set_install_location";
+
+ /**
+ * Default install location value.
+ * 0 = auto, let system decide
+ * 1 = internal
+ * 2 = sdcard
+ * @hide
+ */
+ public static final String DEFAULT_INSTALL_LOCATION = "default_install_location";
/**
* @hide
diff --git a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
index 152f02e..7fa64ca 100755
--- a/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
+++ b/core/tests/coretests/src/android/content/pm/PackageManagerTests.java
@@ -328,14 +328,14 @@ public class PackageManagerTests extends AndroidTestCase {
boolean checkSd = false;
int setLoc = 0;
try {
- setLoc = Settings.System.getInt(mContext.getContentResolver(), Settings.System.SET_INSTALL_LOCATION);
+ setLoc = Settings.System.getInt(mContext.getContentResolver(), Settings.Secure.SET_INSTALL_LOCATION);
} catch (SettingNotFoundException e) {
failStr(e);
}
if (setLoc == 1) {
int userPref = APP_INSTALL_AUTO;
try {
- userPref = Settings.System.getInt(mContext.getContentResolver(), Settings.System.DEFAULT_INSTALL_LOCATION);
+ userPref = Settings.System.getInt(mContext.getContentResolver(), Settings.Secure.DEFAULT_INSTALL_LOCATION);
} catch (SettingNotFoundException e) {
failStr(e);
}
@@ -1302,8 +1302,8 @@ public class PackageManagerTests extends AndroidTestCase {
boolean userSetting = false;
int origDefaultLoc = PackageInfo.INSTALL_LOCATION_AUTO;
try {
- userSetting = Settings.System.getInt(mContext.getContentResolver(), Settings.System.SET_INSTALL_LOCATION) != 0;
- origDefaultLoc = Settings.System.getInt(mContext.getContentResolver(), Settings.System.DEFAULT_INSTALL_LOCATION);
+ userSetting = Settings.System.getInt(mContext.getContentResolver(), Settings.Secure.SET_INSTALL_LOCATION) != 0;
+ origDefaultLoc = Settings.System.getInt(mContext.getContentResolver(), Settings.Secure.DEFAULT_INSTALL_LOCATION);
} catch (SettingNotFoundException e1) {
}
return origDefaultLoc;
@@ -1311,7 +1311,7 @@ public class PackageManagerTests extends AndroidTestCase {
private void setInstallLoc(int loc) {
Settings.System.putInt(mContext.getContentResolver(),
- Settings.System.DEFAULT_INSTALL_LOCATION, loc);
+ Settings.Secure.DEFAULT_INSTALL_LOCATION, loc);
}
/*
* Tests for moving apps between internal and external storage
@@ -1963,7 +1963,7 @@ public class PackageManagerTests extends AndroidTestCase {
*/
private boolean getUserSettingSetInstallLocation() {
try {
- return Settings.System.getInt(mContext.getContentResolver(), Settings.System.SET_INSTALL_LOCATION) != 0;
+ return Settings.System.getInt(mContext.getContentResolver(), Settings.Secure.SET_INSTALL_LOCATION) != 0;
} catch (SettingNotFoundException e1) {
}
@@ -1972,7 +1972,7 @@ public class PackageManagerTests extends AndroidTestCase {
private void setUserSettingSetInstallLocation(boolean value) {
Settings.System.putInt(mContext.getContentResolver(),
- Settings.System.SET_INSTALL_LOCATION, value ? 1 : 0);
+ Settings.Secure.SET_INSTALL_LOCATION, value ? 1 : 0);
}
private void setUserX(boolean enable, int userSetting, int iloc) {
boolean origUserSetting = getUserSettingSetInstallLocation();