From 75e3e041fb63ea000c555505c4066e68f29112fb Mon Sep 17 00:00:00 2001 From: Amit Mahajan Date: Mon, 22 Oct 2018 10:43:34 -0700 Subject: Adding new intent ACTION_SMS_MMS_DB_CREATED. Test: manual (verified from logcat that intent is broadcast) Bug: 115990430 Merged-in: I660cf2d04a1b57a58c8cefd212e5f8d73b329890 Change-Id: I660cf2d04a1b57a58c8cefd212e5f8d73b329890 (cherry picked from commit 8c1c45a710a4955b0add308c8c640f9c61a7db31) (cherry picked from commit 1b26e44ce0792eda6b9bb2fa6b273842a8bf8ae3) --- core/res/AndroidManifest.xml | 1 + telephony/java/android/provider/Telephony.java | 27 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml index cda1293e93c7..8cadd8c332cf 100644 --- a/core/res/AndroidManifest.xml +++ b/core/res/AndroidManifest.xml @@ -399,6 +399,7 @@ + diff --git a/telephony/java/android/provider/Telephony.java b/telephony/java/android/provider/Telephony.java index f2438b833d90..d6814f918f58 100644 --- a/telephony/java/android/provider/Telephony.java +++ b/telephony/java/android/provider/Telephony.java @@ -1150,6 +1150,33 @@ public final class Telephony { public static final String ACTION_EXTERNAL_PROVIDER_CHANGE = "android.provider.action.EXTERNAL_PROVIDER_CHANGE"; + /** + * Broadcast action: When SMS-MMS db is being created. If file-based encryption is + * supported, this broadcast indicates creation of the db in credential-encrypted + * storage. A boolean is specified in {@link #EXTRA_IS_INITIAL_CREATE} to indicate if + * this is the initial create of the db. Requires + * {@link android.Manifest.permission#READ_SMS} to receive. + * + * @see #EXTRA_IS_INITIAL_CREATE + * + * @hide + */ + @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION) + public static final String ACTION_SMS_MMS_DB_CREATED = + "android.provider.action.SMS_MMS_DB_CREATED"; + + /** + * Boolean flag passed as an extra with {@link #ACTION_SMS_MMS_DB_CREATED} to indicate + * whether the DB creation is the initial creation on the device, that is it is after a + * factory-data reset or a new device. Any subsequent creations of the DB (which + * happens only in error scenarios) will have this flag set to false. + * + * @see #ACTION_SMS_MMS_DB_CREATED + * + * @hide + */ + public static final String EXTRA_IS_INITIAL_CREATE = + "android.provider.extra.IS_INITIAL_CREATE"; /** * Read the PDUs out of an {@link #SMS_RECEIVED_ACTION} or a * {@link #DATA_SMS_RECEIVED_ACTION} intent. -- cgit v1.2.3