summaryrefslogtreecommitdiffstats
path: root/services/core/java
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2014-01-27 18:34:20 -0800
committerMichael Wright <michaelwr@google.com>2014-03-10 15:54:21 -0700
commit857aa7be880c53d78f72a9f227cbdf72ee68d587 (patch)
tree11388cb1fff35406749368bf8685e2ef86753468 /services/core/java
parentd6396d67201fb2b64d13070324bb115c9c23b08a (diff)
downloadframeworks_base-857aa7be880c53d78f72a9f227cbdf72ee68d587.zip
frameworks_base-857aa7be880c53d78f72a9f227cbdf72ee68d587.tar.gz
frameworks_base-857aa7be880c53d78f72a9f227cbdf72ee68d587.tar.bz2
Initialize mAffineTransform and update on modification
This patch causes the InputReader to update its mAffineTransform to reflect the currently-set calibration on startup and whenever its value is changed through the InputManagerService. Change-Id: I81c76e8cf168728ee140abaf148e1cd31687d5af
Diffstat (limited to 'services/core/java')
-rw-r--r--services/core/java/com/android/server/input/InputManagerService.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/input/InputManagerService.java b/services/core/java/com/android/server/input/InputManagerService.java
index 16972f6..69d8442 100644
--- a/services/core/java/com/android/server/input/InputManagerService.java
+++ b/services/core/java/com/android/server/input/InputManagerService.java
@@ -184,6 +184,7 @@ public class InputManagerService extends IInputManager.Stub
InputChannel fromChannel, InputChannel toChannel);
private static native void nativeSetPointerSpeed(long ptr, int speed);
private static native void nativeSetShowTouches(long ptr, boolean enabled);
+ private static native void nativeReloadCalibration(long ptr);
private static native void nativeVibrate(long ptr, int deviceId, long[] pattern,
int repeat, int token);
private static native void nativeCancelVibrate(long ptr, int deviceId, int token);
@@ -701,7 +702,7 @@ public class InputManagerService extends IInputManager.Stub
mTempFullKeyboards.clear();
}
- @Override // Binder call
+ @Override // Binder call & native callback
public TouchCalibration getTouchCalibrationForInputDevice(String inputDeviceDescriptor) {
if (inputDeviceDescriptor == null) {
throw new IllegalArgumentException("inputDeviceDescriptor must not be null");
@@ -728,7 +729,9 @@ public class InputManagerService extends IInputManager.Stub
synchronized (mDataStore) {
try {
- mDataStore.setTouchCalibration(inputDeviceDescriptor, calibration);
+ if (mDataStore.setTouchCalibration(inputDeviceDescriptor, calibration)) {
+ nativeReloadCalibration(mPtr);
+ }
} finally {
mDataStore.saveIfNeeded();
}