Tweak search result for adaptive brightness
- Create a new controller for auto brightness in auto_brightness_detail.xml. - We only show slice version for search result. - Change slice summary for adaptive brightness. Test: visual Fixes: 130651278 Change-Id: If9b71735bbb2a0ee22676d9dfedab2cf9e778493
This commit is contained in:
@@ -19,7 +19,6 @@ import static android.provider.Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL;
|
||||
|
||||
import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.TogglePreferenceController;
|
||||
@@ -52,15 +51,10 @@ public class AutoBrightnessPreferenceController extends TogglePreferenceControll
|
||||
public int getAvailabilityStatus() {
|
||||
return mContext.getResources().getBoolean(
|
||||
com.android.internal.R.bool.config_automatic_brightness_available)
|
||||
? AVAILABLE
|
||||
? AVAILABLE_UNSEARCHABLE
|
||||
: UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSliceable() {
|
||||
return TextUtils.equals(getPreferenceKey(), "auto_brightness");
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence getSummary() {
|
||||
return mContext.getText(isChecked()
|
||||
|
Reference in New Issue
Block a user