From: Phil Weaver Date: Fri, 28 Jul 2017 19:58:15 +0000 (-0700) Subject: Make a11y shortcut dialog themeable X-Git-Tag: android-x86-8.1-r1~122^2~2^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=8c58d45d573fcc01557c068070d65002bc94d6d7;p=android-x86%2Fframeworks-base.git Make a11y shortcut dialog themeable Bug: 64145430 Test: Brought up dialog. It's now blue. Change-Id: Ib830734da43001260628133c05f3f3faee9c1563 (cherry picked from commit 5351872f4f033badbb176b273e38afb5d33b35b8) --- diff --git a/services/core/java/com/android/server/policy/AccessibilityShortcutController.java b/services/core/java/com/android/server/policy/AccessibilityShortcutController.java index 0b54e5e53822..0a8635d7210f 100644 --- a/services/core/java/com/android/server/policy/AccessibilityShortcutController.java +++ b/services/core/java/com/android/server/policy/AccessibilityShortcutController.java @@ -18,6 +18,7 @@ package com.android.server.policy; import android.accessibilityservice.AccessibilityServiceInfo; import android.app.ActivityManager; +import android.app.ActivityThread; import android.app.AlertDialog; import android.content.ComponentName; import android.content.ContentResolver; @@ -212,7 +213,9 @@ public class AccessibilityShortcutController { final String warningMessage = String.format( mContext.getString(R.string.accessibility_shortcut_toogle_warning), serviceInfo.getResolveInfo().loadLabel(mContext.getPackageManager()).toString()); - final AlertDialog alertDialog = mFrameworkObjectProvider.getAlertDialogBuilder(mContext) + final AlertDialog alertDialog = mFrameworkObjectProvider.getAlertDialogBuilder( + // Use SystemUI context so we pick up any theme set in a vendor overlay + ActivityThread.currentActivityThread().getSystemUiContext()) .setTitle(R.string.accessibility_shortcut_warning_dialog_title) .setMessage(warningMessage) .setCancelable(false)