aboutsummaryrefslogtreecommitdiffstats
path: root/sdk/src
diff options
context:
space:
mode:
authorMichael Bestas <mkbestas@lineageos.org>2018-01-23 20:33:16 +0200
committerMichael Bestas <mkbestas@lineageos.org>2018-01-24 02:43:12 +0200
commitdc1731e1dd2dcf0f6dab027d9152d4ec1e99bd9c (patch)
tree47af54f88ac6a28a7d6cbd70c40b70f649014fad /sdk/src
parent19d8afb7e6cb5e1c77edb34bad2c0da7c27762a7 (diff)
downloadlineage-sdk-dc1731e1dd2dcf0f6dab027d9152d4ec1e99bd9c.tar.gz
lineage-sdk-dc1731e1dd2dcf0f6dab027d9152d4ec1e99bd9c.tar.bz2
lineage-sdk-dc1731e1dd2dcf0f6dab027d9152d4ec1e99bd9c.zip
lineagehw: Remove thermal monitor feature
Change-Id: I8422858634a2518b84efc56b24f2ace37f38724a
Diffstat (limited to 'sdk/src')
-rw-r--r--sdk/src/java/lineageos/hardware/ILineageHardwareService.aidl4
-rw-r--r--sdk/src/java/lineageos/hardware/IThermalListenerCallback.aidl21
-rw-r--r--sdk/src/java/lineageos/hardware/LineageHardwareManager.java50
-rw-r--r--sdk/src/java/lineageos/hardware/ThermalListenerCallback.java44
4 files changed, 1 insertions, 118 deletions
diff --git a/sdk/src/java/lineageos/hardware/ILineageHardwareService.aidl b/sdk/src/java/lineageos/hardware/ILineageHardwareService.aidl
index 9e4ac576..cca87244 100644
--- a/sdk/src/java/lineageos/hardware/ILineageHardwareService.aidl
+++ b/sdk/src/java/lineageos/hardware/ILineageHardwareService.aidl
@@ -19,7 +19,6 @@ package lineageos.hardware;
import lineageos.hardware.DisplayMode;
import lineageos.hardware.HSIC;
-import lineageos.hardware.IThermalListenerCallback;
import lineageos.hardware.TouchscreenGesture;
/** @hide */
@@ -52,9 +51,6 @@ interface ILineageHardwareService {
DisplayMode getDefaultDisplayMode();
boolean setDisplayMode(in DisplayMode mode, boolean makeDefault);
- int getThermalState();
- boolean registerThermalListener(IThermalListenerCallback callback);
- boolean unRegisterThermalListener(IThermalListenerCallback callback);
boolean isSunlightEnhancementSelfManaged();
int getColorBalanceMin();
diff --git a/sdk/src/java/lineageos/hardware/IThermalListenerCallback.aidl b/sdk/src/java/lineageos/hardware/IThermalListenerCallback.aidl
deleted file mode 100644
index b2273a60..00000000
--- a/sdk/src/java/lineageos/hardware/IThermalListenerCallback.aidl
+++ /dev/null
@@ -1,21 +0,0 @@
-/**
- * Copyright (C) 2015 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package lineageos.hardware;
-
-interface IThermalListenerCallback {
- void onThermalChanged(int state);
-}
diff --git a/sdk/src/java/lineageos/hardware/LineageHardwareManager.java b/sdk/src/java/lineageos/hardware/LineageHardwareManager.java
index cab8526d..ae0ece65 100644
--- a/sdk/src/java/lineageos/hardware/LineageHardwareManager.java
+++ b/sdk/src/java/lineageos/hardware/LineageHardwareManager.java
@@ -135,12 +135,6 @@ public final class LineageHardwareManager {
public static final int FEATURE_DISPLAY_MODES = 0x2000;
/**
- * Thermal change monitor
- */
- @VisibleForTesting
- public static final int FEATURE_THERMAL_MONITOR = 0x8000;
-
- /**
* Color balance
*/
@VisibleForTesting
@@ -165,8 +159,7 @@ public final class LineageHardwareManager {
FEATURE_KEY_DISABLE,
FEATURE_SUNLIGHT_ENHANCEMENT,
FEATURE_TOUCH_HOVERING,
- FEATURE_AUTO_CONTRAST,
- FEATURE_THERMAL_MONITOR
+ FEATURE_AUTO_CONTRAST
);
private static LineageHardwareManager sLineageHardwareManagerInstance;
@@ -850,47 +843,6 @@ public final class LineageHardwareManager {
}
/**
- * @return current thermal {@link lineageos.hardware.ThermalListenerCallback.State}
- */
- public int getThermalState() {
- try {
- if (checkService()) {
- return sService.getThermalState();
- }
- } catch (RemoteException e) {
- }
- return ThermalListenerCallback.State.STATE_UNKNOWN;
- }
-
- /**
- * Register a callback to be notified of thermal state changes
- * @return boolean indicating whether register succeeded or failed
- */
- public boolean registerThermalListener(ThermalListenerCallback thermalCallback) {
- try {
- if (checkService()) {
- return sService.registerThermalListener(thermalCallback);
- }
- } catch (RemoteException e) {
- }
- return false;
- }
-
- /**
- * Unregister a callback previously registered to be notified of thermal state changes
- * @return boolean indicating whether un-registering succeeded or failed
- */
- public boolean unRegisterThermalListener(ThermalListenerCallback thermalCallback) {
- try {
- if (checkService()) {
- return sService.unRegisterThermalListener(thermalCallback);
- }
- } catch (RemoteException e) {
- }
- return false;
- }
-
- /**
* @return a list of available touchscreen gestures on the devices
*/
public TouchscreenGesture[] getTouchscreenGestures() {
diff --git a/sdk/src/java/lineageos/hardware/ThermalListenerCallback.java b/sdk/src/java/lineageos/hardware/ThermalListenerCallback.java
deleted file mode 100644
index 8d1aefba..00000000
--- a/sdk/src/java/lineageos/hardware/ThermalListenerCallback.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (C) 2015 The CyanogenMod Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package lineageos.hardware;
-
-/**
- * Callback class to register for thermal state changes
- */
-public abstract class ThermalListenerCallback extends IThermalListenerCallback.Stub {
- public static final class State {
- public static final int STATE_UNKNOWN = -1;
- public static final int STATE_COOL = 0;
- public static final int STATE_WARM_FALLING = 1;
- public static final int STATE_WARM_RISING = 2;
- public static final int STATE_CRITICAL = 3;
- public static final String toString(int state) {
- switch (state) {
- case STATE_COOL:
- return "STATE_COOL";
- case STATE_WARM_FALLING:
- return "STATE_WARM_FALLING";
- case STATE_WARM_RISING:
- return "STATE_WARM_RISING";
- case STATE_CRITICAL:
- return "STATE_CRITICAL";
- default:
- return "STATE_UNKNOWN";
- }
- }
- }
-}