diff options
| author | Jose Lima <joselima@google.com> | 2015-01-27 02:53:21 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-01-27 02:53:22 +0000 |
| commit | 3fd8a433a918fc9c57b6d7ff12839a1e028d6dad (patch) | |
| tree | 03fb7f44848b389b070bfbcaddfe4d776e1b5131 /core/java/android/app/Dialog.java | |
| parent | 49880eeb00c71a2287db65717fd8a7ff5e87279d (diff) | |
| parent | 7a22fc62d364bba4c1604a7e88fbd321eb541f4e (diff) | |
| download | frameworks_base-3fd8a433a918fc9c57b6d7ff12839a1e028d6dad.zip frameworks_base-3fd8a433a918fc9c57b6d7ff12839a1e028d6dad.tar.gz frameworks_base-3fd8a433a918fc9c57b6d7ff12839a1e028d6dad.tar.bz2 | |
Merge "Allow disabling the Options Pannel feature for TVs" into lmp-mr1-dev
Diffstat (limited to 'core/java/android/app/Dialog.java')
| -rw-r--r-- | core/java/android/app/Dialog.java | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/core/java/android/app/Dialog.java b/core/java/android/app/Dialog.java index 12d4513..067073a 100644 --- a/core/java/android/app/Dialog.java +++ b/core/java/android/app/Dialog.java @@ -910,21 +910,27 @@ public class Dialog implements DialogInterface, Window.Callback, * @see Activity#openOptionsMenu() */ public void openOptionsMenu() { - mWindow.openPanel(Window.FEATURE_OPTIONS_PANEL, null); + if (mWindow.hasFeature(Window.FEATURE_OPTIONS_PANEL)) { + mWindow.openPanel(Window.FEATURE_OPTIONS_PANEL, null); + } } - + /** * @see Activity#closeOptionsMenu() */ public void closeOptionsMenu() { - mWindow.closePanel(Window.FEATURE_OPTIONS_PANEL); + if (mWindow.hasFeature(Window.FEATURE_OPTIONS_PANEL)) { + mWindow.closePanel(Window.FEATURE_OPTIONS_PANEL); + } } /** * @see Activity#invalidateOptionsMenu() */ public void invalidateOptionsMenu() { - mWindow.invalidatePanelMenu(Window.FEATURE_OPTIONS_PANEL); + if (mWindow.hasFeature(Window.FEATURE_OPTIONS_PANEL)) { + mWindow.invalidatePanelMenu(Window.FEATURE_OPTIONS_PANEL); + } } /** |
