Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78fc83e5 authored by Jack Yu's avatar Jack Yu
Browse files

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

Merged-In: Ib818110a1f03536ed9082e779b3cc89e56608084
Change-Id: Ib818110a1f03536ed9082e779b3cc89e56608084
parent da9d0c74
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -150,6 +150,15 @@ public class SubscriptionManager {
    public static final String RESTORE_SIM_SPECIFIC_SETTINGS_METHOD_NAME =
            "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