Fix search non-indexable update
- When creating preference conotrollers, if one fail, skip that one instead of giving up entire operation. - Fix BatterySaverController by providing a existing looper. Change-Id: Iefe443b7fa91e51515c5c247fab4d9588867baef Fixes: 73903739 Test: robotest
This commit is contained in:
@@ -18,6 +18,7 @@ package com.android.settings.fuelgauge;
|
||||
import android.content.Context;
|
||||
import android.database.ContentObserver;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.os.PowerManager;
|
||||
import android.provider.Settings;
|
||||
import android.support.annotation.VisibleForTesting;
|
||||
@@ -119,7 +120,8 @@ public class BatterySaverController extends TogglePreferenceController
|
||||
mBatterySaverPref.setSummary(getSummary());
|
||||
}
|
||||
|
||||
private final ContentObserver mObserver = new ContentObserver(new Handler()) {
|
||||
private final ContentObserver mObserver = new ContentObserver(
|
||||
new Handler(Looper.getMainLooper())) {
|
||||
@Override
|
||||
public void onChange(boolean selfChange) {
|
||||
updateSummary();
|
||||
|
||||
Reference in New Issue
Block a user