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

Commit 6534632e authored by sangyun's avatar sangyun Committed by Sangyun Yun
Browse files

Reload allowed networks from db after restore content.

Since the allowed networks in db has changed after restoring the
enable 2g in allowed network type reasons, Added to reload based
on the allowed networks from db.

Bug: 314734614
Test: atest com.android.providers.telephony.TelephonyProviderTest
Test: tested manually with Pixel7, backup, factory reset and restored.
Test: basic telephony test call/data/networksetting
Change-Id: I04fea97d0f1cd17498d61821004c50806b357733
parent 92d71932
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -1565,6 +1565,10 @@ public class SubscriptionManagerService extends ISub.Stub {
                            SubscriptionManager.RESTORE_SIM_SPECIFIC_SETTINGS_DATABASE_UPDATED)) {
                        logl("Sim specific settings changed the database.");
                        mSubscriptionDatabaseManager.reloadDatabaseSync();
                        if (mFeatureFlags.backupAndRestoreForEnable2g()) {
                            PhoneFactory.getPhone(phoneId)
                                    .loadAllowedNetworksFromSubscriptionDatabase();
                        }
                    }
                }

@@ -4247,6 +4251,10 @@ public class SubscriptionManagerService extends ISub.Stub {
                    SubscriptionManager.RESTORE_SIM_SPECIFIC_SETTINGS_DATABASE_UPDATED)) {
                logl("Sim specific settings changed the database.");
                mSubscriptionDatabaseManager.reloadDatabaseSync();
                if (mFeatureFlags.backupAndRestoreForEnable2g()) {
                    Arrays.stream(PhoneFactory.getPhones())
                            .forEach(Phone::loadAllowedNetworksFromSubscriptionDatabase);
                }
            }
        } finally {
            Binder.restoreCallingIdentity(token);