From 54cce22be45ffe717b89a9847bac810e29e0ee71 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 24 Sep 2024 15:12:46 -0400 Subject: [PATCH] Support android API 34 --- .../src/main/kotlin/net/defined/mobile_nebula/MainActivity.kt | 2 +- .../main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/android/app/src/main/kotlin/net/defined/mobile_nebula/MainActivity.kt b/android/app/src/main/kotlin/net/defined/mobile_nebula/MainActivity.kt index dd83799..65a496e 100644 --- a/android/app/src/main/kotlin/net/defined/mobile_nebula/MainActivity.kt +++ b/android/app/src/main/kotlin/net/defined/mobile_nebula/MainActivity.kt @@ -98,7 +98,7 @@ class MainActivity: FlutterActivity() { apiClient = APIClient(context) - registerReceiver(refreshReceiver, IntentFilter(ACTION_REFRESH_SITES)) + registerReceiver(refreshReceiver, IntentFilter(ACTION_REFRESH_SITES), RECEIVER_NOT_EXPORTED) enqueueDNUpdater() } diff --git a/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt b/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt index 620b46a..e758059 100644 --- a/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt +++ b/android/app/src/main/kotlin/net/defined/mobile_nebula/NebulaVpnService.kt @@ -209,11 +209,11 @@ class NebulaVpnService : VpnService() { } } - registerReceiver(receiver, IntentFilter(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED)) + registerReceiver(receiver, IntentFilter(PowerManager.ACTION_DEVICE_IDLE_MODE_CHANGED), RECEIVER_EXPORTED) } private fun registerReloadReceiver() { - registerReceiver(reloadReceiver, IntentFilter(ACTION_RELOAD)) + registerReceiver(reloadReceiver, IntentFilter(ACTION_RELOAD), RECEIVER_NOT_EXPORTED) } private fun unregisterReloadReceiver() {