navbar: show menu if nav bars are force enabled via property
users can force enable navigation bars, via setting the
property "qemu.hw.mainkeys=0".
after a reboot, they have fully functional navigation bars.
unfortunatly the omnigears setting doesnt recognize them, as it
doesnt check for it.
lets check for this property and let users, which force enable
their navigation bar, enjoy the option to customize them.
Change-Id: I2b8b4a74d50f2d13ff15840845e64f7cf42f7d87
diff --git a/src/org/omnirom/omnigears/interfacesettings/BarsSettings.java b/src/org/omnirom/omnigears/interfacesettings/BarsSettings.java
index a0dce32..af54188 100644
--- a/src/org/omnirom/omnigears/interfacesettings/BarsSettings.java
+++ b/src/org/omnirom/omnigears/interfacesettings/BarsSettings.java
@@ -25,6 +25,7 @@
import android.content.Context;
import android.os.Bundle;
import android.os.RemoteException;
+import android.os.SystemProperties;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.preference.PreferenceGroup;
@@ -87,7 +88,11 @@
mStatusBarNetworkActivity.setOnPreferenceChangeListener(this);
mStatusBarNetworkActivity.setOnPreferenceChangeListener(this);
- boolean hasNavBar = getResources().getBoolean(com.android.internal.R.bool.config_showNavigationBar);
+ boolean hasNavBar = getResources().getBoolean(
+ com.android.internal.R.bool.config_showNavigationBar);
+ // Also check, if users without navigation bar force enabled it.
+ hasNavBar = hasNavBar || (SystemProperties.getInt("qemu.hw.mainkeys", 1) == 0);
+
// Hide navigation bar category on devices without navigation bar
if (!hasNavBar) {
prefSet.removePreference(findPreference(CATEGORY_NAVBAR));