skip notify descendent for SubscriptionManager.CONTENT_URI
Bug: 112700925
Test: manual test
Change-Id: I5c4a5b09d2a770d5029bfa42452e1d4854e66e4f
diff --git a/src/com/android/providers/telephony/TelephonyProvider.java b/src/com/android/providers/telephony/TelephonyProvider.java
index fffd78c..725e029 100644
--- a/src/com/android/providers/telephony/TelephonyProvider.java
+++ b/src/com/android/providers/telephony/TelephonyProvider.java
@@ -69,6 +69,7 @@
import android.content.ComponentName;
import android.content.ContentProvider;
+import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
@@ -3284,8 +3285,14 @@
SubscriptionManager.ENHANCED_4G_ENABLED_CONTENT_URI, "" + subId);
// intentional fall through from above case
case URL_SIMINFO:
+ // skip notifying descendant URLs to avoid unneccessary wake up.
+ // If not set, any change to SIMINFO will notify observers which listens to
+ // specific field of SIMINFO.
getContext().getContentResolver().notifyChange(
- SubscriptionManager.CONTENT_URI, null, true, UserHandle.USER_ALL);
+ SubscriptionManager.CONTENT_URI, null,
+ ContentResolver.NOTIFY_SYNC_TO_NETWORK
+ | ContentResolver.NOTIFY_SKIP_NOTIFY_FOR_DESCENDANTS,
+ UserHandle.USER_ALL);
// notify observers on specific user settings changes.
if (values.containsKey(SubscriptionManager.WFC_IMS_ENABLED)) {
getContext().getContentResolver().notifyChange(