diff options
| author | Dianne Hackborn <hackbod@google.com> | 2011-11-11 14:24:58 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-11-11 14:24:58 -0800 |
| commit | d400d03f4a6384449f8b0d3c8a9aa7e1e8aa5a16 (patch) | |
| tree | 8e609cd46cd31bcbdf77fddc891db0468c59ee95 /core/java/android | |
| parent | 847fbbeaf9e3ba187a45d0a631f0c087ce25b7f6 (diff) | |
| parent | 5a6ef737edbf57577443ac056613afe6cb121519 (diff) | |
| download | frameworks_base-d400d03f4a6384449f8b0d3c8a9aa7e1e8aa5a16.zip frameworks_base-d400d03f4a6384449f8b0d3c8a9aa7e1e8aa5a16.tar.gz frameworks_base-d400d03f4a6384449f8b0d3c8a9aa7e1e8aa5a16.tar.bz2 | |
Merge "Fix issue #5595933: GREF leak due to race condition in..." into ics-mr1
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/app/LoadedApk.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/app/LoadedApk.java b/core/java/android/app/LoadedApk.java index 522f477..0c6baeb 100644 --- a/core/java/android/app/LoadedApk.java +++ b/core/java/android/app/LoadedApk.java @@ -901,6 +901,7 @@ public final class LoadedApk { private RuntimeException mUnbindLocation; private boolean mDied; + private boolean mForgotten; private static class ConnectionInfo { IBinder binder; @@ -959,6 +960,7 @@ public final class LoadedApk { ci.binder.unlinkToDeath(ci.deathMonitor, 0); } mActiveConnections.clear(); + mForgotten = true; } } @@ -1020,6 +1022,11 @@ public final class LoadedApk { ServiceDispatcher.ConnectionInfo info; synchronized (this) { + if (mForgotten) { + // We unbound before receiving the connection; ignore + // any connection received. + return; + } old = mActiveConnections.get(name); if (old != null && old.binder == service) { // Huh, already have this one. Oh well! |
