LineageParts: Make sure "Wake device" pref is always accessible
Previously it'd be disabled when navbar was enabled.
Change-Id: I8423754f87731c1174b72ac664847e0f6260fc89
diff --git a/src/org/lineageos/lineageparts/input/ButtonSettings.java b/src/org/lineageos/lineageparts/input/ButtonSettings.java
index 9af549e..b1d90d7 100644
--- a/src/org/lineageos/lineageparts/input/ButtonSettings.java
+++ b/src/org/lineageos/lineageparts/input/ButtonSettings.java
@@ -682,17 +682,29 @@
mHomeDoubleTapAction.setEnabled(!navbarEnabled);
}
}
- if (backCategory != null) {
- backCategory.setEnabled(!navbarEnabled);
- }
if (menuCategory != null) {
- menuCategory.setEnabled(!navbarEnabled);
+ if (mMenuPressAction != null) {
+ mMenuPressAction.setEnabled(!navbarEnabled);
+ }
+ if (mMenuLongPressAction != null) {
+ mMenuLongPressAction.setEnabled(!navbarEnabled);
+ }
}
if (assistCategory != null) {
- assistCategory.setEnabled(!navbarEnabled);
+ if (mAssistPressAction != null) {
+ mAssistPressAction.setEnabled(!navbarEnabled);
+ }
+ if (mAssistLongPressAction != null) {
+ mAssistLongPressAction.setEnabled(!navbarEnabled);
+ }
}
if (appSwitchCategory != null) {
- appSwitchCategory.setEnabled(!navbarEnabled);
+ if (mAppSwitchPressAction != null) {
+ mAppSwitchPressAction.setEnabled(!navbarEnabled);
+ }
+ if (mAppSwitchLongPressAction != null) {
+ mAppSwitchLongPressAction.setEnabled(!navbarEnabled);
+ }
}
}