Merge changes from topic "slice-highlight" into sc-v2-dev
* changes: Add highlight menu keys for all toggle pref controllers and custom slices Support slice deep links highlighting menu entries
This commit is contained in:
@@ -24,6 +24,7 @@ import android.text.TextUtils;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
|
||||
@@ -61,6 +62,11 @@ public class SmartBatteryPreferenceController extends BasePreferenceController i
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSliceHighlightMenuRes() {
|
||||
return R.string.menu_key_battery;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateState(Preference preference) {
|
||||
super.updateState(preference);
|
||||
|
@@ -118,6 +118,11 @@ public class BatterySaverButtonPreferenceController extends
|
||||
false /* needFirstTimeWarning */);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSliceHighlightMenuRes() {
|
||||
return R.string.menu_key_battery;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPowerSaveModeChanged() {
|
||||
mHandler.postDelayed(() -> onPowerSaveModeChangedInternal(),
|
||||
|
@@ -8,6 +8,7 @@ import android.text.TextUtils;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.SwitchPreference;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.PreferenceControllerMixin;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
@@ -59,4 +60,9 @@ public class BatterySaverStickyPreferenceController extends TogglePreferenceCont
|
||||
public int getAvailabilityStatus() {
|
||||
return AVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSliceHighlightMenuRes() {
|
||||
return R.string.menu_key_battery;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user