summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSuchi Amalapurapu <asuchitra@google.com>2010-03-10 14:19:21 -0800
committerSuchi Amalapurapu <asuchitra@google.com>2010-03-10 16:08:51 -0800
commit089262dc022d87e31eefc536025be6c015c7ebde (patch)
tree2c4706dc952c2c3a4407427579a01057564fab52 /packages
parente182a92ae408f27f46d15de01c8a263cfe6f9246 (diff)
downloadframeworks_base-089262dc022d87e31eefc536025be6c015c7ebde.zip
frameworks_base-089262dc022d87e31eefc536025be6c015c7ebde.tar.gz
frameworks_base-089262dc022d87e31eefc536025be6c015c7ebde.tar.bz2
Dont include code size for apps on sdcard.
Use constants defined in PackageHelper for user preferences to install auto, internal, external. Set default install location to external. Update settings db version number Change-Id: Ib5110c9377990e20a48cee923e55898dfddfd1e6
Diffstat (limited to 'packages')
-rw-r--r--packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java6
-rw-r--r--packages/SettingsProvider/res/values/defaults.xml4
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java28
3 files changed, 30 insertions, 8 deletions
diff --git a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
index 4635f48..7714911 100644
--- a/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
+++ b/packages/DefaultContainerService/src/com/android/defcontainer/DefaultContainerService.java
@@ -349,11 +349,11 @@ public class DefaultContainerService extends IntentService {
int installPreference = Settings.System.getInt(getApplicationContext()
.getContentResolver(),
Settings.System.DEFAULT_INSTALL_LOCATION,
- PackageInfo.INSTALL_LOCATION_AUTO);
- if (installPreference == 1) {
+ PackageHelper.APP_INSTALL_AUTO);
+ if (installPreference == PackageHelper.APP_INSTALL_INTERNAL) {
installOnlyInternal = true;
auto = false;
- } else if (installPreference == 2) {
+ } else if (installPreference == PackageHelper.APP_INSTALL_EXTERNAL) {
installOnlyOnSd = true;
auto = false;
}
diff --git a/packages/SettingsProvider/res/values/defaults.xml b/packages/SettingsProvider/res/values/defaults.xml
index 64bb0ef..34302c4 100644
--- a/packages/SettingsProvider/res/values/defaults.xml
+++ b/packages/SettingsProvider/res/values/defaults.xml
@@ -56,7 +56,10 @@
<bool name="def_mount_ums_autostart">false</bool>
<bool name="def_mount_ums_prompt">true</bool>
<bool name="def_mount_ums_notify_enabled">true</bool>
+ <!-- Enable User preference for setting install location -->
<bool name="set_install_location">true</bool>
+ <!-- Default install location if user preference for setting install location is turned on. -->
+ <integer name="def_install_location">2</integer>
<!-- user interface sound effects -->
<integer name="def_power_sounds_enabled">1</integer>
@@ -72,5 +75,4 @@
<!-- Default for Settings.System.VIBRATE_IN_SILENT -->
<bool name="def_vibrate_in_silent">true</bool>
-
</resources>
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index edf3923..ba66dc5 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -61,7 +61,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
// database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
// is properly propagated through your change. Not doing so will result in a loss of user
// settings.
- private static final int DATABASE_VERSION = 53;
+ private static final int DATABASE_VERSION = 54;
private Context mContext;
@@ -650,6 +650,25 @@ public class DatabaseHelper extends SQLiteOpenHelper {
upgradeVersion = 53;
}
+
+ if (upgradeVersion == 53) {
+ /*
+ * New settings for set install location UI.
+ */
+ db.beginTransaction();
+ try {
+ SQLiteStatement stmt = db.compileStatement("INSERT INTO system(name,value)"
+ + " VALUES(?,?);");
+ loadIntegerSetting(stmt, Settings.System.DEFAULT_INSTALL_LOCATION,
+ R.integer.def_install_location);
+ stmt.close();
+ db.setTransactionSuccessful();
+ } finally {
+ db.endTransaction();
+ }
+
+ upgradeVersion = 54;
+ }
// *** Remember to update DATABASE_VERSION above!
@@ -943,9 +962,10 @@ public class DatabaseHelper extends SQLiteOpenHelper {
loadBooleanSetting(stmt, Settings.System.NOTIFICATION_LIGHT_PULSE,
R.bool.def_notification_pulse);
- loadBooleanSetting(stmt, Settings.System.SET_INSTALL_LOCATION, R.bool.set_install_location);
- loadSetting(stmt, Settings.System.DEFAULT_INSTALL_LOCATION,
- PackageInfo.INSTALL_LOCATION_INTERNAL_ONLY);
+ loadBooleanSetting(stmt, Settings.System.SET_INSTALL_LOCATION,
+ R.bool.set_install_location);
+ loadIntegerSetting(stmt, Settings.System.DEFAULT_INSTALL_LOCATION,
+ R.integer.def_install_location);
loadUISoundEffectsSettings(stmt);