diff options
| author | Danesh M <daneshm90@gmail.com> | 2015-09-22 17:11:52 -0700 |
|---|---|---|
| committer | Danesh M <daneshm90@gmail.com> | 2015-09-24 11:33:53 -0700 |
| commit | 90d3456a5491c3b9f4d7e1e0ea379132de770b13 (patch) | |
| tree | 7606324d2ab81e43f18e9bfc10de21908c1e055c | |
| parent | fa7272b741d90ce441fcea24e0d13f7f29915bc0 (diff) | |
| download | android_hardware_lineage_lineagehw-90d3456a5491c3b9f4d7e1e0ea379132de770b13.tar.gz android_hardware_lineage_lineagehw-90d3456a5491c3b9f4d7e1e0ea379132de770b13.tar.bz2 android_hardware_lineage_lineagehw-90d3456a5491c3b9f4d7e1e0ea379132de770b13.zip | |
CmHW : Add thermal monitor stub
Change-Id: I157f40b34ddd05912727e29db9984b3897003a25
| -rw-r--r-- | src/org/cyanogenmod/hardware/ThermalMonitor.java | 46 | ||||
| -rw-r--r-- | src/org/cyanogenmod/hardware/ThermalUpdateCallback.java | 29 |
2 files changed, 75 insertions, 0 deletions
diff --git a/src/org/cyanogenmod/hardware/ThermalMonitor.java b/src/org/cyanogenmod/hardware/ThermalMonitor.java new file mode 100644 index 0000000..dc4efb0 --- /dev/null +++ b/src/org/cyanogenmod/hardware/ThermalMonitor.java @@ -0,0 +1,46 @@ +/* + * 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 org.cyanogenmod.hardware; + +import android.content.Context; + +public class ThermalMonitor { + /** + * Initialize monitor + */ + public static void initialize(ThermalUpdateCallback callback) { + } + + /** + * Whether device supports it + * + * @return boolean Supported devices must return always true + */ + public static boolean isSupported() { + return false; + } + + /** + * This method return the current activation state + * + * @return boolean Must be false when feature is not supported or + * disabled. + */ + public static boolean isEnabled() { + return false; + } +} diff --git a/src/org/cyanogenmod/hardware/ThermalUpdateCallback.java b/src/org/cyanogenmod/hardware/ThermalUpdateCallback.java new file mode 100644 index 0000000..f9e9c53 --- /dev/null +++ b/src/org/cyanogenmod/hardware/ThermalUpdateCallback.java @@ -0,0 +1,29 @@ +/* + * 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 org.cyanogenmod.hardware; + +/** + * Interface for ThermalMonitor implementations to update the global + * state and broadcast any changes to receivers. + */ +public interface ThermalUpdateCallback { + /** + * Update the current thermal state. + * Takes care of broadcasting changes to receivers + */ + void setThermalState(int state); +} |
