Use activity for brightness dialog
BUG: 15512088 Change-Id: Ibe38525b78d06e97cdf7e6369ca8179ab63e59d7
This commit is contained in:
@@ -19,11 +19,12 @@
|
||||
android:title="@string/display_settings"
|
||||
settings:keywords="@string/keywords_display">
|
||||
|
||||
<com.android.settings.BrightnessPreference
|
||||
<PreferenceScreen
|
||||
android:key="brightness"
|
||||
android:title="@string/brightness"
|
||||
settings:keywords="@string/keywords_display_brightness_level"
|
||||
android:persistent="false"/>
|
||||
settings:keywords="@string/keywords_display_brightness_level">
|
||||
<intent android:action="android.intent.action.SHOW_BRIGHTNESS_DIALOG" />
|
||||
</PreferenceScreen>
|
||||
|
||||
<CheckBoxPreference
|
||||
android:key="auto_brightness"
|
||||
|
@@ -30,7 +30,7 @@ public class BrightnessPreference extends Preference {
|
||||
|
||||
@Override
|
||||
protected void onClick() {
|
||||
Intent intent = new Intent(Intent.ACTION_SHOW_BRIGHTNESS_DIALOG);
|
||||
getContext().sendBroadcastAsUser(intent, UserHandle.CURRENT_OR_SELF);
|
||||
getContext().startActivityAsUser(new Intent(Intent.ACTION_SHOW_BRIGHTNESS_DIALOG),
|
||||
UserHandle.CURRENT_OR_SELF);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user