From 560203ac0c834d1e1c2e21c10b9e2680c7dd2cee Mon Sep 17 00:00:00 2001 From: Josh Kasten Date: Wed, 16 Jun 2021 21:50:46 -0700 Subject: [PATCH 1/2] Add android:exported required by Android 12 to SDK * All components in AndroidManifest.xml that have intent-filters now requires the `android:exported` attribute. - See Android's Documentation on this: - https://developer.android.com/about/versions/12/behavior-changes-12#exported * Also added exported attribute to other components for consistently --- .../onesignal/src/debug/AndroidManifest.xml | 3 +- .../onesignal/src/main/AndroidManifest.xml | 43 +++++++++++++------ .../onesignal/src/release/AndroidManifest.xml | 3 +- 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/OneSignalSDK/onesignal/src/debug/AndroidManifest.xml b/OneSignalSDK/onesignal/src/debug/AndroidManifest.xml index d9d67149cc..420ebfb322 100644 --- a/OneSignalSDK/onesignal/src/debug/AndroidManifest.xml +++ b/OneSignalSDK/onesignal/src/debug/AndroidManifest.xml @@ -9,7 +9,8 @@ + android:permission="com.google.android.c2dm.permission.SEND" + android:exported="true"> diff --git a/OneSignalSDK/onesignal/src/main/AndroidManifest.xml b/OneSignalSDK/onesignal/src/main/AndroidManifest.xml index e61472397f..ed445b01d1 100644 --- a/OneSignalSDK/onesignal/src/main/AndroidManifest.xml +++ b/OneSignalSDK/onesignal/src/main/AndroidManifest.xml @@ -74,43 +74,59 @@ + android:theme="@android:style/Theme.Translucent.NoTitleBar" + android:exported="true"> - + - + + android:stopWithTask="true" + android:exported="false"/> + android:permission="android.permission.BIND_JOB_SERVICE" + android:exported="false" /> + android:stopWithTask="true" + android:exported="false" /> + android:permission="android.permission.BIND_JOB_SERVICE" + android:exported="false" /> + android:theme="@android:style/Theme.Translucent.NoTitleBar" + android:exported="false" /> - + - + - + @@ -119,7 +135,8 @@ + android:theme="@android:style/Theme.Translucent.NoTitleBar" + android:exported="true" /> diff --git a/OneSignalSDK/onesignal/src/release/AndroidManifest.xml b/OneSignalSDK/onesignal/src/release/AndroidManifest.xml index d9d67149cc..420ebfb322 100644 --- a/OneSignalSDK/onesignal/src/release/AndroidManifest.xml +++ b/OneSignalSDK/onesignal/src/release/AndroidManifest.xml @@ -9,7 +9,8 @@ + android:permission="com.google.android.c2dm.permission.SEND" + android:exported="true"> From 7c08e873ba09096067ec8dac814bd5ce5158490f Mon Sep 17 00:00:00 2001 From: Josh Kasten Date: Wed, 16 Jun 2021 21:59:15 -0700 Subject: [PATCH 2/2] Android 12 required exported flag to example app * Same as the last commit in this PR but for the example app --- Examples/OneSignalDemo/app/src/main/AndroidManifest.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Examples/OneSignalDemo/app/src/main/AndroidManifest.xml b/Examples/OneSignalDemo/app/src/main/AndroidManifest.xml index 36fbf1dec8..03ae90f836 100644 --- a/Examples/OneSignalDemo/app/src/main/AndroidManifest.xml +++ b/Examples/OneSignalDemo/app/src/main/AndroidManifest.xml @@ -49,7 +49,8 @@ + android:permission="com.amazon.device.messaging.permission.SEND" + android:exported="true"> @@ -64,7 +65,9 @@ - +