diff --git a/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/Lamp.kt b/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/Lamp.kt index ed4b5e2..1206369 100644 --- a/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/Lamp.kt +++ b/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/Lamp.kt @@ -35,7 +35,7 @@ class Lamp : Service() { val foreground = IntentFilter() foreground.addAction(ACTION_LAMP_PRIORITY_FOREGROUND) foreground.addAction(ACTION_LAMP_PRIORITY_BACKGROUND) - registerReceiver(foregroundMgr, foreground) + registerReceiver(foregroundMgr, foreground, RECEIVER_EXPORTED) if (Environment.getExternalStorageState() != Environment.MEDIA_MOUNTED) { stopSelf() return diff --git a/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/Screen.kt b/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/Screen.kt index 5bbafea..9cb02c0 100644 --- a/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/Screen.kt +++ b/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/Screen.kt @@ -83,7 +83,7 @@ class Screen : Service() { filter.addAction(Intent.ACTION_SCREEN_OFF) filter.addAction(Intent.ACTION_USER_PRESENT) filter.addAction(ACTION_LAMP_SCREEN_BOOT) - registerReceiver(screenMonitor, filter) + registerReceiver(screenMonitor, filter, RECEIVER_EXPORTED) val pm = getSystemService(POWER_SERVICE) as PowerManager val km = getSystemService(KEYGUARD_SERVICE) as KeyguardManager if (pm.isInteractive) { diff --git a/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/TelephonySensor.kt b/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/TelephonySensor.kt index 19377ee..f9fe47b 100644 --- a/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/TelephonySensor.kt +++ b/lamp_kotlin/src/main/java/digital/lamp/lamp_kotlin/sensor_core/TelephonySensor.kt @@ -95,7 +95,7 @@ class TelephonySensor : Service() { phoneCallReceiver = PhonecallReceiver() val filter = IntentFilter() filter.addAction("android.intent.action.PHONE_STATE") - registerReceiver(phoneCallReceiver, filter) + registerReceiver(phoneCallReceiver, filter, RECEIVER_EXPORTED) } if (Lamp.DEBUG) Log.d(TAG, "Telephony service active...") return START_REDELIVER_INTENT