LineageParts: Reenable buttons related settings
Change-Id: I6323e837667d86d5f2e2ca13df7c17259d529643
diff --git a/src/org/lineageos/lineageparts/gestures/KeyHandler.java b/src/org/lineageos/lineageparts/gestures/KeyHandler.java
index e182762..30084b7 100644
--- a/src/org/lineageos/lineageparts/gestures/KeyHandler.java
+++ b/src/org/lineageos/lineageparts/gestures/KeyHandler.java
@@ -48,7 +48,6 @@
import android.util.SparseIntArray;
import android.view.KeyEvent;
-/*
import com.android.internal.os.DeviceKeyHandler;
import lineageos.providers.LineageSettings;
@@ -408,4 +407,3 @@
return pm.getLaunchIntentForPackage(resInfo.get(0).activityInfo.packageName);
}
}
-*/
diff --git a/src/org/lineageos/lineageparts/input/ButtonBacklightBrightness.java b/src/org/lineageos/lineageparts/input/ButtonBacklightBrightness.java
index 17a3081..d51864f 100644
--- a/src/org/lineageos/lineageparts/input/ButtonBacklightBrightness.java
+++ b/src/org/lineageos/lineageparts/input/ButtonBacklightBrightness.java
@@ -74,7 +74,6 @@
mActiveControl = mKeyboardBrightness;
}
*/
- /*
if (isButtonSupported()) {
boolean isSingleValue = !context.getResources().getBoolean(
com.android.internal.R.bool.config_deviceHasVariableButtonBrightness);
@@ -88,7 +87,6 @@
isSingleValue, defaultBrightness);
mActiveControl = mButtonBrightness;
}
- */
updateSummary();
}
@@ -237,11 +235,8 @@
|| (deviceKeys & KEY_MASK_MENU) != 0
|| (deviceKeys & KEY_MASK_ASSIST) != 0
|| (deviceKeys & KEY_MASK_APP_SWITCH) != 0;
- /*
boolean hasBacklight = res.getInteger(
com.android.internal.R.integer.config_buttonBrightnessSettingDefault) > 0;
- */
- boolean hasBacklight = false;
return hasBacklightKey && hasBacklight;
}
diff --git a/src/org/lineageos/lineageparts/input/ButtonSettings.java b/src/org/lineageos/lineageparts/input/ButtonSettings.java
index 06904f5..fefa935 100644
--- a/src/org/lineageos/lineageparts/input/ButtonSettings.java
+++ b/src/org/lineageos/lineageparts/input/ButtonSettings.java
@@ -368,12 +368,10 @@
findPreference(LineageSettings.System.VOLUME_ANSWER_CALL));
}
-/*
int cursorControlAction = Settings.System.getInt(resolver,
Settings.System.VOLUME_KEY_CURSOR_CONTROL, 0);
mVolumeKeyCursorControl = initList(KEY_VOLUME_KEY_CURSOR_CONTROL,
cursorControlAction);
-*/
int swapVolumeKeys = LineageSettings.System.getInt(getContentResolver(),
LineageSettings.System.SWAP_VOLUME_KEYS_ON_ROTATION, 0);
@@ -552,12 +550,10 @@
handleListChange((ListPreference) preference, newValue,
LineageSettings.System.KEY_APP_SWITCH_LONG_PRESS_ACTION);
return true;
-/*
} else if (preference == mVolumeKeyCursorControl) {
handleSystemListChange(mVolumeKeyCursorControl, newValue,
Settings.System.VOLUME_KEY_CURSOR_CONTROL);
return true;
-*/
} else if (preference == mTorchLongPressPowerTimeout) {
handleListChange(mTorchLongPressPowerTimeout, newValue,
LineageSettings.System.TORCH_LONG_PRESS_POWER_TIMEOUT);