Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb857f12 authored by Jeff Brown's avatar Jeff Brown
Browse files

resolved conflicts for merge of f7adbe10 to master

Change-Id: I898a5e53b180adaee2337c0c0b9896c799d056e7
parents c0eb6d63 f7adbe10
Loading
Loading
Loading
Loading
+221 −0
Original line number Diff line number Diff line
@@ -177229,6 +177229,19 @@
 visibility="public"
>
</constructor>
<method name="getDevice"
 return="android.view.InputDevice"
 abstract="false"
 native="false"
 synchronized="false"
 static="true"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="id" type="int">
</parameter>
</method>
<method name="getKeyCharacterMap"
 return="android.view.KeyCharacterMap"
 abstract="false"
@@ -177240,6 +177253,19 @@
 visibility="public"
>
</method>
<method name="getMotionRange"
 return="android.view.InputDevice.MotionRange"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="range" type="int">
</parameter>
</method>
<method name="getName"
 return="java.lang.String"
 abstract="false"
@@ -177262,6 +177288,118 @@
 visibility="public"
>
</method>
<method name="hasKey"
 return="boolean"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
<parameter name="keyCode" type="int">
</parameter>
</method>
<field name="MOTION_RANGE_ORIENTATION"
 type="int"
 transient="false"
 volatile="false"
 value="8"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="MOTION_RANGE_PRESSURE"
 type="int"
 transient="false"
 volatile="false"
 value="2"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="MOTION_RANGE_SIZE"
 type="int"
 transient="false"
 volatile="false"
 value="3"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="MOTION_RANGE_TOOL_MAJOR"
 type="int"
 transient="false"
 volatile="false"
 value="6"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="MOTION_RANGE_TOOL_MINOR"
 type="int"
 transient="false"
 volatile="false"
 value="7"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="MOTION_RANGE_TOUCH_MAJOR"
 type="int"
 transient="false"
 volatile="false"
 value="4"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="MOTION_RANGE_TOUCH_MINOR"
 type="int"
 transient="false"
 volatile="false"
 value="5"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="MOTION_RANGE_X"
 type="int"
 transient="false"
 volatile="false"
 value="0"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="MOTION_RANGE_Y"
 type="int"
 transient="false"
 volatile="false"
 value="1"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</field>
<field name="SOURCE_CLASS_BUTTON"
 type="int"
 transient="false"
@@ -177439,6 +177577,78 @@
>
</field>
</class>
<class name="InputDevice.MotionRange"
 extends="java.lang.Object"
 abstract="false"
 static="true"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
<constructor name="InputDevice.MotionRange"
 type="android.view.InputDevice.MotionRange"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</constructor>
<method name="getFlat"
 return="float"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getFuzz"
 return="float"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getMax"
 return="float"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getMin"
 return="float"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getRange"
 return="float"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="false"
 deprecated="not deprecated"
 visibility="public"
>
</method>
</class>
<class name="InputEvent"
 extends="java.lang.Object"
 abstract="true"
@@ -177449,6 +177659,17 @@
>
<implements name="android.os.Parcelable">
</implements>
<method name="getDevice"
 return="android.view.InputDevice"
 abstract="false"
 native="false"
 synchronized="false"
 static="false"
 final="true"
 deprecated="not deprecated"
 visibility="public"
>
</method>
<method name="getDeviceId"
 return="int"
 abstract="false"
