From 3d465761d7bc81a763827bf80ac054b67a931ab5 Mon Sep 17 00:00:00 2001 From: Ruthwar Kumar Ambeer Date: Tue, 4 Apr 2017 21:28:25 +0530 Subject: [PATCH] Consider the last inserted SIM for EmergencyAffordance 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 --- .../com/android/server/emergency/EmergencyAffordanceService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java index 98771dfa1f335..a91fe773a5cfc 100644 --- a/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java +++ b/services/core/java/com/android/server/emergency/EmergencyAffordanceService.java @@ -219,6 +219,7 @@ public class EmergencyAffordanceService extends SystemService { List activeSubscriptionInfoList = mSubscriptionManager.getActiveSubscriptionInfoList(); if (activeSubscriptionInfoList == null) { + setSimNeedsEmergencyAffordance(neededNow); return neededNow; } for (SubscriptionInfo info : activeSubscriptionInfoList) {