Messaging: Fix handling of default SMS app

Use RoleManager to Launch the correct activity and check the default app
Get rid of deprecated methods used here to do the same
Also add queries in manifest to allow the former method to work as well

Change-Id: I4702aaa4b35a994e225e63534da8fb4975b9717a
This commit is contained in:
Ido Ben-Hur
2024-10-03 18:55:56 +03:00
committed by Michael Bestas
parent d8a0bf022d
commit 96ef363da8
4 changed files with 18 additions and 16 deletions

View File

@@ -56,6 +56,13 @@
<uses-feature android:name="android.hardware.microphone" android:required="false" />
<uses-feature android:name="android.hardware.screen.portrait" android:required="false" />
<queries>
<intent>
<action android:name="android.intent.action.SENDTO"/>
<data android:scheme="smsto" android:host="*" />
</intent>
</queries>
<application
android:name="com.android.messaging.BugleApplication"
android:allowBackup="false"
@@ -390,6 +397,7 @@
android:permission="android.permission.BROADCAST_SMS">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_DELIVER" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</receiver>