diff options
author | Brian Colonna <bcolonna@google.com> | 2011-12-12 18:02:23 -0500 |
---|---|---|
committer | Brian Colonna <bcolonna@google.com> | 2011-12-12 18:02:23 -0500 |
commit | a44f2a59a2408ff367bd2efc7f74ec56f92565dc (patch) | |
tree | 37fe63dbd27fa2cdf39ff595d08423357c5962bf /policy | |
parent | 2ff8cc2438866f791d8fe888573b5fba103e2cd0 (diff) | |
download | frameworks_base-a44f2a59a2408ff367bd2efc7f74ec56f92565dc.zip frameworks_base-a44f2a59a2408ff367bd2efc7f74ec56f92565dc.tar.gz frameworks_base-a44f2a59a2408ff367bd2efc7f74ec56f92565dc.tar.bz2 |
Changed how Face Unlock coordinates are specified
Was using View.getLeft() and View.getTop() to specify the upper-left
corner of the Face Unlock area. That gives coordinates relative the
view, which was fine for the phones. For the tablet it needs
coordinates relative to the window (which still works for the phones).
Also fixed a 'bug' where h and w were swapped. However, it wasn't
causing a problem because it was swapped in two places.
Change-Id: I86c1f68439f1dcef826cfe6b8fb56c9a4a6b8dc3
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java index 088146b..e3c0601 100644 --- a/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +++ b/policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java @@ -1306,8 +1306,11 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler } if (mFaceLockAreaView != null) { + int[] faceLockPosition; + faceLockPosition = new int[2]; + mFaceLockAreaView.getLocationInWindow(faceLockPosition); startFaceLock(mFaceLockAreaView.getWindowToken(), - mFaceLockAreaView.getLeft(), mFaceLockAreaView.getTop(), + faceLockPosition[0], faceLockPosition[1], mFaceLockAreaView.getWidth(), mFaceLockAreaView.getHeight()); } } @@ -1325,14 +1328,14 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler }; // Tells the FaceLock service to start displaying its UI and perform recognition - public void startFaceLock(IBinder windowToken, int x, int y, int h, int w) + public void startFaceLock(IBinder windowToken, int x, int y, int w, int h) { if (usingFaceLock()) { synchronized (mFaceLockServiceRunningLock) { if (!mFaceLockServiceRunning) { if (DEBUG) Log.d(TAG, "Starting FaceLock"); try { - mFaceLockService.startUi(windowToken, x, y, h, w); + mFaceLockService.startUi(windowToken, x, y, w, h); } catch (RemoteException e) { Log.e(TAG, "Caught exception starting FaceLock: " + e.toString()); return; |