summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorSantos Cordon <santoscordon@google.com>2013-09-30 11:36:24 -0700
committerSantos Cordon <santoscordon@google.com>2013-09-30 11:50:22 -0700
commit816e4c55053c41f61d45b0a379860d80a7df99cb (patch)
treef54aef2be9c53503fe06c0668f3a33ece29f1a32 /InCallUI
parente15ae4005972b4a1cd864bb4c2b57f3b70f67275 (diff)
Protect hideDialpad() code with isActivityStarted() check.
Could hit NPE if the activity was not up or already brought down like with Fixed Dial Number where a disconnect comes almost immediately after dialing out. bug:10995838 Change-Id: I150d1ca135702814ac6d78722c3ad15ae5273c83
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/InCallPresenter.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallPresenter.java b/InCallUI/src/com/android/incallui/InCallPresenter.java
index 541661c57..4b3893994 100644
--- a/InCallUI/src/com/android/incallui/InCallPresenter.java
+++ b/InCallUI/src/com/android/incallui/InCallPresenter.java
@@ -246,7 +246,7 @@ public class InCallPresenter implements CallList.Listener {
*/
@Override
public void onDisconnect(Call call) {
- mInCallActivity.hideDialpadForDisconnect();
+ hideDialpadForDisconnect();
maybeShowErrorDialogOnDisconnect(call);
// We need to do the run the same code as onCallListChange.
@@ -487,6 +487,15 @@ public class InCallPresenter implements CallList.Listener {
}
/**
+ * Hides the dialpad. Called when a call is disconnected (Requires hiding dialpad).
+ */
+ private void hideDialpadForDisconnect() {
+ if (isActivityStarted()) {
+ mInCallActivity.hideDialpadForDisconnect();
+ }
+ }
+
+ /**
* When the state of in-call changes, this is the first method to get called. It determines if
* the UI needs to be started or finished depending on the new state and does it.
*/