Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add android:exported to AndroidManifest.xml per Android 12's requirements #1362

Merged
merged 2 commits into from
Jun 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Examples/OneSignalDemo/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@

<receiver
android:name="com.onesignal.ADMMessageHandler$Receiver"
android:permission="com.amazon.device.messaging.permission.SEND" >
android:permission="com.amazon.device.messaging.permission.SEND"
android:exported="true">

<!-- To interact with ADM, your app must listen for the following intents. -->
<intent-filter>
Expand All @@ -64,7 +65,9 @@
<meta-data android:name="com.onesignal.NotificationServiceExtension"
android:value="com.onesignal.sdktest.notification.NotificationServiceExtension" />

<activity android:name=".activity.SplashActivity">
<activity
android:name=".activity.SplashActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Expand Down
3 changes: 2 additions & 1 deletion OneSignalSDK/onesignal/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

<receiver
android:name="com.onesignal.FCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
android:permission="com.google.android.c2dm.permission.SEND"
android:exported="true">
<!-- High priority so OneSignal payloads can be filtered from other FCM receivers -->
<intent-filter android:priority="999" >
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
Expand Down
43 changes: 30 additions & 13 deletions OneSignalSDK/onesignal/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,43 +74,59 @@
<activity
android:name="com.onesignal.NotificationOpenedActivityHMS"
android:noHistory="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar">
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>

<service android:name="com.onesignal.FCMIntentService" />
<service
android:name="com.onesignal.FCMIntentService"
android:exported="false" />

<service android:name="com.onesignal.FCMIntentJobService"
android:permission="android.permission.BIND_JOB_SERVICE"/>
<service
android:name="com.onesignal.FCMIntentJobService"
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false" />

<service
android:name="com.onesignal.FocusDelaySyncService"
android:stopWithTask="true" />
android:stopWithTask="true"
android:exported="false"/>
<service
android:name="com.onesignal.FocusDelaySyncJobService"
android:permission="android.permission.BIND_JOB_SERVICE" />
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false" />

<service
android:name="com.onesignal.SyncService"
android:stopWithTask="true" />
android:stopWithTask="true"
android:exported="false" />
<service
android:name="com.onesignal.SyncJobService"
android:permission="android.permission.BIND_JOB_SERVICE" />
android:permission="android.permission.BIND_JOB_SERVICE"
android:exported="false" />

<activity android:name="com.onesignal.PermissionsActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="false" />

<receiver android:name="com.onesignal.NotificationDismissReceiver" />
<receiver
android:name="com.onesignal.NotificationDismissReceiver"
android:exported="true"/>

<receiver android:name="com.onesignal.BootUpReceiver">
<receiver
android:name="com.onesignal.BootUpReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
<receiver android:name="com.onesignal.UpgradeReceiver" >
<receiver
android:name="com.onesignal.UpgradeReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
</intent-filter>
Expand All @@ -119,7 +135,8 @@
<activity
android:name="com.onesignal.NotificationOpenedReceiver"
android:noHistory="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="true" />

</application>

Expand Down
3 changes: 2 additions & 1 deletion OneSignalSDK/onesignal/src/release/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@

<receiver
android:name="com.onesignal.FCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
android:permission="com.google.android.c2dm.permission.SEND"
android:exported="true">
<!-- High priority so OneSignal payloads can be filtered from other FCM receivers -->
<intent-filter android:priority="999" >
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
Expand Down