diff options
| author | Danesh M <daneshm90@gmail.com> | 2015-09-22 17:11:52 -0700 |
|---|---|---|
| committer | doc HD <doc.divxm@gmail.com> | 2015-09-24 21:56:54 +0300 |
| commit | f6835924453c89f0f506513bdd9a62aef063c436 (patch) | |
| tree | ece9f17b669d2f9d6f8d3137249c9092a5c994d7 | |
| parent | 3af1fd24e259e57439585c5613d301c2842fdd5c (diff) | |
CmHW : Add thermal monitor stublp5.1
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); +} |
