diff options
Diffstat (limited to 'InCallUI/src/com/android/incallui/GlowPadWrapper.java')
-rw-r--r-- | InCallUI/src/com/android/incallui/GlowPadWrapper.java | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/InCallUI/src/com/android/incallui/GlowPadWrapper.java b/InCallUI/src/com/android/incallui/GlowPadWrapper.java index 58a5f30ea..177669668 100644 --- a/InCallUI/src/com/android/incallui/GlowPadWrapper.java +++ b/InCallUI/src/com/android/incallui/GlowPadWrapper.java @@ -49,6 +49,7 @@ public class GlowPadWrapper extends GlowPadView implements GlowPadView.OnTrigger private AnswerListener mAnswerListener; private boolean mPingEnabled = true; private boolean mTargetTriggered = false; + private int mVideoState = VideoProfile.VideoState.BIDIRECTIONAL; public GlowPadWrapper(Context context) { super(context); @@ -125,11 +126,11 @@ public class GlowPadWrapper extends GlowPadView implements GlowPadView.OnTrigger break; case R.drawable.ic_videocam: case R.drawable.ic_lockscreen_answer_video: - mAnswerListener.onAnswer(VideoProfile.VideoState.BIDIRECTIONAL, getContext()); + mAnswerListener.onAnswer(mVideoState, getContext()); mTargetTriggered = true; break; - case R.drawable.ic_toolbar_video_off: - InCallPresenter.getInstance().declineUpgradeRequest(getContext()); + case R.drawable.ic_lockscreen_decline_video: + mAnswerListener.onDeclineUpgradeRequest(getContext()); mTargetTriggered = true; break; default: @@ -152,9 +153,19 @@ public class GlowPadWrapper extends GlowPadView implements GlowPadView.OnTrigger mAnswerListener = listener; } + /** + * Sets the video state represented by the "video" icon on the glow pad. + * + * @param videoState The new video state. + */ + public void setVideoState(int videoState) { + mVideoState = videoState; + } + public interface AnswerListener { void onAnswer(int videoState, Context context); void onDecline(Context context); + void onDeclineUpgradeRequest(Context context); void onText(); } } |