Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Make SMS/MMS providers singletons across users
Browse files Browse the repository at this point in the history
Share the SMS and MMS logs across all users.
Move the apk to system/priv-app to let PackageManager
allow it to export singleton providers.

Bug: 16681533
Change-Id: I3f41da7c5e099e42ea531ea8b31be42be9a3a24a
  • Loading branch information
Amith Yamasani committed Aug 11, 2014
1 parent 82fc72b commit 2053d2e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ include $(CLEAR_VARS)

LOCAL_MODULE_TAGS := optional

LOCAL_PRIVILEGED_MODULE := true

LOCAL_SRC_FILES := $(call all-subdir-java-files)

LOCAL_PACKAGE_NAME := TelephonyProvider
Expand Down
12 changes: 12 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,39 @@
android:exported="true"
android:multiprocess="false" />

<!-- This is a singleton provider that is used by all users.
A new instance is not created for each user. And the db is shared
as well. -->
<provider android:name="SmsProvider"
android:authorities="sms"
android:multiprocess="false"
android:exported="true"
android:singleUser="true"
android:readPermission="android.permission.READ_SMS"
android:writePermission="android.permission.WRITE_SMS" />

<!-- This is a singleton provider that is used by all users.
A new instance is not created for each user. And the db is shared
as well. -->
<provider android:name="MmsProvider"
android:authorities="mms"
android:multiprocess="false"
android:exported="true"
android:singleUser="true"
android:readPermission="android.permission.READ_SMS"
android:writePermission="android.permission.WRITE_SMS">
<grant-uri-permission android:pathPrefix="/part/" />
<grant-uri-permission android:pathPrefix="/drm/" />
</provider>

<!-- This is a singleton provider that is used by all users.
A new instance is not created for each user. And the db is shared
as well. -->
<provider android:name="MmsSmsProvider"
android:authorities="mms-sms"
android:multiprocess="false"
android:exported="true"
android:singleUser="true"
android:readPermission="android.permission.READ_SMS"
android:writePermission="android.permission.WRITE_SMS" />
</application>
Expand Down

0 comments on commit 2053d2e

Please sign in to comment.