From c0be1faf6fa10b7b4ab025012cdffd98a5be7148 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Fri, 11 Jul 2014 15:50:00 -0700 Subject: Show different glowpad options for incoming video call. - Refactor code be more flexibile/specific in specifying the targets for the glow pad; went from "n-way" labeling of different target sets to more explicit labeling of scenarios, such as "audio without sms". - Add target sets and cases for showing targest in AnswerFragment. - Added new drawable for the target to answer a video call. - Add method to GlowPadView to allow changing the handle (now it may be either a videocamera or phone icon, depending on the scenario). - Add a new video handle for incoming video calls. - TODO: Hook this up to show these glowpads if there is an incoming video call. - Deleted some unused resource files. Bug: 16015750 Change-Id: I77ff08f45f57cd2817866b5d78648af8891bb675 --- .../android/incallui/widget/multiwaveview/GlowPadView.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'InCallUI/src/com/android/incallui/widget/multiwaveview') diff --git a/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java b/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java index e97691bb8..a5733de2c 100644 --- a/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java +++ b/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java @@ -223,8 +223,7 @@ public class GlowPadView extends View { mFeedbackCount); mAllowScaling = a.getBoolean(R.styleable.GlowPadView_allowScaling, false); TypedValue handle = a.peekValue(R.styleable.GlowPadView_handleDrawable); - mHandleDrawable = new TargetDrawable(res, handle != null ? handle.resourceId : 0, 2); - mHandleDrawable.setState(TargetDrawable.STATE_INACTIVE); + setHandleDrawable(handle != null ? handle.resourceId : R.drawable.ic_incall_audio_handle); mOuterRing = new TargetDrawable(res, getResourceId(a, R.styleable.GlowPadView_outerRingDrawable), 1); @@ -620,7 +619,6 @@ public class GlowPadView extends View { updatePointCloudPosition(mWaveCenterX, mWaveCenterY); } } - /** * Loads an array of drawables from the given resourceId. * @@ -639,6 +637,15 @@ public class GlowPadView extends View { return mTargetResourceId; } + /** + * Sets teh handle drawable to the drawable specified by the resource ID. + * @param resourceId + */ + public void setHandleDrawable(int resourceId) { + mHandleDrawable = new TargetDrawable(getResources(), resourceId, 2); + mHandleDrawable.setState(TargetDrawable.STATE_INACTIVE); + } + /** * Sets the resource id specifying the target descriptions for accessibility. * -- cgit v1.2.3