summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2014-08-15 11:47:07 -0700
committerYorke Lee <yorkelee@google.com>2014-08-15 11:47:07 -0700
commita920437f6af7b49669518d6e145ca444c6870560 (patch)
tree70726687a6f8056fd6045d1b5200ae4b9ff700e9
parentd3bbf5e13fe245fd178106c006225b975be0bcef (diff)
Fix NPE in InCallUI
If there is no call for some reason, just ignore the touch point. Bug: 17065151 Change-Id: Ib208e08465cf8247d3fded6df323c66ccf7778d8
-rw-r--r--InCallUI/src/com/android/incallui/CallCardFragment.java2
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java12
2 files changed, 8 insertions, 6 deletions
diff --git a/InCallUI/src/com/android/incallui/CallCardFragment.java b/InCallUI/src/com/android/incallui/CallCardFragment.java
index 6127a1d99..be9b18dec 100644
--- a/InCallUI/src/com/android/incallui/CallCardFragment.java
+++ b/InCallUI/src/com/android/incallui/CallCardFragment.java
@@ -814,7 +814,7 @@ public class CallCardFragment extends BaseFragment<CallCardPresenter, CallCardPr
}
}
- public void animateForNewOutgoingCall(Point touchPoint, Call call) {
+ public void animateForNewOutgoingCall(Point touchPoint) {
final ViewGroup parent = (ViewGroup) mPrimaryCallCardContainer.getParent();
final Point startPoint = touchPoint;
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index 03ccf157f..c3dc72757 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -453,15 +453,17 @@ public class InCallActivity extends Activity {
if (intent.getBooleanExtra(NEW_OUTGOING_CALL, false)) {
intent.removeExtra(NEW_OUTGOING_CALL);
+ Point touchPoint = null;
Call call = CallList.getInstance().getOutgoingCall();
if (call == null) {
call = CallList.getInstance().getPendingOutgoingCall();
}
-
- Bundle extras = call.getTelecommCall().getDetails().getExtras();
- Point touchPoint = (Point) (extras == null?
- null : extras.getParcelable(TouchPointManager.TOUCH_POINT));
- mCallCardFragment.animateForNewOutgoingCall(touchPoint, call);
+ if (call != null) {
+ Bundle extras = call.getTelecommCall().getDetails().getExtras();
+ touchPoint = (Point) (extras == null ?
+ null : extras.getParcelable(TouchPointManager.TOUCH_POINT));
+ }
+ mCallCardFragment.animateForNewOutgoingCall(touchPoint);
}
if (CallList.getInstance().getWaitingForAccountCall() != null) {