[DO NOT MERGE] Fix the ECBM dialog is not shown issue
When click the ECBM notification under lock screen mode, there is the
chance that the activity fails to show ECBM dialog when the current
activity state is not in onResume
Bug: 150736577
Test: 1.Verify the ECBM dialog can be shown when click in the
notification.
2.Verify the ECBM dialog can be shown when click in lock screen
mode.
Change-Id: If2c67a9f42fa7fdcc735385798bad5c5f917b9ae
diff --git a/src/com/android/phone/EmergencyCallbackModeExitDialog.java b/src/com/android/phone/EmergencyCallbackModeExitDialog.java
index 2492f46..e602b34 100644
--- a/src/com/android/phone/EmergencyCallbackModeExitDialog.java
+++ b/src/com/android/phone/EmergencyCallbackModeExitDialog.java
@@ -176,7 +176,7 @@
* Shows Emergency Callback Mode dialog and starts countdown timer
*/
private void showEmergencyCallbackModeExitDialog() {
- if (!this.isResumed()) {
+ if (this.isDestroyed()) {
Log.w(TAG, "Tried to show dialog, but activity was already finished");
return;
}