summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNancy Chen <nancychen@google.com>2014-08-18 20:35:00 -0700
committerNancy Chen <nancychen@google.com>2014-08-20 10:51:29 -0700
commit5edb613e89236f8a10e99533a67b5c2006749dcb (patch)
tree7e5c974bdf0fa517ee5fc93d25f8e4d6959e95ac
parentc44f654b992c6ab8a4acff9cb5aa2678c58755d9 (diff)
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
-rw-r--r--InCallUI/res/layout/select_account_list_item.xml5
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java22
-rw-r--r--InCallUI/src/com/android/incallui/TelecommAdapter.java4
3 files changed, 21 insertions, 10 deletions
diff --git a/InCallUI/res/layout/select_account_list_item.xml b/InCallUI/res/layout/select_account_list_item.xml
index 0b24c9b9f..3759e3e9a 100644
--- a/InCallUI/res/layout/select_account_list_item.xml
+++ b/InCallUI/res/layout/select_account_list_item.xml
@@ -15,7 +15,8 @@
-->
<!-- Layout of a single item in the InCallUI Account Chooser Dialog. -->
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<view class="com.android.contacts.common.widget.ActivityTouchLinearLayout"
+ xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -33,4 +34,4 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent" />
-</LinearLayout>
+</view>
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index cbb2af280..02635dccc 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/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/InCallUI/src/com/android/incallui/TelecommAdapter.java b/InCallUI/src/com/android/incallui/TelecommAdapter.java
index 22aff11a9..1f5c9c59b 100644
--- a/InCallUI/src/com/android/incallui/TelecommAdapter.java
+++ b/InCallUI/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");
+ }
}
}