OSDN Git Service

Use SystemUI Dialog Theme for QSSecurityFooter dialog
authorphweiss <phweiss@google.com>
Tue, 13 Jun 2017 13:23:13 +0000 (15:23 +0200)
committerPhilipp Weiß <phweiss@google.com>
Wed, 14 Jun 2017 10:08:33 +0000 (10:08 +0000)
Without the ContextThemeWrapper, the dialog's text color
gets changed whenever the QS theme changes.

Bug: 62534577
Test: manual, CTS Verifier > Managed Provisioning > Device Owner Tests
      > Network Logging UI

Change-Id: I408902688b97bb3c6dff06215b12956ae49a4806
(cherry picked from commit da9bee2623c358913cafc06b6d617d10e234777c)

packages/SystemUI/src/com/android/systemui/qs/QSSecurityFooter.java

index d434f2f..56fca1f 100644 (file)
@@ -27,6 +27,7 @@ import android.text.SpannableStringBuilder;
 import android.text.method.LinkMovementMethod;
 import android.text.style.ClickableSpan;
 import android.util.Log;
+import android.view.ContextThemeWrapper;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -244,8 +245,9 @@ public class QSSecurityFooter implements OnClickListener, DialogInterface.OnClic
 
         mDialog = new SystemUIDialog(mContext);
         mDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
-        View dialogView = LayoutInflater.from(mContext)
-               .inflate(R.layout.quick_settings_footer_dialog, null, false);
+        View dialogView = LayoutInflater.from(
+                new ContextThemeWrapper(mContext, R.style.Theme_SystemUI_Dialog))
+                .inflate(R.layout.quick_settings_footer_dialog, null, false);
         mDialog.setView(dialogView);
         mDialog.setButton(DialogInterface.BUTTON_POSITIVE, getPositiveButton(), this);