Add access control in sms/mms providers.
To support work profile feature, the following modifications are
performed:
- insert(): check if subId is passed as input, else use
SmsManager.getDefaultSubscriptionId as subId to insert message.
- query(): If calling user is associated with any subscriptions, then
return messages sent/received with the associated subscription. If
calling user is not associated with any subscription, then return
empty cursor.
- update()/delete(): If calling user is associated with any
subscriptions, then update/delete messages sent/received with that
subscription. If calling user is not associated with any subscription,
then return 0.
Bug: 250620312
Test: Manually sending/receiving SMS/MMS,
atest com.android.providers.telephony.SmsProviderTest,
atest com.android.providers.telephony.MmsProviderTest,
atest com.android.providers.telephony.ProviderUtilTest,
atest CtsTelephonyProviderTestCases,
atest CtsTelephonyTestCases
Change-Id: Ica97e1d48d783827e956e25a04ef5a17d6e916a8
1 file changed