From 0b26ad3b112ff399aa9627d7e6a252080a46f319 Mon Sep 17 00:00:00 2001 From: Nancy Chen Date: Mon, 18 Aug 2014 20:35:00 -0700 Subject: Circle reveal for account selection dialog and check for valid account. Touch animation reveal should happen from where the user touches the screen. This change deals only with the account selection dialog case (and should be the last one). Also if phoneAccountSelected in TelecommAdapter is called with an empty accountHandle, log an error. Bug: 17124195 Change-Id: I381ec7e377ee3be981c4e8b63b5253d75561b6bf --- res/layout/select_account_list_item.xml | 5 +++-- src/com/android/incallui/InCallActivity.java | 22 ++++++++++++++-------- src/com/android/incallui/TelecommAdapter.java | 4 ++++ 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/res/layout/select_account_list_item.xml b/res/layout/select_account_list_item.xml index 0b24c9b9..3759e3e9 100644 --- a/res/layout/select_account_list_item.xml +++ b/res/layout/select_account_list_item.xml @@ -15,7 +15,8 @@ --> - - + diff --git a/src/com/android/incallui/InCallActivity.java b/src/com/android/incallui/InCallActivity.java index cbb2af28..02635dcc 100644 --- a/src/com/android/incallui/InCallActivity.java +++ b/src/com/android/incallui/InCallActivity.java @@ -454,14 +454,20 @@ public class InCallActivity extends Activity { intent.removeExtra(NEW_OUTGOING_CALL); Point touchPoint = null; - Call call = CallList.getInstance().getOutgoingCall(); - if (call == null) { - call = CallList.getInstance().getPendingOutgoingCall(); - } - if (call != null) { - Bundle extras = call.getTelecommCall().getDetails().getExtras(); - touchPoint = (Point) (extras == null ? - null : extras.getParcelable(TouchPointManager.TOUCH_POINT)); + if (TouchPointManager.getInstance().hasValidPoint()) { + // Use the most immediate touch point in the InCallUi if available + touchPoint = TouchPointManager.getInstance().getPoint(); + } else { + // Otherwise retrieve the touch point from the call intent + Call call = CallList.getInstance().getOutgoingCall(); + if (call == null) { + call = CallList.getInstance().getPendingOutgoingCall(); + } + if (call != null) { + Bundle extras = call.getTelecommCall().getDetails().getExtras(); + touchPoint = (Point) (extras == null ? + null : extras.getParcelable(TouchPointManager.TOUCH_POINT)); + } } mCallCardFragment.animateForNewOutgoingCall(touchPoint); } diff --git a/src/com/android/incallui/TelecommAdapter.java b/src/com/android/incallui/TelecommAdapter.java index 22aff11a..1f5c9c59 100644 --- a/src/com/android/incallui/TelecommAdapter.java +++ b/src/com/android/incallui/TelecommAdapter.java @@ -220,5 +220,9 @@ final class TelecommAdapter implements InCallPhoneListener { } else { Log.e(this, "error phoneAccountSelected, mAdapter is null"); } + + if (accountHandle == null) { + Log.e(this, "error phoneAccountSelected, accountHandle is null"); + } } } -- cgit v1.2.3