OSDN Git Service

am 7c000280: Merge changes from topic \'button_actions\' into mnc-dev
authorMichael Wright <michaelwr@google.com>
Thu, 14 May 2015 19:29:01 +0000 (19:29 +0000)
committerAndroid Git Automerger <android-git-automerger@android.com>
Thu, 14 May 2015 19:29:01 +0000 (19:29 +0000)
* commit '7c000280a57f352c2485dcaea1d5bfe20f7bfe63':
  Fix input tests to work with new MotionEvent member
  Revert "Revert "Add new MotionEvent actions for button press and release.""

1  2 
include/android/input.h
services/inputflinger/InputReader.cpp

@@@ -331,14 -298,22 +331,20 @@@ enum 
       */
      AMOTION_EVENT_ACTION_SCROLL = 8,
  
 -    /* The pointer is not down but has entered the boundaries of a window or view.
 -     */
 +    /** The pointer is not down but has entered the boundaries of a window or view. */
      AMOTION_EVENT_ACTION_HOVER_ENTER = 9,
  
 -    /* The pointer is not down but has exited the boundaries of a window or view.
 -     */
 +    /** The pointer is not down but has exited the boundaries of a window or view. */
      AMOTION_EVENT_ACTION_HOVER_EXIT = 10,
+     /* One or more buttons have been pressed. */
+     AMOTION_EVENT_ACTION_BUTTON_PRESS = 11,
+     /* One or more buttons have been released. */
+     AMOTION_EVENT_ACTION_BUTTON_RELEASE = 12,
  };
  
 -/*
 +/**
   * Motion event flags.
   */
  enum {
@@@ -727,19 -406,16 +733,21 @@@ enum 
   * Refer to the documentation on the MotionEvent class for descriptions of each button.
   */
  enum {
 +    /** primary */
      AMOTION_EVENT_BUTTON_PRIMARY = 1 << 0,
 +    /** secondary */
      AMOTION_EVENT_BUTTON_SECONDARY = 1 << 1,
 +    /** tertiary */
      AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2,
 +    /** back */
      AMOTION_EVENT_BUTTON_BACK = 1 << 3,
 +    /** forward */
      AMOTION_EVENT_BUTTON_FORWARD = 1 << 4,
+     AMOTION_EVENT_BUTTON_STYLUS_PRIMARY = 1 << 5,
+     AMOTION_EVENT_BUTTON_STYLUS_SECONDARY = 1 << 6,
  };
  
 -/*
 +/**
   * Constants that identify tool types.
   * Refer to the documentation on the MotionEvent class for descriptions of each tool type.
   */
Simple merge