Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e241a3c1 authored by Jason Monk's avatar Jason Monk Committed by android-build-merger
Browse files

Merge "Fix theming on brightness dialog" into oc-dev

am: 3d82322c

Change-Id: I6c7e8a47686d5f3cfa1f4e235ef1bbb94dd753a7
parents df8508de 3d82322c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2961,5 +2961,8 @@
  <java-symbol type="string" name="etws_primary_default_message_test" />

  <java-symbol type="string" name="etws_primary_default_message_others" />

  <java-symbol type="bool" name="config_quickSettingsSupported" />

  <java-symbol type="style" name="Theme.DeviceDefault.QuickSettings" />
</resources>
+10 −1
Original line number Diff line number Diff line
@@ -18,8 +18,11 @@ package com.android.systemui.settings;

import android.app.Activity;
import android.os.Bundle;
import android.view.ContextThemeWrapper;
import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
@@ -43,7 +46,13 @@ public class BrightnessDialog extends Activity {
        window.clearFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND);
        window.requestFeature(Window.FEATURE_NO_TITLE);

        setContentView(R.layout.quick_settings_brightness_dialog);
        // Use a dialog theme as the activity theme, but inflate the content as
        // the QS content.
        ContextThemeWrapper themedContext = new ContextThemeWrapper(this,
                com.android.internal.R.style.Theme_DeviceDefault_QuickSettings);
        View v = LayoutInflater.from(themedContext).inflate(
                R.layout.quick_settings_brightness_dialog, null);
        setContentView(v);

        final ImageView icon = (ImageView) findViewById(R.id.brightness_icon);
        final ToggleSliderView slider = (ToggleSliderView) findViewById(R.id.brightness_slider);