Index: remoting/android/java/src/org/chromium/chromoting/DesktopView.java |
diff --git a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java |
index 15ba26708d735e59153a9369cfca8866532f9d57..4ccee9e6a6e5c7b1d7bcc9cd6af898d7a4dfd19d 100644 |
--- a/remoting/android/java/src/org/chromium/chromoting/DesktopView.java |
+++ b/remoting/android/java/src/org/chromium/chromoting/DesktopView.java |
@@ -21,7 +21,7 @@ import org.chromium.chromoting.jni.Client; |
*/ |
public abstract class DesktopView extends SurfaceView { |
/** Used to define the animation feedback shown when a user touches the screen. */ |
- public enum InputFeedbackType { NONE, SMALL_ANIMATION, LARGE_ANIMATION } |
+ public enum InputFeedbackType { NONE, SMALL_ANIMATION, LARGE_ANIMATION, TINY_SCALED_ANIMATION } |
joedow
2016/08/24 18:53:28
Now that we've broken the touch and trackpad feedb
Yuwei
2016/08/24 19:06:44
Done.
|
protected final RenderData mRenderData; |
protected final TouchInputHandler mInputHandler; |
@@ -38,6 +38,7 @@ public abstract class DesktopView extends SurfaceView { |
protected final Event.Raisable<SizeChangedEventParameter> mOnHostSizeChanged = |
new Event.Raisable<>(); |
+ private final int mTinyFeedbackPixelRadius; |
private final int mSmallFeedbackPixelRadius; |
private final int mLargeFeedbackPixelRadius; |
@@ -58,6 +59,9 @@ public abstract class DesktopView extends SurfaceView { |
// Give this view keyboard focus, allowing us to customize the soft keyboard's settings. |
setFocusableInTouchMode(true); |
+ mTinyFeedbackPixelRadius = getResources() |
+ .getDimensionPixelSize(R.dimen.feedback_animation_radius_tiny); |
+ |
mSmallFeedbackPixelRadius = getResources() |
.getDimensionPixelSize(R.dimen.feedback_animation_radius_small); |
@@ -124,14 +128,16 @@ public abstract class DesktopView extends SurfaceView { |
* Returns the radius of the given feedback type. |
* 0.0f will be returned if no feedback should be shown. |
*/ |
- protected final float getFeedbackRadius(InputFeedbackType feedbackToShow) { |
+ protected final float getFeedbackRadius(InputFeedbackType feedbackToShow, float scaleFactor) { |
switch (feedbackToShow) { |
case NONE: |
return 0.0f; |
case SMALL_ANIMATION: |
- return mSmallFeedbackPixelRadius; |
+ return mSmallFeedbackPixelRadius / scaleFactor; |
case LARGE_ANIMATION: |
- return mLargeFeedbackPixelRadius; |
+ return mLargeFeedbackPixelRadius / scaleFactor; |
+ case TINY_SCALED_ANIMATION: |
+ return mTinyFeedbackPixelRadius; |
default: |
// Unreachable, but required by Google Java style and findbugs. |
assert false : "Unreached"; |