diff options
author | Keith Mok <kmok@cyngn.com> | 2016-06-14 09:44:34 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2016-06-15 08:41:31 -0700 |
commit | 6c6d0e68be18a61d20ead5a01297425839118f8c (patch) | |
tree | 3d4a93e0421520e04e0d628331b4f99e84194237 /src/com/android/settings/applications | |
parent | 2813862d85c3fa624e869b1bd1af969a5ab8e52e (diff) | |
download | packages_apps_Settings-6c6d0e68be18a61d20ead5a01297425839118f8c.zip packages_apps_Settings-6c6d0e68be18a61d20ead5a01297425839118f8c.tar.gz packages_apps_Settings-6c6d0e68be18a61d20ead5a01297425839118f8c.tar.bz2 |
Settings: Remove hide navigation bar settings
Remove hide navigation bar settings in Expanded
desktop if the device has no on-screen navigation
bar currently available.
FEIJ-1194
Change-Id: I4d0a5cc453a13140236f5e2e9f39e970fe759607
Diffstat (limited to 'src/com/android/settings/applications')
-rw-r--r-- | src/com/android/settings/applications/ExpandedDesktopExtraPrefs.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/com/android/settings/applications/ExpandedDesktopExtraPrefs.java b/src/com/android/settings/applications/ExpandedDesktopExtraPrefs.java index f709a98..f729aa3 100644 --- a/src/com/android/settings/applications/ExpandedDesktopExtraPrefs.java +++ b/src/com/android/settings/applications/ExpandedDesktopExtraPrefs.java @@ -23,10 +23,12 @@ import android.net.Uri; import android.os.Bundle; import android.os.Handler; +import android.os.RemoteException; import android.preference.ListPreference; import android.preference.Preference; import android.provider.Settings; import android.view.WindowManager; +import android.view.WindowManagerGlobal; import android.view.WindowManagerPolicyControl; import com.android.internal.logging.MetricsLogger; @@ -55,9 +57,17 @@ public class ExpandedDesktopExtraPrefs extends SettingsPreferenceFragment @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); - addPreferencesFromResource(R.xml.expanded_desktop_prefs); - mExpandedDesktopStyle = getExpandedDesktopStyle(); - createPreferences(); + boolean hasNavigationBar = true; + try { + hasNavigationBar = WindowManagerGlobal.getWindowManagerService().hasNavigationBar(); + } catch (RemoteException e) { + // Do nothing + } + if (hasNavigationBar) { + addPreferencesFromResource(R.xml.expanded_desktop_prefs); + mExpandedDesktopStyle = getExpandedDesktopStyle(); + createPreferences(); + } } @Override |