@@ -42,6 +42,18 @@ Loader {
4242 if (menuData.type !== undefined) {
4343 var component = _map[menuData.type];
4444 if (component !== undefined) {
45+ if (component === pinLock && shell.hasLockedApp) {
46+ // In case we are in emergency mode, just skip this unlock.
47+ // Happens with two locked SIMs but the user clicks
48+ // Emergency Call on the first unlock dialog.
49+ // TODO: if we ever allow showing the indicators in
50+ // emergency mode, we'll need to differentiate between
51+ // user-initiated ones which we *do* want to show and the
52+ // dialogs that appear on boot, which we don't. But for
53+ // now we can get away with skipping all such dialogs.
54+ menuModel.activate(menuIndex, false);
55+ return null;
56+ }
4557 return component;
4658 }
4759 }
@@ -144,8 +156,8 @@ Loader {
144156 }
145157
146158 onEmergencyCall: {
147− shell.activateApplication("dialer-app")
148− menuModel.activate(menuIndex, false)
159+ shell.startLockedApp("dialer-app");
160+ menuModel.activate(menuIndex, false);
149161 }
150162
151163 property var extendedData: menuData && menuData.ext || undefined