diff options
author | Yorke Lee <yorkelee@google.com> | 2015-05-07 11:29:38 -0700 |
---|---|---|
committer | Yorke Lee <yorkelee@google.com> | 2015-05-07 11:32:19 -0700 |
commit | 58d7f084afd3d135c3bebeacf1b1a88d3e50fa0b (patch) | |
tree | ebd228ec578186695f9938d3fd20438343d409c1 /InCallUI | |
parent | 6d4371d5df23d1b129a1a173292fad1fecdb362e (diff) |
Fix issue with misaligned glowpad handle
If the drawable for the handle changes, a new TargetDrawable is
created (without the correct positional parameters). This causes it
to be misaligned (e.g. during call waiting).
To fix this, simply replace the drawable without creating the TargetDrawable
from scratch. This preserves its positionX and positionY variables.
Bug: 20860087
Change-Id: I696bddf2d6d92cd8f17a3818367e9c0ac71b4a63
Diffstat (limited to 'InCallUI')
-rw-r--r-- | InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java b/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java index 812e883c0..4bd27db9c 100644 --- a/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java +++ b/InCallUI/src/com/android/incallui/widget/multiwaveview/GlowPadView.java @@ -637,11 +637,15 @@ public class GlowPadView extends View { } /** - * Sets teh handle drawable to the drawable specified by the resource ID. + * Sets the handle drawable to the drawable specified by the resource ID. * @param resourceId */ public void setHandleDrawable(int resourceId) { - mHandleDrawable = new TargetDrawable(getResources(), resourceId, 2); + if (mHandleDrawable != null) { + mHandleDrawable.setDrawable(getResources(), resourceId); + } else { + mHandleDrawable = new TargetDrawable(getResources(), resourceId, 1); + } mHandleDrawable.setState(TargetDrawable.STATE_INACTIVE); } |