diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index ae0fba85a56..ff68cc7d85c 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -354,4 +354,18 @@
- 3
+
+
+ - Internal device storage
+ - Removable SD card
+ - Let the system decide
+
+
+
+
+ - device
+ - sdcard
+ - auto
+
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index ce45ec521c2..bc19df5f1fa 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1633,6 +1633,10 @@ found in the list of installed applications.
Force Stop
This application will be restarted right way. Are you sure you want to force stop?
+
+ Preferred install location
+
+ Change the preferred installation location for new applications.
Running services
diff --git a/res/xml/application_settings.xml b/res/xml/application_settings.xml
index b5418e810de..4df21da43ba 100644
--- a/res/xml/application_settings.xml
+++ b/res/xml/application_settings.xml
@@ -25,7 +25,15 @@
android:summaryOff="@string/install_unknown_applications"
android:summaryOn="@string/install_unknown_applications"
android:persistent="false" />
-
+
+
+
0;
}
+ private String getAppInstallLocation() {
+ int selectedLocation = Settings.System.getInt(getContentResolver(),
+ Settings.System.DEFAULT_INSTALL_LOCATION, APP_INSTALL_AUTO);
+ if (selectedLocation == APP_INSTALL_DEVICE) {
+ return APP_INSTALL_DEVICE_ID;
+ } else if (selectedLocation == APP_INSTALL_SDCARD) {
+ return APP_INSTALL_SDCARD_ID;
+ } else if (selectedLocation == APP_INSTALL_AUTO) {
+ return APP_INSTALL_AUTO_ID;
+ } else {
+ // Default value, should not happen.
+ return APP_INSTALL_AUTO_ID;
+ }
+ }
+
private void warnAppInstallation() {
mWarnInstallApps = new AlertDialog.Builder(this)
.setTitle(getString(R.string.error_title))
@@ -101,6 +165,4 @@ public class ApplicationSettings extends PreferenceActivity implements
.setNegativeButton(android.R.string.no, null)
.show();
}
-
-
}