Prevent network depersonalization dialog from showing multiple instances.
The EVENT_SIM_NETWORK_LOCKED event in Telephony triggers displaying the
depersonalization dialog. It appears, however, that there are instances
when the EVENT_SIM_NETWORK_LOCKED event gets triggered multiple times,
resulting in multiple stacked dialogs being shown.
Added singleton code into the dialog to ensure only a single instance can
be opened at the same time.
Bug: 22963631
Change-Id: Ib43b34acdc9da7dcf4b1cfc4c37ba30b10d16cad
diff --git a/src/com/android/phone/PhoneGlobals.java b/src/com/android/phone/PhoneGlobals.java
index 315929b..fc08c5f 100644
--- a/src/com/android/phone/PhoneGlobals.java
+++ b/src/com/android/phone/PhoneGlobals.java
@@ -250,9 +250,7 @@
// The user won't be able to do anything else until
// they enter a valid SIM network PIN.
Log.i(LOG_TAG, "show sim depersonal panel");
- IccNetworkDepersonalizationPanel ndpPanel =
- new IccNetworkDepersonalizationPanel(PhoneGlobals.getInstance());
- ndpPanel.show();
+ IccNetworkDepersonalizationPanel.showDialog();
}
break;