LineageParts: Force show navbar has moved to system settings
Change-Id: Iae71e4de32f539d083bd1e1e83fa4c25a95931c3
diff --git a/src/org/lineageos/lineageparts/input/ButtonSettings.java b/src/org/lineageos/lineageparts/input/ButtonSettings.java
index e906ecf..06904f5 100644
--- a/src/org/lineageos/lineageparts/input/ButtonSettings.java
+++ b/src/org/lineageos/lineageparts/input/ButtonSettings.java
@@ -28,6 +28,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.RemoteException;
+import android.os.UserHandle;
import android.provider.Settings;
import android.support.v14.preference.SwitchPreference;
import android.support.v7.preference.ListPreference;
@@ -566,13 +567,13 @@
}
private static void writeDisableNavkeysOption(Context context, boolean enabled) {
- LineageSettings.Global.putInt(context.getContentResolver(),
- LineageSettings.Global.DEV_FORCE_SHOW_NAVBAR, enabled ? 1 : 0);
+ LineageSettings.System.putIntForUser(context.getContentResolver(),
+ LineageSettings.System.FORCE_SHOW_NAVBAR, enabled ? 1 : 0, UserHandle.USER_CURRENT);
}
private void updateDisableNavkeysOption() {
- boolean enabled = LineageSettings.Global.getInt(getActivity().getContentResolver(),
- LineageSettings.Global.DEV_FORCE_SHOW_NAVBAR, 0) != 0;
+ boolean enabled = LineageSettings.System.getIntForUser(getActivity().getContentResolver(),
+ LineageSettings.System.FORCE_SHOW_NAVBAR, 0, UserHandle.USER_CURRENT) != 0;
mDisableNavigationKeys.setChecked(enabled);
}
@@ -648,8 +649,10 @@
return;
}
- writeDisableNavkeysOption(context, LineageSettings.Global.getInt(context.getContentResolver(),
- LineageSettings.Global.DEV_FORCE_SHOW_NAVBAR, 0) != 0);
+ boolean enabled = LineageSettings.System.getIntForUser(context.getContentResolver(),
+ LineageSettings.System.FORCE_SHOW_NAVBAR, 0, UserHandle.USER_CURRENT) != 0;
+
+ writeDisableNavkeysOption(context, enabled);
}