diff options
author | Craig Stout <cstout@google.com> | 2014-04-04 13:03:10 -0700 |
---|---|---|
committer | Craig Stout <cstout@google.com> | 2014-05-13 18:30:56 -0700 |
commit | 4c0cb8a526eec87fdba6dc371e21abfa4e993ea0 (patch) | |
tree | d08e474ea1a5e64813f41324e40914e9baa02401 /policy | |
parent | 3c13d685baa070185f4c46c42ce3052fd4791067 (diff) | |
download | frameworks_base-4c0cb8a526eec87fdba6dc371e21abfa4e993ea0.zip frameworks_base-4c0cb8a526eec87fdba6dc371e21abfa4e993ea0.tar.gz frameworks_base-4c0cb8a526eec87fdba6dc371e21abfa4e993ea0.tar.bz2 |
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
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 13 |
1 files changed, 10 insertions, 3 deletions
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 |