summaryrefslogtreecommitdiff
path: root/InCallUI/src/com/android/incallui/widget/multiwaveview
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2014-07-11 15:50:00 -0700
committerAndrew Lee <anwlee@google.com>2014-07-15 10:54:02 -0700
commitc0be1faf6fa10b7b4ab025012cdffd98a5be7148 (patch)
tree47926d4f151c6cd9a35a7533846623bcbc9dde61 /InCallUI/src/com/android/incallui/widget/multiwaveview
parenta39948564946dabae36a7201eb5c28d8941b96c3 (diff)
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
Diffstat (limited to 'InCallUI/src/com/android/incallui/widget/multiwaveview')
-rw-r--r--InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java13
1 files changed, 10 insertions, 3 deletions
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.
*
@@ -640,6 +638,15 @@ public class GlowPadView extends View {
}
/**
+ * 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.
*
* @param resourceId The resource id.