Merge "Fix the bug of showing the "Smooth display" item in the search result." into rvc-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() {