| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Android 4.0 cannot form multitouch events from multiple input
devices. So it is not possible to report one touchpoint from the
stylus position and, at the same time, another touchpoint from a
finger touch. Instead, when a new input device starts up the currently
active input is cancelled. This is highly undesirable while writing
with the pen.
The easiest solution is to ignore non-stylus touch events while the
stylus is within range (hovering) of the touchscreen. For example,
N-trig digitizers implement this in hardware. But wacom digitizers do
report pen data simultaneously with touch data. This patch disables
(non-stylus) touch input within 50ms of stylus data. On my Galaxy
Note this is necessary to make stylus input usable.
Change-Id: I9f458d85d8bf83d6cf03b467d46ce066fd55b7e0
|
|/
|
|
|
|
|
|
| |
without lockscreen
Contributed by Andrea Arcangeli <andrea@cpushare.com>
Change-Id: I8fe581ae51b38b65540eaefba6c051101fd63021
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue Description:
When do monkey test on some applications, there is big probability get ANR issue. one example is as following:
adb shell monkey -p com.google.android.street -v 500000
Root Cause:
situation 1. InputDispatcher Thread calls findTouchedWindowTargetsLocked routine, there is a AMOTION_EVENT_ACTION_DOWN event
and it can find a splittable touched window for this event , then mTouchState.split set to true.
situation 2. WMS Thread calls setInputWindows routine and all TouchedWindows associated with mTouchState are removed ,
mTouchState.split status still keep true.
situation 3. InputDispatcher Thread calls findTouchedWindowTargetsLocked routine, there is a AMOTION_EVENT_ACTION_POINTER_DOWN event
and it can find found touched window, exit window loop in following code :
if (windowInfo->visible) {
if (! (flags & InputWindowInfo::FLAG_NOT_TOUCHABLE)) {
isTouchModal = (flags & (InputWindowInfo::FLAG_NOT_FOCUSABLE
| InputWindowInfo::FLAG_NOT_TOUCH_MODAL)) == 0;
if (isTouchModal || windowInfo->touchableRegionContainsPoint(x, y)) {
if (! screenWasOff
|| (flags & InputWindowInfo::FLAG_TOUCHABLE_WHEN_WAKING)) {
newTouchedWindowHandle = windowHandle;
}
break; // found touched window, exit window loop
}
}
situation 4. The following code will have problem after situation 3 in below conditions:
newTouchedWindowHandle doesn't support split , isSplit is true ( last time touched window is splittable )
mTempTouchState.getFirstForegroundWindowHandle will always return NULL due to situation 2
// Figure out whether splitting will be allowed for this window.
if (newTouchedWindowHandle != NULL
&& newTouchedWindowHandle->getInfo()->supportsSplitTouch()) {
// New window supports splitting.
isSplit = true;
} else if (isSplit) {
// New window does not support splitting but we have already split events.
// Assign the pointer to the first foreground window we find.
// (May be NULL which is why we put this code block before the next check.)
newTouchedWindowHandle = mTempTouchState.getFirstForegroundWindowHandle();
}
The window says it does not want to support splitting, so the touches should go to one of the previously split windows except
that there are none, which result to "goto Unresponsive" in findtouchedWindowTargetsLocked routine.
This is not the correct behavior because the user did actually touch something.
situation 5. InputDispatcher Thread will call dispatchOnce repeated to try to dispatch this AMOTION_EVENT_ACTION_POINTER_DOWN event,
then ANR timeout ( 5000ms ) will be exceeded after several times "goto Unresponsive"in findtouchedWindowTargetsLocked routine.
Solution:
In situation 4 we should drop the touch. If the newly touched window was splittable then we wouldn't drop the touch.
It's only when the newly touched window was not splittable where we will drop the touch.
Change-Id: Iab2c06ce0597ac77eb886ccd9d84646c86723bdb
Author: Jeffrey Brown <jeffbrown@android.com>
Author: Erjun Ding <erjunx.ding@intel.com>
Author: Zhenghua Wang <zhenghua.wang@intel.com>
Author: Jack Ren <jack.ren@intel.com>
Author: Bruce Beare <bruce.j.beare@intel.com>
Conflicts:
services/input/InputDispatcher.cpp
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The distance max used in the MotionRange is calculated
incorrectly.
Looks like a copy-and-paste error.
Change-Id: I2b6daab088df0fb69e05682b67ca33524ff35987
|
|/
|
|
|
|
|
|
| |
* The visible pointer icon when hovering or drawing with the stylus is
quite annoying when trying to actually draw with it. Turn it off by
default and add an option to turn it on.
Change-Id: I98b6e1ea929019ef12dbd4b2991c6c96c52cef5c
|
|
|
|
|
|
|
|
|
| |
KEYLAYOUT_OVERRIDES expects a string of "devicename,layoutfile" to set
keyboard layout and character map to files in /system/usr/keylayout and
/system/user/keychars.
This overrides the default behaviour of opening files that match the
device's input name if there's no configuration file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trying to fix my stupid mistakes.
Reverted commits:
*) 5e2284869bc6b53d6de786d6b5846e9b79383f04:
Fix InputReader test
*) 8f2303e5b3b2c1e40c52bfb4028a663e503d132e:
add missing file for "Iec99d52f: Load a device specific key handler"
*) 2ee7ed47a844f168db074c95e4fc93e9745618c0:
InputManager: Add system setting to define keyboard locales
*) cf02764d48eadacdb9114225e043835143c4ed07:
Load a device specific key handler
Change-Id: Ibdaa8d52054c830a4e3659bf356cc2df71342eb3
|
|
|
|
| |
Change-Id: I91e985ccf5102c61dccfa34504e403aeb8288321
|
|
|
|
|
|
|
|
|
|
|
| |
KEYLAYOUT_OVERRIDES expects a string of "devicename,layoutfile" to set
keyboard layout and character map to files in /system/usr/keylayout and
/system/user/keychars.
This overrides the default behaviour of opening files that match the
device's input name if it is unconfigured.
Change-Id: I35d07c6986db5a8b0744ff4c8649c2a34cc2fd14
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
https://android.googlesource.com/platform/frameworks/base into aosp
Conflicts:
core/res/res/values-de/strings.xml
core/res/res/values-el/strings.xml
core/res/res/values-nl/strings.xml
core/res/res/values-pt/strings.xml
core/res/res/values-ru/strings.xml
core/res/res/values-tr/strings.xml
core/res/res/values-zh-rCN/strings.xml
core/res/res/values/config.xml
data/fonts/Roboto-Bold.ttf
data/fonts/Roboto-BoldItalic.ttf
data/fonts/Roboto-Italic.ttf
data/fonts/Roboto-Regular.ttf
packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Change-Id: I376757e52555fe45860f404da5fd2293ea45ddce
|
| |
| |
| |
| |
| | |
Bug: 5862398
Change-Id: I799ee47b6e5d6c51f45aa4296c6ab8a610b74be5
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
in addition to converting ABS_MT_TOUCH_MAJOR to ABS_MT_PRESSURE, it also converts ABS_MT_WIDTH_MAJOR to ABS_MT_TOUCH_MAJOR.
also add 2 workarounds for some touchscreen driver which
1. has BTN_TOUCH feature but it doesn't send BTN_TOUCH event
2. sends multi-touch event for not-in-use pointer
reference: http://source.android.com/tech/input/touch-devices.html
Change-Id: I7b7f8802e45bf9d9f8de00373559a30ea839a178
|
| |
| |
| |
| |
| |
| |
| |
| | |
by commit 4aed78b5056560f499e5953f659fa90a06ecc38a lidOpen was reverted.
fix to make lidOpen true when sw == 0.
and fix getStateLocked()/getState() to get UP/DOWN state correctly.
Change-Id: I22a185478be860f1c88cf56d7ef3d0b3a8617459
|
| |
| |
| |
| |
| |
| | |
Patchset 2: Clean code
Change-Id: Ib1fc59833d066dee9c4c5f02a9bf1a912463cb1e
|
| |
| |
| |
| | |
Change-Id: I7be5345707e00b20ad96ebd3958bbf7f9fb5a22f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is required in order to make the trackball on devices that has it to
work properly, like it does before ICS. In addition to this patch, you just
need an .idc file that matches the device name for your the trackball. You can
find it by either looking in a kernel log or a logcat.
For example, a device with a Crucial optical navigation pad, will be called
curcial-oj.idc
The .idc file should contain the following:
cursor.mode = navigation
cursor.orientationAware = 1
Place the file in /system/usr/idc folder.
Enable in BoardConfig.mk with BOARD_USE_LEGACY_TRACKPAD := true
Change-Id: I57e9912b9e4d6242c980c99f4fd28b0d50f19bb8
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
https://android.googlesource.com/platform/frameworks/base into aosp
Conflicts:
core/res/res/values/strings.xml
policy/src/com/android/internal/policy/impl/GlobalActions.java
services/java/com/android/server/WifiService.java
services/sensorservice/SensorDevice.cpp
telephony/java/com/android/internal/telephony/RIL.java
Change-Id: I89ec56d5ff282a2eb879ca40fb6d74ebcf752837
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed a problem where the key up for the ALT or META key was not
delivered to the task switcher dialog because it was deemed
to be inconsistent with the window's observed state. Consequently
the dialog would not be dismissed when the key was released.
Moved global hotkey handling for META+* shortcuts and ALT/META-TAB
into the window manager policy's interceptKeyBeforeDispatching
method. This change prevents applications from hijacking these
keys.
The original idea was that these shortcuts would be handled only
if the application did not handle them itself. That way certain
applications, such as remote desktop tools, could deliberately
override some of these less important system shortcuts.
Unfortunately, that does make the behavior inconsistent across
applications. What's more, bugs in the onKeyDown handler of
applications can cause the shortcuts to not work at all, for
no good reason.
Perhaps we can add an opt-in feature later to enable specific
applications to repurpose these keys when it makes sense.
Bug: 5720358
Change-Id: I22bf17606d12dbea6549c60d20763e6608576cf7
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Stop using system properties to publish information about
the key character map path. Instead, we can retrieve it
on demand by asking the window manager.
It was possible to exhaust the supply of system properties
when repeatedly adding and removing input devices.
Bug: 5532806
Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 5011907
Introduce a 150ms delay in handling volume down keys
while waiting to see if a power key will follow.
Don't trigger the screenshot chord if both volume up and
volume down are pressed together.
Don't trigger the long-press power menu if volume keys are
also pressed.
Require the user to press both keys in the chord within
the debounce time and continue long-pressing them in order
to trigger the screenshot action.
Change-Id: I248968d37b73c09d6d08e7f62667c443eba32da0
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
BOARD_USE_LEGACY_TOUCHSCREEN := true in your BoardConfig.mk
Support the Multitouch, 10-points tested on the qtouch (Defy/Droid)
Remember to add the new idc file required for the touchscreen/keypad
Example: /system/usr/idc/qtouch-touchscreen.idc
Signed-off-by: Tanguy Pruvot <tanguy.pruvot@gmail.com>
Change-Id: Ic630fb91342e37ff0f96f7d6367d693d299adcf0
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 5011907
Introduce a 150ms delay in handling volume down keys
while waiting to see if a power key will follow.
Don't trigger the screenshot chord if both volume up and
volume down are pressed together.
Don't trigger the long-press power menu if volume keys are
also pressed.
Require the user to press both keys in the chord within
the debounce time and continue long-pressing them in order
to trigger the screenshot action.
Change-Id: I248968d37b73c09d6d08e7f62667c443eba32da0
|
|
|
|
|
| |
Change-Id: I40bbbd3867e8c7ac7d6fb38e1c72432bb4963316
Signed-off-by: Dima Zavin <dima@android.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Prevent system overlays from showing above the notification bar.
Allow secure system overlays to be fullscreen, for the pointer
location view.
Show the drag layer above the notification bar.
Change-Id: Ic8d663792a243cca2cd9952d241d001e0357d551
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This change enables the joystick input mapper to handle any axes
that are not claimed by the touch input mapper, which makes
auxiliary controls such as wheels / knobs accessible.
Change-Id: I01ee7f342ac91acfcb4ccb6676fd52b3d5bf31a0
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 5156144
Input channels could leak or simply live longer than they should
in some cases.
1. Monitor channels (used by the pointer location overlay) are never
unregistered, so they would leak.
Added code to handle failures in the receive callback by closing
the input channel.
2. The DragState held onto its input window and application handles
even after the input channel was disposed.
Added code to null these handles out when they are no longer needed.
3. Input channels previously used as input event targets would stick
around until the targets were cleared (usually on the next
event).
Added code to detect when the input dispatcher is in
an idle state and to proactively clear the targets then
to ensure that resources are released promptly.
4. Native input window handles held onto the input channel even
after the input window was removed from the input dispatcher.
Consequently, the input channel would not be disposed until
the input window handle itself was freed. Since the input
window handle is held from managed code, this meant that the
window's input channel could stick around until the next GC.
Refactored the input window handle to separate the properties
(info) and identify (handle) state into different objects.
Then modified the dispatcher to release the properties (info)
when no longer needed, including the input channel.
7. The pointer location overlay does not actually use its
standard input channel, only the monitor input channel.
Added INPUT_FEATURE_NO_INPUT_CHANNEL to allow windows to
request that they not be provided with an input channel
at all.
Improved some of the error handling logic to emit the status
code as part of the exception message.
Change-Id: I01988d4391a70c6678c8b0e936ca051af680b1a5
|
|/
|
|
|
|
| |
"device.internal = 1" had an effect.
Change-Id: Ie88ed66e0841418c147bed2e23806405bdd17ad6
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Bug: 4569045
Change-Id: I8726ea292dd7def790a5e40d7d7e58968974f896
|
|/
|
|
|
|
| |
If the device tells us it's really direct, then it's direct.
Change-Id: I83875cf47e865ff6f0def149ad0c68db24d9dc4a
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 5205674
Only wake the device on positive interactions from the user
such as button presses, movement, initial touch down events.
In particular, do not wake the device on up events since the
driver might synthesize them on power off, causing the device
to wake up again for no good reason.
Change-Id: I767f553ea36d110e6f3a10611b324487ba7d880d
|
|
|
|
| |
Change-Id: I020e834bfb541a1f274e26a72705f96f4307dddf
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 5205301
Some drivers report one finger as BTN_TOOL_FINGER, two as
BTN_TOOL_DOUBLETAP, three as BTN_TOOL_TRIPLETAP and four
as BTN_TOOL_QUADTAP. Since we care about the tool type,
we need to handle _DOUBLE/_TRIPLE/_QUAD tap in the same way
we handle _FINGER.
Change-Id: I8eb83d2a2bada9ac32d07619c7eea84e924316b8
|
|
|
|
| |
Change-Id: I92b23e5971d4b98b173aacd64fe03ce9f0755c88
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 5049148
Finished stylus support, including support for indirect stylus
and mouse tools.
Added TILT axis. When stylus tilt X/Y is available, it is transformed
into an orientation and tilt inclination which is a more convenient
representation and a simpler extension to the exiting API.
Touch devices now only report touch data using a single input
source. Previously touch devices in pointer mode would report
both absolute touch pad data and cooked pointer gestures.
Now we just pick one. The touch device switches modes as needed
when the focused application enables/disables pointer gestures.
This change greatly simplifies the code and reduces the load
on the input dispatcher.
Fixed an incorrect assumption that the value of ABS_(MT_)DISTANCE
would be zero whenever the stylus was in direct contact. It appears
that the correct way to determine whether the stylus is in direct
contact (rather than hovering) is by checking for a non-zero
reported pressure.
Added code to read the initial state of tool buttons and axis values
when the input devices are initialized or reset. This fixes
problems where the input mapper state might have the wrong initial
state.
Moved responsibility for cancelling pending inputs (keys down,
touches, etc.) to the InputDispatcher by sending it a device reset
notification. This frees the InputReader from having to synthesize
events during reset, which was cumbersome and somewhat brittle
to begin with.
Consolidated more of the common accumulator logic from
SingleTouchInputMapper and MultiTouchInputMapper into
TouchInputMapper.
Improved the PointerLocation output.
Change-Id: I595d3647f7fd7cb1e3eff8b3c76b85043b5fe2f0
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There turn out to be two distinct bugs leading to runtime restarts.
The first, dating from at least Android 3.1, is that following certain kinds
of app crashes we properly clean up the drag-state bookkeeping, but aren't
prepared in the case of the drag-target timeout clock firing with a now-
null drag state in effect. We now catch that edge condition and don't NPE
(and note that there was already similar code around the separate timeout
when an app is *starting* the drag process).
The second bug is that some new-in-ICS code in the input channel management
wasn't prepared for certain cases where the current touch window could have
become unusable and its input channel torn down summarily in the case of the
aforesaid app crash during drag. The code now makes sure that there really
is an input channel that needs to be flushed / cancelled prior to attempting
that operation.
Fixes bug 5173534
Change-Id: Idaae158ecfb4b93456ab1425769b669962893c00
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 5161854
The InputDispatcher contains code to recover from ANRs more quickly
when the user touches a different application. When triggered,
it sets mNextUnblockedEvent to the next event it should dispatch
(to the next application). All prior events are dropped.
This change fixes a bug where mNextUnblockedEvent could potentially
never be reset back to NULL if the inbound queue was drained
for some reason.
Change-Id: I21be2f02c9fc770bd260ea414db8bb184df89ada
|
|
|
|
| |
Change-Id: If883f60cde28792bd0e108597ced49d69d13136e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 5105599
Don't clear slot data when slot is no longer in use.
The kernel will not resend absolute slot values if they are
unchanged, even if the slot was previously marked unused.
Because the protocol is stateful, this could cause problems if
evdev drops events (marked by SYN_DROPPED) since we cannot
query the initial values of the slots, but there's nothing
we can do.
Change-Id: Ie13e68097fb8ed2542c2f60338b499082cf9e77f
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 5064702
This change improves compatibility with standard touch device
drivers. All existing touch device IDC files will need to
be updated because the input system now assumes that the
touch device drivers implement the multitouch input
protocol correctly and use the appropriate axes.
Change-Id: I93aad0e011efea74fbc7fa3da31f7967aff8136c
|
|
|
|
|
|
| |
Bug: 5094994
Change-Id: I153866958efc64ac19bda8b997c1c9f6ad425ec4
|
|
|
|
|
|
|
|
|
|
| |
Bug: 5149443
Removed some dead code and unnecessary checks, such as checks
for non-nullity of arrays that used to be dynamically allocated
once upon a time but are now part of the Device object itself.
Change-Id: I531116e816772d7c5030d22da0c8e1d7dcfba778
|
|
|
|
|
|
|
|
| |
Bug: 5064702
Should not include stylus buttons in the condition.
Change-Id: If4d78a875b77da8bd59672d6fdbf5353004d0023
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 5064702
Introduced the concept of an InputListener to further decouple
the InputReader from the InputDispatcher. The InputListener
exposes just the minimum interface that the InputReader needs
to communicate with the outside world. The InputReader
passes arguments to the InputListener by reference, which makes
it easy to queue them up.
Consolidated all of the InputReader locks into one simple global
Mutex. The reason this wasn't done before was due to potential
re-entrance in outbound calls to the InputDispatcher. To fix this,
the InputReader now queues up all of the events it wants to send
using a QueuedInputListener, then flushes them outside of the
critical section after all of the event processing is finished.
Removing all of the InputMapper locks greatly simplifies the
implementation.
Added tests for new stylus features such as buttons, tool types,
and hovering.
Added some helpers to BitSet32 to handle common code patterns
like finding the first marked bit and clearing it.
Fixed a bug in VelocityTracker where the wrong pointer trace
could get cleared when handling ACTION_POINTER_DOWN. Oops.
Changed PointerCoords so it no longer stores useless zero
axis values. Removed editAxisValue because it is not very
useful when all zero value axes are absent and therefore
cannot be edited in place.
Added dispatch of stylus hover events.
Added support for distance and tool types.
Change-Id: I4cf14d134fcb1db7d10be5f2af7b37deef8f8468
|
|\ |
|