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: Iee34849a149929938d1f7c0fc09ced94899801fe
diff --git a/src/com/android/phone/EmergencyCallbackModeExitDialog.java b/src/com/android/phone/EmergencyCallbackModeExitDialog.java
index 1210627..591f435 100644
--- a/src/com/android/phone/EmergencyCallbackModeExitDialog.java
+++ b/src/com/android/phone/EmergencyCallbackModeExitDialog.java
@@ -190,7 +190,7 @@
* Shows Emergency Callback Mode dialog and starts countdown timer
*/
private void showEmergencyCallbackModeExitDialog() {
- if (!mIsResumed) {
+ if (isDestroyed()) {
Log.w(TAG, "Tried to show dialog, but activity was already finished");
return;
}