Merge "Fix sketchy bubble preference button" into rvc-qpr-dev
diff --git a/src/com/android/settings/display/PeakRefreshRatePreferenceController.java b/src/com/android/settings/display/PeakRefreshRatePreferenceController.java
index 091ae32..10cab1c 100644
--- a/src/com/android/settings/display/PeakRefreshRatePreferenceController.java
+++ b/src/com/android/settings/display/PeakRefreshRatePreferenceController.java
@@ -27,7 +27,6 @@
import androidx.annotation.VisibleForTesting;
import androidx.preference.Preference;
import androidx.preference.PreferenceScreen;
-import androidx.preference.SwitchPreference;
import com.android.settings.R;
import com.android.settings.core.TogglePreferenceController;
@@ -45,7 +44,6 @@
@VisibleForTesting float mPeakRefreshRate;
private static final String TAG = "RefreshRatePrefCtr";
- private static final String KEY_PEAK_REFRESH_RATE_DEFAULT = "peak_refresh_rate_default";
private static final float INVALIDATE_REFRESH_RATE = -1f;
private final Handler mHandler;
@@ -59,7 +57,7 @@
public PeakRefreshRatePreferenceController(Context context, String key) {
super(context, key);
- mHandler = new Handler();
+ mHandler = new Handler(context.getMainLooper());
mDeviceConfigDisplaySettings = new DeviceConfigDisplaySettings();
mOnDeviceConfigChange =
new IDeviceConfigChange() {
diff --git a/src/com/android/settings/slices/SliceBackgroundWorker.java b/src/com/android/settings/slices/SliceBackgroundWorker.java
index 6eb154e..2b02999 100644
--- a/src/com/android/settings/slices/SliceBackgroundWorker.java
+++ b/src/com/android/settings/slices/SliceBackgroundWorker.java
@@ -33,6 +33,7 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -190,7 +191,8 @@
private static NotifySliceChangeHandler sHandler;
- private final Map<Uri, Long> mLastUpdateTimeLookup = new ArrayMap<>();
+ private final Map<Uri, Long> mLastUpdateTimeLookup = Collections.synchronizedMap(
+ new ArrayMap<>());
private static NotifySliceChangeHandler getInstance() {
if (sHandler == null) {