IMS-VT: Catch the exception when dismissing the zoom alert dialog
- When we dismiss the zoom alert dialog, any exception caused
  should not crash the phone process
- Catch any exception that occurs when dismissing the zoom alert
  dialog and log it instead of letting it crash phone process
Change-Id: I89b80e0bcf98385a6f71937e23417e61c117aa71
CRs-Fixed: 938992
diff --git a/src/com/android/incallui/InCallZoomController.java b/src/com/android/incallui/InCallZoomController.java
index b15319f..4c1b6fe 100644
--- a/src/com/android/incallui/InCallZoomController.java
+++ b/src/com/android/incallui/InCallZoomController.java
@@ -224,9 +224,15 @@
     }
 
     private void dismissAlertDialog() {
-        if (mAlertDialog != null) {
-            mAlertDialog.dismiss();
-            mAlertDialog = null;
+        try {
+            if (mAlertDialog != null) {
+                mAlertDialog.dismiss();
+                mAlertDialog = null;
+            }
+        } catch (Exception e) {
+            // Since exceptions caused in zoom control dialog should not crash the phone process,
+            // we intentionally capture the exception and ignore.
+            Log.e(this, "dismissAlertDialog: Exception: " + e);
         }
     }