diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-04-14 12:04:07 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-04-14 12:04:07 -0700 |
commit | 11d7502b35374da12168004e277bcc87f4f7bb50 (patch) | |
tree | 40ad090fb33f57f3bf7c8d3abc763ddaaf105696 /services | |
parent | 6852b198fbedd9378ed79ca6528a4d6f33b0b677 (diff) | |
parent | 8656145e2abe881caffa4181ee5c2e4e3dba1cee (diff) | |
download | frameworks_base-11d7502b35374da12168004e277bcc87f4f7bb50.zip frameworks_base-11d7502b35374da12168004e277bcc87f4f7bb50.tar.gz frameworks_base-11d7502b35374da12168004e277bcc87f4f7bb50.tar.bz2 |
am 8656145e: Merge "Fix issue #593153: Broadcast time out when sending..." into froyo
Merge commit '8656145e2abe881caffa4181ee5c2e4e3dba1cee' into froyo-plus-aosp
* commit '8656145e2abe881caffa4181ee5c2e4e3dba1cee':
Fix issue #593153: Broadcast time out when sending...
Diffstat (limited to 'services')
3 files changed, 16 insertions, 10 deletions
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java index 78f7b33..7babb34 100644 --- a/services/java/com/android/server/PackageManagerService.java +++ b/services/java/com/android/server/PackageManagerService.java @@ -179,6 +179,8 @@ class PackageManagerService extends IPackageManager.Stub { static final int SCAN_NEW_INSTALL = 1<<4; static final int SCAN_NO_PATHS = 1<<5; + static final int REMOVE_CHATTY = 1<<16; + static final ComponentName DEFAULT_CONTAINER_COMPONENT = new ComponentName( "com.android.defcontainer", "com.android.defcontainer.DefaultContainerService"); @@ -6068,7 +6070,8 @@ class PackageManagerService extends IPackageManager.Stub { } synchronized (mInstallLock) { - res = deletePackageLI(packageName, deleteCodeAndResources, flags, info); + res = deletePackageLI(packageName, deleteCodeAndResources, + flags | REMOVE_CHATTY, info); } if(res && sendBroadCast) { @@ -6134,7 +6137,7 @@ class PackageManagerService extends IPackageManager.Stub { if (outInfo != null) { outInfo.removedPackage = packageName; } - removePackageLI(p, true); + removePackageLI(p, (flags&REMOVE_CHATTY) != 0); // Retrieve object to delete permissions for shared user later on PackageSetting deletedPs; synchronized (mPackages) { @@ -9589,8 +9592,7 @@ class PackageManagerService extends IPackageManager.Stub { continue; } // Parse package - int parseFlags = PackageParser.PARSE_CHATTY | - PackageParser.PARSE_ON_SDCARD | mDefParseFlags; + int parseFlags = PackageParser.PARSE_ON_SDCARD | mDefParseFlags; doGc = true; synchronized (mInstallLock) { final PackageParser.Package pkg = scanPackageLI(new File(codePath), diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java index b6f323d..1486a1d 100644 --- a/services/java/com/android/server/am/ActivityManagerService.java +++ b/services/java/com/android/server/am/ActivityManagerService.java @@ -9905,7 +9905,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen } if (mOrderedBroadcasts.size() > 0) { pw.println(" "); - pw.println(" Active serialized broadcasts:"); + pw.println(" Active ordered broadcasts:"); } for (int i=mOrderedBroadcasts.size()-1; i>=0; i--) { pw.println(" Serialized Broadcast #" + i + ":"); @@ -12919,7 +12919,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen try { if (DEBUG_BROADCAST_LIGHT) { int seq = r.intent.getIntExtra("seq", -1); - Slog.i(TAG, "Delivering to " + filter.receiverList.app + Slog.i(TAG, "Delivering to " + filter + " (seq=" + seq + "): " + r); } performReceive(filter.receiverList.app, filter.receiverList.receiver, @@ -12959,7 +12959,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen if (DEBUG_BROADCAST) Slog.v(TAG, "processNextBroadcast: " + mParallelBroadcasts.size() + " broadcasts, " - + mOrderedBroadcasts.size() + " serialized broadcasts"); + + mOrderedBroadcasts.size() + " ordered broadcasts"); updateCpuStats(); @@ -12977,7 +12977,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen for (int i=0; i<N; i++) { Object target = r.receivers.get(i); if (DEBUG_BROADCAST) Slog.v(TAG, - "Delivering non-serialized to registered " + "Delivering non-ordered to registered " + target + ": " + r); deliverToRegisteredReceiver(r, (BroadcastFilter)target, false); } @@ -13115,12 +13115,14 @@ public final class ActivityManagerService extends ActivityManagerNative implemen // a direct call. BroadcastFilter filter = (BroadcastFilter)nextReceiver; if (DEBUG_BROADCAST) Slog.v(TAG, - "Delivering serialized to registered " + "Delivering ordered to registered " + filter + ": " + r); deliverToRegisteredReceiver(r, filter, r.ordered); if (r.receiver == null || !r.ordered) { // The receiver has already finished, so schedule to // process the next one. + if (DEBUG_BROADCAST) Slog.v(TAG, "Quick finishing: ordered=" + + r.ordered + " receiver=" + r.receiver); r.state = BroadcastRecord.IDLE; scheduleBroadcastsLocked(); } diff --git a/services/java/com/android/server/am/BroadcastRecord.java b/services/java/com/android/server/am/BroadcastRecord.java index 75c9600..c3f0b3e 100644 --- a/services/java/com/android/server/am/BroadcastRecord.java +++ b/services/java/com/android/server/am/BroadcastRecord.java @@ -126,7 +126,9 @@ class BroadcastRecord extends Binder { pw.println(prefix + "curApp=" + curApp); pw.println(prefix + "curComponent=" + (curComponent != null ? curComponent.toShortString() : "--")); - pw.println(prefix + "curSourceDir=" + curReceiver.applicationInfo.sourceDir); + if (curReceiver != null && curReceiver.applicationInfo != null) { + pw.println(prefix + "curSourceDir=" + curReceiver.applicationInfo.sourceDir); + } } String stateStr = " (?)"; switch (state) { |