From 826d17c0690e086ed96f43714d731ec6e0ddcf96 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Thu, 12 Nov 2009 12:55:51 -0800 Subject: [PATCH] A little more on #2256270: Package manager sends bad broadcasts when components change Don't go through all this work if the enabled state hasn't changed. Change-Id: If7393f53d6c0d0770960bb37bcaa5adebdbb3099 --- .../com/android/server/am/ActivityManagerService.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index e7280919d6a33..aa79ab4fc6420 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -12816,6 +12816,11 @@ public final class ActivityManagerService extends ActivityManagerNative implemen mConfiguration = newConfig; Log.i(TAG, "Config changed: " + newConfig); + + AttributeCache ac = AttributeCache.instance(); + if (ac != null) { + ac.updateConfiguration(mConfiguration); + } Message msg = mHandler.obtainMessage(UPDATE_CONFIGURATION_MSG); msg.obj = new Configuration(mConfiguration); @@ -12843,11 +12848,6 @@ public final class ActivityManagerService extends ActivityManagerNative implemen null, null, 0, null, null, null, false, false, MY_PID, Process.SYSTEM_UID); } - - AttributeCache ac = AttributeCache.instance(); - if (ac != null) { - ac.updateConfiguration(mConfiguration); - } } }