From 4c0cb8a526eec87fdba6dc371e21abfa4e993ea0 Mon Sep 17 00:00:00 2001 From: Craig Stout Date: Fri, 4 Apr 2014 13:03:10 -0700 Subject: AlertDialog and AppError themes for TV. Leanback themes override AlertDialog styles from other themes. Makes system alert dialogs, and alert dialogs from games running on ATV, have a style more appropriate to television. Final visuals pending. Side button layout fixes DatePickerDialog and TimePickerDialog with dpad navigation. TODO: consider using side button layout for other AlertDialog cases (long messages and lists). Change-Id: I74e4e04d16d6854377580be95a87684a0385b04b --- .../android/internal/policy/impl/PhoneWindowManager.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'policy') diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index ae6aeee..4ee8103 100644 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -4777,9 +4777,16 @@ public class PhoneWindowManager implements WindowManagerPolicy { mHandler.post(new Runnable() { @Override public void run() { if (mBootMsgDialog == null) { - int theme = mContext.getPackageManager().hasSystemFeature( - PackageManager.FEATURE_WATCH) ? - com.android.internal.R.style.Theme_Micro_Dialog_Alert : 0; + int theme; + if (mContext.getPackageManager().hasSystemFeature( + PackageManager.FEATURE_WATCH)) { + theme = com.android.internal.R.style.Theme_Micro_Dialog_Alert; + } else if (mContext.getPackageManager().hasSystemFeature( + PackageManager.FEATURE_TELEVISION)) { + theme = com.android.internal.R.style.Theme_Leanback_Dialog_Alert; + } else { + theme = 0; + } mBootMsgDialog = new ProgressDialog(mContext, theme) { // This dialog will consume all events coming in to -- cgit v1.1