diff options
author | Jack Yu <jackyu@google.com> | 2023-07-18 19:33:58 -0700 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-08-08 03:26:03 +0000 |
commit | 7ff996252608617db120f3a917ed454fdbd83a9a (patch) | |
tree | d57944a1f0bff14e580ba210513091a65f52ed46 | |
parent | cc197a8eac85c047dc3234d2b2d22fa7b5113c10 (diff) | |
download | base-7ff996252608617db120f3a917ed454fdbd83a9a.tar.gz |
Fixed subscription database cache out of sync
The subscription reloading from database could cause cache
to be out-of-sync. Fixed by making reloading synchronous and
only reload when necessary (e.g. Backup restore actually changes
the database).
Fix: 290295550
Fix: 290176403
Test: atest SubscriptionManagerServiceTest TelephonyProviderTests
Test: Manually test backup/restore
Test: Telephony basic functionality tests
Test: Re-tested passed on b/290295550#comment23
Test: Re-tested passed on b/290176403#comment28
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:78fc83e5a683d31a9aeee57a1543e500b9435896)
Merged-In: Ib818110a1f03536ed9082e779b3cc89e56608084
Change-Id: Ib818110a1f03536ed9082e779b3cc89e56608084
-rw-r--r-- | telephony/java/android/telephony/SubscriptionManager.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/telephony/java/android/telephony/SubscriptionManager.java b/telephony/java/android/telephony/SubscriptionManager.java index 64e43568e4d6..8e4ec0914563 100644 --- a/telephony/java/android/telephony/SubscriptionManager.java +++ b/telephony/java/android/telephony/SubscriptionManager.java @@ -151,6 +151,15 @@ public class SubscriptionManager { "restoreSimSpecificSettings"; /** + * The key of the boolean flag indicating whether restoring subscriptions actually changes + * the subscription database or not. + * + * @hide + */ + public static final String RESTORE_SIM_SPECIFIC_SETTINGS_DATABASE_UPDATED = + "restoreSimSpecificSettingsDatabaseUpdated"; + + /** * Key to the backup & restore data byte array in the Bundle that is returned by {@link * #getAllSimSpecificSettingsForBackup()} or to be pass in to {@link * #restoreAllSimSpecificSettingsFromBackup(byte[])}. |