summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorSvetoslav Ganov <svetoslavganov@google.com>2011-03-03 20:28:59 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-03-03 20:28:59 -0800
commit1e158e9ce78c25dc5de402f14654a8955de7fddc (patch)
tree5ac6b680d2f41a07821a9f2267672fc16e11b23c /core/java
parent327e94daff12ab4ac4da61a3ea802f3f225d1b3a (diff)
parent9aa597e68b3fb30b079d627e1fcdea766e98ad26 (diff)
downloadframeworks_base-1e158e9ce78c25dc5de402f14654a8955de7fddc.zip
frameworks_base-1e158e9ce78c25dc5de402f14654a8955de7fddc.tar.gz
frameworks_base-1e158e9ce78c25dc5de402f14654a8955de7fddc.tar.bz2
Merge "Propagating core settings to the system process." into honeycomb-mr1
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/app/ActivityThread.java26
1 files changed, 11 insertions, 15 deletions
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index b409f2f..bd83762 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -200,6 +200,8 @@ public final class ActivityThread {
static Handler sMainThreadHandler; // set once in main()
+ Bundle mCoreSettings = null;
+
private static final class ActivityClientRecord {
IBinder token;
int ident;
@@ -354,7 +356,6 @@ public final class ActivityThread {
boolean restrictedBackupMode;
Configuration config;
boolean handlingProfiling;
- Bundle coreSettings;
public String toString() {
return "AppBindData{appInfo=" + appInfo + "}";
}
@@ -559,6 +560,8 @@ public final class ActivityThread {
ServiceManager.initServiceCache(services);
}
+ setCoreSettings(coreSettings);
+
AppBindData data = new AppBindData();
data.processName = processName;
data.appInfo = appInfo;
@@ -570,7 +573,6 @@ public final class ActivityThread {
data.debugMode = debugMode;
data.restrictedBackupMode = isRestrictedBackupMode;
data.config = config;
- data.coreSettings = coreSettings;
queueOrSendMessage(H.BIND_APPLICATION, data);
}
@@ -898,8 +900,8 @@ public final class ActivityThread {
pw.println(String.format(format, objs));
}
- public void setCoreSettings(Bundle settings) {
- queueOrSendMessage(H.SET_CORE_SETTINGS, settings);
+ public void setCoreSettings(Bundle coreSettings) {
+ queueOrSendMessage(H.SET_CORE_SETTINGS, coreSettings);
}
}
@@ -2720,10 +2722,8 @@ public final class ActivityThread {
}
private void handleSetCoreSettings(Bundle coreSettings) {
- if (mBoundApplication != null) {
- synchronized (mBoundApplication) {
- mBoundApplication.coreSettings = coreSettings;
- }
+ synchronized (mPackages) {
+ mCoreSettings = coreSettings;
}
}
@@ -3990,13 +3990,9 @@ public final class ActivityThread {
}
public int getIntCoreSetting(String key, int defaultValue) {
- if (mBoundApplication == null) {
- return defaultValue;
- }
- synchronized (mBoundApplication) {
- Bundle coreSettings = mBoundApplication.coreSettings;
- if (coreSettings != null) {
- return coreSettings.getInt(key, defaultValue);
+ synchronized (mPackages) {
+ if (mCoreSettings != null) {
+ return mCoreSettings.getInt(key, defaultValue);
} else {
return defaultValue;
}