sdk: Rework reading mode API

* The current API makes no sense, and doesn't really
  fit with how the other boolean features work
* While we're at it, place AutoContrast properly

Change-Id: I81d7805411c281e435c7451c0b62689711dbb323
This commit is contained in:
Paul Keith
2018-08-08 18:28:58 +02:00
parent 39986a0a65
commit 505580e2dd
3 changed files with 10 additions and 39 deletions

View File

@@ -65,6 +65,4 @@ interface ILineageHardwareService {
TouchscreenGesture[] getTouchscreenGestures();
boolean setTouchscreenGestureEnabled(in TouchscreenGesture gesture, boolean state);
boolean setGrayscale(boolean state);
}

View File

@@ -160,12 +160,13 @@ public final class LineageHardwareManager {
private static final List<Integer> BOOLEAN_FEATURES = Arrays.asList(
FEATURE_ADAPTIVE_BACKLIGHT,
FEATURE_AUTO_CONTRAST,
FEATURE_COLOR_ENHANCEMENT,
FEATURE_HIGH_TOUCH_SENSITIVITY,
FEATURE_KEY_DISABLE,
FEATURE_SUNLIGHT_ENHANCEMENT,
FEATURE_TOUCH_HOVERING,
FEATURE_AUTO_CONTRAST
FEATURE_READING_ENHANCEMENT
);
private static LineageHardwareManager sLineageHardwareManagerInstance;
@@ -874,19 +875,4 @@ public final class LineageHardwareManager {
}
return false;
}
/**
* Enables or disables reading mode
*
* @return true if success
*/
public boolean setGrayscale(boolean state) {
try {
if (checkService()) {
return sService.setGrayscale(state);
}
} catch (RemoteException e) {
}
return false;
}
}