summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/ViewRootImpl.java
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2015-05-14 13:47:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-14 13:47:10 +0000
commit3d5286983447262f12b78785391681b20a71f6b2 (patch)
tree0be664eb2032c1240880ff6e6daa80ec4685eeb8 /core/java/android/view/ViewRootImpl.java
parent07b83f1c9e8a7692a985aa2d13ac13fc5521aa4b (diff)
parent96238051621ba2dc8a1c20fa48a00ec6ec4735d6 (diff)
downloadframeworks_base-3d5286983447262f12b78785391681b20a71f6b2.zip
frameworks_base-3d5286983447262f12b78785391681b20a71f6b2.tar.gz
frameworks_base-3d5286983447262f12b78785391681b20a71f6b2.tar.bz2
Merge "Revert "Add new MotionEvent actions for button press and release."" into mnc-dev
Diffstat (limited to 'core/java/android/view/ViewRootImpl.java')
-rw-r--r--core/java/android/view/ViewRootImpl.java17
1 files changed, 1 insertions, 16 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 1cbd886..7c635b9 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -40,7 +40,6 @@ import android.hardware.display.DisplayManager;
import android.hardware.display.DisplayManager.DisplayListener;
import android.media.AudioManager;
import android.os.Binder;
-import android.os.Build;
import android.os.Bundle;
import android.os.Debug;
import android.os.Handler;
@@ -5353,7 +5352,7 @@ public final class ViewRootImpl implements ViewParent,
//Log.d(TAG, ">>>>>> CALLING relayout");
if (params != null && mOrigWindowType != params.type) {
// For compatibility with old apps, don't crash here.
- if (mTargetSdkVersion < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+ if (mTargetSdkVersion < android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
Slog.w(TAG, "Window type can not be changed after "
+ "the window is added; ignoring change of " + mView);
params.type = mOrigWindowType;
@@ -5778,7 +5777,6 @@ public final class ViewRootImpl implements ViewParent,
void enqueueInputEvent(InputEvent event,
InputEventReceiver receiver, int flags, boolean processImmediately) {
- adjustInputEventForCompatibility(event);
QueuedInputEvent q = obtainQueuedInputEvent(event, receiver, flags);
// Always enqueue the input event in order, regardless of its time stamp.
@@ -5884,19 +5882,6 @@ public final class ViewRootImpl implements ViewParent,
recycleQueuedInputEvent(q);
}
- private void adjustInputEventForCompatibility(InputEvent e) {
- if (mTargetSdkVersion < Build.VERSION_CODES.MNC && e instanceof MotionEvent) {
- MotionEvent motion = (MotionEvent) e;
- final int mask =
- MotionEvent.BUTTON_STYLUS_PRIMARY | MotionEvent.BUTTON_STYLUS_SECONDARY;
- final int buttonState = motion.getButtonState();
- final int compatButtonState = (buttonState & mask) >> 4;
- if (compatButtonState != 0) {
- motion.setButtonState(buttonState | compatButtonState);
- }
- }
- }
-
static boolean isTerminalInputEvent(InputEvent event) {
if (event instanceof KeyEvent) {
final KeyEvent keyEvent = (KeyEvent)event;