OSDN Git Service

Consider the last inserted SIM for EmergencyAffordance
authorRuthwar Kumar Ambeer <ruthwar@codeaurora.org>
Tue, 4 Apr 2017 15:58:25 +0000 (21:28 +0530)
committerSelim Cinek <cinek@google.com>
Tue, 23 May 2017 20:58:31 +0000 (13:58 -0700)
If India Sim is inserted and removed in Airplane mode
and reboot, The device is supposed to consider the
previous status based on the last inserted SIM as
there wont be any cell info update in Airplane mode.

Rootcause is when there are no active subscription
list right from the bootup, EmergencyAffordance global
variable is not updated with the settings based on
previous boot.

Fix is to update the EmergencyAffordance even when
there are no active subscriptions available from
bootup.

Test: manual, see repro steps on bug
Fixes: 36978415
Merged-In: I072cb635eb57c63dd94bf8f0a0b6222e22fdfbb7
Change-Id: I072cb635eb57c63dd94bf8f0a0b6222e22fdfbb7

services/core/java/com/android/server/emergency/EmergencyAffordanceService.java

index 98771df..a91fe77 100644 (file)
@@ -219,6 +219,7 @@ public class EmergencyAffordanceService extends SystemService {
         List<SubscriptionInfo> activeSubscriptionInfoList =
                 mSubscriptionManager.getActiveSubscriptionInfoList();
         if (activeSubscriptionInfoList == null) {
+            setSimNeedsEmergencyAffordance(neededNow);
             return neededNow;
         }
         for (SubscriptionInfo info : activeSubscriptionInfoList) {