+134 −14
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ public final class InputDevice {
     * 
     * A {@link KeyEvent} should be interpreted as a button or key press.
     * 
     * Use {@link #hasKeyCode} to query whether the device supports a particular button or key.
     * Use {@link #hasKey} to query whether the device supports a particular button or key.
     */
    public static final int SOURCE_CLASS_BUTTON = 0x00000001;
    
@@ -154,7 +154,7 @@ public final class InputDevice {
    
    /**
     * The input source is a touch pad or digitizer tablet that is not
     * associated with a display (unlike {@link SOURCE_TOUCHSCREEN}).
     * associated with a display (unlike {@link #SOURCE_TOUCHSCREEN}).
     * 
     * @see #SOURCE_CLASS_POSITION
     */
@@ -174,20 +174,79 @@ public final class InputDevice {
     */
    public static final int SOURCE_JOYSTICK_RIGHT = 0x02000000 | SOURCE_CLASS_JOYSTICK;

    /*
    /**
     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#x}.
     * 
     * @see #getMotionRange
     */
    public static final int MOTION_RANGE_X = 0;
    
    /**
     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#y}.
     * 
     * @see #getMotionRange
     */
    public static final int MOTION_RANGE_Y = 1;
    
    /**
     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#pressure}.
     * 
     * @see #getMotionRange
     */
    public static final int MOTION_RANGE_PRESSURE = 2;
    
    /**
     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#size}.
     * 
     * @see #getMotionRange
     */
    public static final int MOTION_RANGE_SIZE = 3;
    
    /**
     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#touchMajor}.
     * 
     * @see #getMotionRange
     */
    public static final int MOTION_RANGE_TOUCH_MAJOR = 4;
    
    /**
     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#touchMinor}.
     * 
     * @see #getMotionRange
     */
    public static final int MOTION_RANGE_TOUCH_MINOR = 5;
    
    /**
     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#toolMajor}.
     * 
     * @see #getMotionRange
     */
    public static final int MOTION_RANGE_TOOL_MAJOR = 6;
    
    /**
     * Constant for retrieving the range of values for {@link MotionEvent.PointerCoords#toolMinor}.
     * 
     * @see #getMotionRange
     */
    public static final int MOTION_RANGE_TOOL_MINOR = 7;
    
    /**
     * Constant for retrieving the range of values for
     * {@link MotionEvent.PointerCoords#orientation}.
     * 
     * @see #getMotionRange
     */
    public static final int MOTION_RANGE_ORIENTATION = 8;

    /**
     * Gets information about the input device with the specified id.
     * @param id The device id.
     * @return The input device or null if not found.
     */
    public static InputDevice getDevice(int id) {
        // TODO
        return null;
    }
    */
    
    /**
     * Gets the name of this input device.
@@ -213,19 +272,80 @@ public final class InputDevice {
        return KeyCharacterMap.load(mId);
    }
    
    /*
    
    /**
     * Gets information about the range of values for a particular {@link MotionEvent}
     * coordinate.
     * @param range The motion range constant.
     * @return The range of values, or null if the requested coordinate is not
     * supported by the device.
     */
    public MotionRange getMotionRange(int range) {
        // TODO
        return null;
    }
    
    public boolean hasKeyCode(int keyCode) {
    /**
     * Returns true if the device supports a particular button or key.
     * @param keyCode The key code.
     * @return True if the device supports the key.
     */
    public boolean hasKey(int keyCode) {
        // TODO
        return false;
    }
    
    /**
     * Provides information about the range of values for a particular {@link MotionEvent}
     * coordinate.
     */
    public static final class MotionRange {
        public float min;
        public float max;
        public float range;
        public float flat;
        public float fuzz;
    }*/
        /**
         * Gets the minimum value for the coordinate.
         * @return The minimum value.
         */
        public float getMin() {
            // TODO
            return 0;
        }
        
        /**
         * Gets the maximum value for the coordinate.
         * @return The minimum value.
         */
        public float getMax() {
            // TODO
            return 0;
        }
        
        /**
         * Gets the range of the coordinate (difference between maximum and minimum).
         * @return The range of values.
         */
        public float getRange() {
            // TODO
            return 0;
        }
        
        /**
         * Gets the extent of the center flat position with respect to this coordinate.
         * For example, a flat value of 8 means that the center position is between -8 and +8.
         * This value is mainly useful for calibrating joysticks.
         * @return The extent of the center flat position.
         */
        public float getFlat() {
            // TODO
            return 0;
        }
        
        /**
         * Gets the error tolerance for input device measurements with respect to this coordinate.
         * For example, a value of 2 indicates that the measured value may be up to +/- 2 units
         * away from the actual value due to noise and device sensitivity limitations.
         * @return The error tolerance.
         */
        public float getFuzz() {
            // TODO
            return 0;
        }
    }
}
+10 −1
Original line number Diff line number Diff line
@@ -41,10 +41,19 @@ public abstract class InputEvent implements Parcelable {
        return mDeviceId;
    }
    
    /**
     * Gets the device that this event came from.
     * 
     * @return The device, or null if unknown.
     */
    public final InputDevice getDevice() {
        return InputDevice.getDevice(mDeviceId);
    }
    
    /**
     * Gets the source of the event.
     * 
     * @return The event source or {@link InputDevice.SOURCE_UNKNOWN} if unknown.
     * @return The event source or {@link InputDevice#SOURCE_UNKNOWN} if unknown.
     * @see InputDevice#getSourceInfo
     */
    public final int getSource() {
+2 −2
Original line number Diff line number Diff line
@@ -1403,7 +1403,7 @@ public final class MotionEvent extends InputEvent implements Parcelable {
     * current location, position and size is updated to the new values.
     * The current values in the event are added to a list of historical values.
     * 
     * Only applies to {@link ACTION_MOVE} events.
     * Only applies to {@link #ACTION_MOVE} events.
     *
     * @param eventTime The time stamp (in ms) for this data.
     * @param x The new X position.
@@ -1427,7 +1427,7 @@ public final class MotionEvent extends InputEvent implements Parcelable {
     * current location, position and size is updated to the new values.
     * The current values in the event are added to a list of historical values.
     * 
     * Only applies to {@link ACTION_MOVE} events.
     * Only applies to {@link #ACTION_MOVE} events.
     *
     * @param eventTime The time stamp (in ms) for this data.
     * @param pointerCoords The new pointer coordinates.
+2 −0
Original line number Diff line number Diff line
@@ -171,6 +171,8 @@ public:
            status_t            append(const char* other);
            status_t            append(const char* other, size_t numChars);

            status_t            appendFormat(const char* fmt, ...);

            // Note that this function takes O(N) time to calculate the value.
            // No cache value is stored.
            size_t              getUtf32Length() const;
Loading