Set AppErrorDialog result during dismissal if it isn't already set

The system watch dog was triggering because all binder threads were
waiting for AppErrorResult#set() to be called which never happened.
One situation where this can occur is if a process continues to crash
and the activity manager marks the process as bad there by causing it
to kill the process immediately which causes a binder death
notification that automatically dismisses the app error dialog before
the user ACKs it.
We now set the result during dialog dismissal if it isn't already set.

Bug: 22141958
Change-Id: If3ac116df5e29c6fba43ee556a859ad3c84c66f3
diff --git a/services/core/java/com/android/server/am/AppErrorDialog.java b/services/core/java/com/android/server/am/AppErrorDialog.java
index 098b0b6..c8fb351 100644
--- a/services/core/java/com/android/server/am/AppErrorDialog.java
+++ b/services/core/java/com/android/server/am/AppErrorDialog.java
@@ -102,4 +102,13 @@
             dismiss();
         }
     };
+
+    @Override
+    public void dismiss() {
+        if (!mResult.mHasResult) {
+            // We are dismissing and the result has not been set...go ahead and set.
+            mResult.set(FORCE_QUIT);
+        }
+        super.dismiss();
+    }
 }