Merge "Enforce background fallback to be non-translucent" into nyc-dev am: a35724f666

am: 494529318a

* commit '494529318a0a8952ed5dc7bc00786f74f39b2612':
  Don't bother with WeakHashMap for direct alarm bookkeeping

Change-Id: I23fef9e69fb5aa0ec57d32e19d1fc513611018fd
This commit is contained in:
Jorim Jaggi
2016-05-31 23:17:32 +00:00
committed by android-build-merger

View File

@@ -28,12 +28,12 @@ import android.os.RemoteException;
import android.os.UserHandle;
import android.os.WorkSource;
import android.text.TextUtils;
import android.util.ArrayMap;
import android.util.Log;
import libcore.util.ZoneInfoDB;
import java.io.IOException;
import java.util.WeakHashMap;
/**
* This class provides access to the system alarm services. These allow you
@@ -244,7 +244,7 @@ public class AlarmManager {
// Tracking of the OnAlarmListener -> wrapper mapping, for cancel() support.
// Access is synchronized on the AlarmManager class object.
private static WeakHashMap<OnAlarmListener, ListenerWrapper> sWrappers;
private static ArrayMap<OnAlarmListener, ListenerWrapper> sWrappers;
/**
* package private on purpose
@@ -631,7 +631,7 @@ public class AlarmManager {
if (listener != null) {
synchronized (AlarmManager.class) {
if (sWrappers == null) {
sWrappers = new WeakHashMap<OnAlarmListener, ListenerWrapper>();
sWrappers = new ArrayMap<OnAlarmListener, ListenerWrapper>();
}
recipientWrapper = sWrappers.get(listener);