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:
@@ -65,6 +65,4 @@ interface ILineageHardwareService {
|
||||
|
||||
TouchscreenGesture[] getTouchscreenGestures();
|
||||
boolean setTouchscreenGestureEnabled(in TouchscreenGesture gesture, boolean state);
|
||||
|
||||
boolean setGrayscale(boolean state);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user