Show call ended if call disconnects while dialpad is showing

Bug: 10899209
Change-Id: Iefdef1890f8968fda57eb5f3286b97228906b596
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index 08766d2..32d1f55 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -370,6 +370,14 @@
         toast.show();
     }
 
+    /**
+     * Simulates a user click to hide the dialpad. This will update the UI to show the call card,
+     * update the checked state of the dialpad button, and update the proximity sensor state.
+     */
+    public void hideDialpadForDisconnect() {
+        mCallButtonFragment.displayDialpad(false);
+    }
+
     public void displayDialpad(boolean showDialpad) {
         if (showDialpad) {
             mDialpadFragment.setVisible(true);
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index 499dea0..541661c 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -246,6 +246,7 @@
      */
     @Override
     public void onDisconnect(Call call) {
+        mInCallActivity.hideDialpadForDisconnect();
         maybeShowErrorDialogOnDisconnect(call);
 
         // We need to do the run the same code as onCallListChange.