summaryrefslogtreecommitdiffstats
path: root/location
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-02 15:23:56 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-07-02 15:23:56 -0700
commit0d0012ef1617170701b9cd7492ef04ac47bfb5ca (patch)
tree01b85c97f37b1356b723187578157e4f443de4c8 /location
parent1c502a4624859289c1000af6be8bea1aacee41bd (diff)
parent54af78a3f7064e04d7ebd64c985d4149f9f7b05c (diff)
downloadframeworks_base-0d0012ef1617170701b9cd7492ef04ac47bfb5ca.zip
frameworks_base-0d0012ef1617170701b9cd7492ef04ac47bfb5ca.tar.gz
frameworks_base-0d0012ef1617170701b9cd7492ef04ac47bfb5ca.tar.bz2
am 54af78a3: Merge change 5950 into donut
Merge commit '54af78a3f7064e04d7ebd64c985d4149f9f7b05c' * commit '54af78a3f7064e04d7ebd64c985d4149f9f7b05c': Fix memory leaks in system_server
Diffstat (limited to 'location')
-rwxr-xr-xlocation/java/com/android/internal/location/GpsLocationProvider.java3
-rw-r--r--location/java/com/android/internal/location/LocationProviderProxy.java7
2 files changed, 10 insertions, 0 deletions
diff --git a/location/java/com/android/internal/location/GpsLocationProvider.java b/location/java/com/android/internal/location/GpsLocationProvider.java
index 883e5f5..3f0c234 100755
--- a/location/java/com/android/internal/location/GpsLocationProvider.java
+++ b/location/java/com/android/internal/location/GpsLocationProvider.java
@@ -616,6 +616,9 @@ public class GpsLocationProvider extends ILocationProvider.Stub {
synchronized(mListeners) {
mListeners.remove(this);
}
+ if (mListener != null) {
+ mListener.asBinder().unlinkToDeath(this, 0);
+ }
}
}
diff --git a/location/java/com/android/internal/location/LocationProviderProxy.java b/location/java/com/android/internal/location/LocationProviderProxy.java
index bd7088c..4ae424a 100644
--- a/location/java/com/android/internal/location/LocationProviderProxy.java
+++ b/location/java/com/android/internal/location/LocationProviderProxy.java
@@ -53,6 +53,12 @@ public class LocationProviderProxy implements IBinder.DeathRecipient {
}
}
+ public void unlinkProvider() {
+ if (mProvider != null) {
+ mProvider.asBinder().unlinkToDeath(this, 0);
+ }
+ }
+
public String getName() {
return mName;
}
@@ -255,5 +261,6 @@ public class LocationProviderProxy implements IBinder.DeathRecipient {
public void binderDied() {
Log.w(TAG, "Location Provider " + mName + " died");
mDead = true;
+ mProvider.asBinder().unlinkToDeath(this, 0);
}
}