aboutsummaryrefslogtreecommitdiffstats
path: root/cm
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2016-02-24 08:58:39 -0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-02-25 09:00:18 -0800
commite3c966861f5069dc03c2939953681607d56e10b6 (patch)
tree87bda0c4572e32835966a13f72bd183c8ee51d39 /cm
parentc2efaa77945e58e396c4ac36cf5f47d555556ede (diff)
downloadvendor_cmsdk-e3c966861f5069dc03c2939953681607d56e10b6.zip
vendor_cmsdk-e3c966861f5069dc03c2939953681607d56e10b6.tar.gz
vendor_cmsdk-e3c966861f5069dc03c2939953681607d56e10b6.tar.bz2
cmsdk: send intent to intialize CMHW
Ref: OPO-513 Change-Id: Iedd88bfad12b8f257bb792bf024d8eefa92b321c Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'cm')
-rw-r--r--cm/lib/main/java/org/cyanogenmod/platform/internal/CMHardwareService.java12
-rw-r--r--cm/res/AndroidManifest.xml1
2 files changed, 12 insertions, 1 deletions
diff --git a/cm/lib/main/java/org/cyanogenmod/platform/internal/CMHardwareService.java b/cm/lib/main/java/org/cyanogenmod/platform/internal/CMHardwareService.java
index 7031bd7..bfae235 100644
--- a/cm/lib/main/java/org/cyanogenmod/platform/internal/CMHardwareService.java
+++ b/cm/lib/main/java/org/cyanogenmod/platform/internal/CMHardwareService.java
@@ -16,7 +16,7 @@
package org.cyanogenmod.platform.internal;
import android.content.Context;
-import android.content.pm.PackageManager;
+import android.content.Intent;
import android.os.IBinder;
import android.os.RemoteCallbackList;
import android.os.RemoteException;
@@ -348,6 +348,16 @@ public class CMHardwareService extends SystemService implements ThermalUpdateCal
}
@Override
+ public void onBootPhase(int phase) {
+ if (phase == PHASE_BOOT_COMPLETED) {
+ Intent intent = new Intent(cyanogenmod.content.Intent.ACTION_INITIALIZE_CM_HARDWARE);
+ intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
+ mContext.sendBroadcast(intent,
+ cyanogenmod.platform.Manifest.permission.HARDWARE_ABSTRACTION_ACCESS);
+ }
+ }
+
+ @Override
public void onStart() {
if (ThermalMonitor.isSupported()) {
ThermalMonitor.initialize(this);
diff --git a/cm/res/AndroidManifest.xml b/cm/res/AndroidManifest.xml
index 63354ef..b301559 100644
--- a/cm/res/AndroidManifest.xml
+++ b/cm/res/AndroidManifest.xml
@@ -23,6 +23,7 @@
android:sharedUserLabel="@string/cyanogenmod_system_label">
<protected-broadcast android:name="cyanogenmod.intent.action.SCREEN_CAMERA_GESTURE" />
+ <protected-broadcast android:name="cyanogenmod.intent.action.INITIALIZE_CM_HARDWARE" />
<!-- Must be required by an, to ensure that only the system can bind to it.
@hide -->