LocationManagerService: Fix logic error removing multiple dead receivers.

If multiple receivers are dead, only the first one will be added.
found in http://code.google.com/p/android/issues/detail?id=2651

Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Simon Schoar
2009-06-10 21:12:10 +02:00
committed by Mike Lockwood
parent a32b5f3252
commit 4686657cee

View File

@@ -769,8 +769,8 @@ public class LocationManagerService extends ILocationManager.Stub implements Run
if (!record.mReceiver.callProviderEnabledLocked(provider, enabled)) {
if (deadReceivers == null) {
deadReceivers = new ArrayList<Receiver>();
deadReceivers.add(record.mReceiver);
}
deadReceivers.add(record.mReceiver);
}
listeners++;
}