lineagehw: Remove thermal monitor feature

Change-Id: I8422858634a2518b84efc56b24f2ace37f38724a
This commit is contained in:
Michael Bestas
2018-01-23 20:33:16 +02:00
parent 19d8afb7e6
commit dc1731e1dd
6 changed files with 2 additions and 208 deletions

View File

@@ -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();

View File

@@ -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);
}

View File

@@ -134,12 +134,6 @@ public final class LineageHardwareManager {
@VisibleForTesting
public static final int FEATURE_DISPLAY_MODES = 0x2000;
/**
* Thermal change monitor
*/
@VisibleForTesting
public static final int FEATURE_THERMAL_MONITOR = 0x8000;
/**
* Color balance
*/
@@ -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;
@@ -849,47 +842,6 @@ public final class LineageHardwareManager {
return true;
}
/**
* @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
*/

View File

@@ -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";
}
}
}
}