diff options
author | Marcos Marado <mmarado@cyngn.com> | 2015-01-05 17:58:28 +0000 |
---|---|---|
committer | Adnan Begovic <adnan@cyngn.com> | 2015-10-29 17:36:27 -0700 |
commit | 3f0f7d02181b960a6bd6c9724b07fced6bdcb119 (patch) | |
tree | 9017c1864c88e696318ce1f0697421f8e1aebd3e | |
parent | 44aa3c932f7bd22329f430dc901a950df6626ccd (diff) | |
download | packages_apps_Settings-3f0f7d02181b960a6bd6c9724b07fced6bdcb119.zip packages_apps_Settings-3f0f7d02181b960a6bd6c9724b07fced6bdcb119.tar.gz packages_apps_Settings-3f0f7d02181b960a6bd6c9724b07fced6bdcb119.tar.bz2 |
Remove 'Navigation bar' PreferenceCategory when empty
Change-Id: I64e9d034870c2366a7604c70c71acb7aa8c1b5e1
-rw-r--r-- | src/com/android/settings/ButtonSettings.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/settings/ButtonSettings.java b/src/com/android/settings/ButtonSettings.java index b98efd6..f8f0562 100644 --- a/src/com/android/settings/ButtonSettings.java +++ b/src/com/android/settings/ButtonSettings.java @@ -348,7 +348,9 @@ public class ButtonSettings extends SettingsPreferenceFragment implements mNavigationPreferencesCat.removePreference(mNavigationBarLeftPref); } - if (!hasNavBar && (needsNavigationBar || !isKeyDisablerSupported())) { + if ((!hasNavBar && (needsNavigationBar || !isKeyDisablerSupported())) || + (mNavigationPreferencesCat.getPreferenceCount() == 0) + ) { // Hide navigation bar category prefScreen.removePreference(mNavigationPreferencesCat); } |