Loading core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml +12 −2 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ </RelativeLayout> <!-- right side: password --> <LinearLayout <RelativeLayout android:layout_width="0dip" android:layout_weight="1" android:layout_height="match_parent" Loading @@ -72,6 +72,7 @@ <LinearLayout android:orientation="vertical" android:layout_centerInParent="true" android:layout_width="330dip" android:layout_height="wrap_content"> Loading Loading @@ -152,6 +153,15 @@ </LinearLayout> </LinearLayout> <!-- Area to overlay FaceLock --> <View android:id="@+id/faceLockAreaView" android:visibility="invisible" android:layout_width="512dip" android:layout_height="512dip" android:layout_centerInParent="true" android:background="@color/facelock_color_background" /> </RelativeLayout> </LinearLayout> core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml +83 −66 Original line number Diff line number Diff line Loading @@ -61,10 +61,16 @@ </RelativeLayout> <!-- bottom: password --> <LinearLayout <RelativeLayout android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1" android:gravity="center"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerInParent="true" android:orientation="vertical" android:gravity="center"> Loading Loading @@ -137,8 +143,7 @@ /> <!-- emergency call button --> <Button android:id="@+id/emergencyCallButton" <Button android:id="@+id/emergencyCallButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableLeft="@drawable/ic_emergency" Loading @@ -149,4 +154,16 @@ /> </LinearLayout> <!-- Area to overlay FaceLock --> <View android:id="@+id/faceLockAreaView" android:visibility="invisible" android:layout_width="512dip" android:layout_height="512dip" android:layout_centerInParent="true" android:background="@color/facelock_color_background" /> </RelativeLayout> </LinearLayout> core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml +54 −37 Original line number Diff line number Diff line Loading @@ -72,6 +72,12 @@ android:layout_height="match_parent" android:gravity="center_vertical|center_horizontal"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center_vertical|center_horizontal"> <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" android:layout_width="354dip" android:layout_height="354dip" Loading @@ -80,15 +86,15 @@ <!-- Emergency and forgot pattern buttons. --> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_below="@id/lockPattern" android:layout_alignLeft="@id/lockPattern" android:layout_alignRight="@id/lockPattern" android:layout_marginTop="28dip" android:gravity="center" style="?android:attr/buttonBarStyle" android:gravity="center" android:weightSum="2"> <Button android:id="@+id/forgotPatternButton" Loading Loading @@ -117,4 +123,15 @@ </RelativeLayout> <!-- Area to overlay FaceLock --> <View android:id="@+id/faceLockAreaView" android:visibility="invisible" android:layout_width="512dip" android:layout_height="512dip" android:layout_centerInParent="true" android:background="@color/facelock_color_background" /> </RelativeLayout> </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml +54 −35 Original line number Diff line number Diff line Loading @@ -62,23 +62,32 @@ </RelativeLayout> <!-- bottom: lock pattern, emergency dialer and forgot pattern button --> <LinearLayout <RelativeLayout android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dip" android:orientation="vertical" android:gravity="center"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center"> <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" android:layout_width="354dip" android:layout_height="354dip" android:layout_marginTop="50dip"/> android:layout_marginTop="50dip" /> <!-- Emergency and forgot pattern buttons. --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_below="@id/lockPattern" android:layout_alignLeft="@id/lockPattern" android:layout_alignRight="@id/lockPattern" style="?android:attr/buttonBarStyle" android:gravity="center" android:weightSum="2"> Loading Loading @@ -107,7 +116,17 @@ </LinearLayout> </LinearLayout> </RelativeLayout> </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> <!-- Area to overlay FaceLock --> <View android:id="@+id/faceLockAreaView" android:visibility="invisible" android:layout_width="512dip" android:layout_height="512dip" android:layout_centerInParent="true" android:background="@color/facelock_color_background" /> </RelativeLayout> </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +17 −9 Original line number Diff line number Diff line Loading @@ -584,15 +584,20 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler (failedBackupAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT); if (tooManyFaceUnlockTries) Log.i(TAG, "tooManyFaceUnlockTries: " + tooManyFaceUnlockTries); if (mUpdateMonitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE && usingFaceLock() && !mHasOverlay && !tooManyFaceUnlockTries && !backupIsTimedOut) { bindToFaceLock(); // Show FaceLock area, but only for a little bit so lockpattern will become visible if // FaceLock fails to start or crashes if (usingFaceLock()) { showFaceLockAreaWithTimeout(FACELOCK_VIEW_AREA_SERVICE_TIMEOUT); } // When switching between portrait and landscape view while FaceLock is running, the // screen will eventually go dark unless we poke the wakelock when FaceLock is // restarted mKeyguardScreenCallback.pokeWakelock(); } else { hideFaceLockArea(); } Loading Loading @@ -1292,8 +1297,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()); } } Loading @@ -1311,14 +1319,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; Loading Loading @@ -1360,7 +1368,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler public void unlock() { if (DEBUG) Log.d(TAG, "FaceLock unlock()"); showFaceLockArea(); // Keep fallback covered stopFaceLock(); stopAndUnbindFromFaceLock(); mKeyguardScreenCallback.keyguardDone(true); mKeyguardScreenCallback.reportSuccessfulUnlockAttempt(); Loading @@ -1372,7 +1380,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler public void cancel() { if (DEBUG) Log.d(TAG, "FaceLock cancel()"); hideFaceLockArea(); // Expose fallback stopFaceLock(); stopAndUnbindFromFaceLock(); mKeyguardScreenCallback.pokeWakelock(BACKUP_LOCK_TIMEOUT); } Loading @@ -1383,7 +1391,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler if (DEBUG) Log.d(TAG, "FaceLock reportFailedAttempt()"); mFailedFaceUnlockAttempts++; hideFaceLockArea(); // Expose fallback stopFaceLock(); stopAndUnbindFromFaceLock(); mKeyguardScreenCallback.pokeWakelock(BACKUP_LOCK_TIMEOUT); } Loading Loading
core/res/res/layout-sw600dp/keyguard_screen_password_landscape.xml +12 −2 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ </RelativeLayout> <!-- right side: password --> <LinearLayout <RelativeLayout android:layout_width="0dip" android:layout_weight="1" android:layout_height="match_parent" Loading @@ -72,6 +72,7 @@ <LinearLayout android:orientation="vertical" android:layout_centerInParent="true" android:layout_width="330dip" android:layout_height="wrap_content"> Loading Loading @@ -152,6 +153,15 @@ </LinearLayout> </LinearLayout> <!-- Area to overlay FaceLock --> <View android:id="@+id/faceLockAreaView" android:visibility="invisible" android:layout_width="512dip" android:layout_height="512dip" android:layout_centerInParent="true" android:background="@color/facelock_color_background" /> </RelativeLayout> </LinearLayout>
core/res/res/layout-sw600dp/keyguard_screen_password_portrait.xml +83 −66 Original line number Diff line number Diff line Loading @@ -61,10 +61,16 @@ </RelativeLayout> <!-- bottom: password --> <LinearLayout <RelativeLayout android:layout_width="match_parent" android:layout_height="0dip" android:layout_weight="1" android:gravity="center"> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerInParent="true" android:orientation="vertical" android:gravity="center"> Loading Loading @@ -137,8 +143,7 @@ /> <!-- emergency call button --> <Button android:id="@+id/emergencyCallButton" <Button android:id="@+id/emergencyCallButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableLeft="@drawable/ic_emergency" Loading @@ -149,4 +154,16 @@ /> </LinearLayout> <!-- Area to overlay FaceLock --> <View android:id="@+id/faceLockAreaView" android:visibility="invisible" android:layout_width="512dip" android:layout_height="512dip" android:layout_centerInParent="true" android:background="@color/facelock_color_background" /> </RelativeLayout> </LinearLayout>
core/res/res/layout-sw600dp/keyguard_screen_unlock_landscape.xml +54 −37 Original line number Diff line number Diff line Loading @@ -72,6 +72,12 @@ android:layout_height="match_parent" android:gravity="center_vertical|center_horizontal"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center_vertical|center_horizontal"> <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" android:layout_width="354dip" android:layout_height="354dip" Loading @@ -80,15 +86,15 @@ <!-- Emergency and forgot pattern buttons. --> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_below="@id/lockPattern" android:layout_alignLeft="@id/lockPattern" android:layout_alignRight="@id/lockPattern" android:layout_marginTop="28dip" android:gravity="center" style="?android:attr/buttonBarStyle" android:gravity="center" android:weightSum="2"> <Button android:id="@+id/forgotPatternButton" Loading Loading @@ -117,4 +123,15 @@ </RelativeLayout> <!-- Area to overlay FaceLock --> <View android:id="@+id/faceLockAreaView" android:visibility="invisible" android:layout_width="512dip" android:layout_height="512dip" android:layout_centerInParent="true" android:background="@color/facelock_color_background" /> </RelativeLayout> </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
core/res/res/layout-sw600dp/keyguard_screen_unlock_portrait.xml +54 −35 Original line number Diff line number Diff line Loading @@ -62,23 +62,32 @@ </RelativeLayout> <!-- bottom: lock pattern, emergency dialer and forgot pattern button --> <LinearLayout <RelativeLayout android:layout_weight="1" android:layout_width="match_parent" android:layout_height="0dip" android:orientation="vertical" android:gravity="center"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center"> <com.android.internal.widget.LockPatternView android:id="@+id/lockPattern" android:layout_width="354dip" android:layout_height="354dip" android:layout_marginTop="50dip"/> android:layout_marginTop="50dip" /> <!-- Emergency and forgot pattern buttons. --> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_below="@id/lockPattern" android:layout_alignLeft="@id/lockPattern" android:layout_alignRight="@id/lockPattern" style="?android:attr/buttonBarStyle" android:gravity="center" android:weightSum="2"> Loading Loading @@ -107,7 +116,17 @@ </LinearLayout> </LinearLayout> </RelativeLayout> </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient> <!-- Area to overlay FaceLock --> <View android:id="@+id/faceLockAreaView" android:visibility="invisible" android:layout_width="512dip" android:layout_height="512dip" android:layout_centerInParent="true" android:background="@color/facelock_color_background" /> </RelativeLayout> </com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
policy/src/com/android/internal/policy/impl/LockPatternKeyguardView.java +17 −9 Original line number Diff line number Diff line Loading @@ -584,15 +584,20 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler (failedBackupAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT); if (tooManyFaceUnlockTries) Log.i(TAG, "tooManyFaceUnlockTries: " + tooManyFaceUnlockTries); if (mUpdateMonitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE && usingFaceLock() && !mHasOverlay && !tooManyFaceUnlockTries && !backupIsTimedOut) { bindToFaceLock(); // Show FaceLock area, but only for a little bit so lockpattern will become visible if // FaceLock fails to start or crashes if (usingFaceLock()) { showFaceLockAreaWithTimeout(FACELOCK_VIEW_AREA_SERVICE_TIMEOUT); } // When switching between portrait and landscape view while FaceLock is running, the // screen will eventually go dark unless we poke the wakelock when FaceLock is // restarted mKeyguardScreenCallback.pokeWakelock(); } else { hideFaceLockArea(); } Loading Loading @@ -1292,8 +1297,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()); } } Loading @@ -1311,14 +1319,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; Loading Loading @@ -1360,7 +1368,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler public void unlock() { if (DEBUG) Log.d(TAG, "FaceLock unlock()"); showFaceLockArea(); // Keep fallback covered stopFaceLock(); stopAndUnbindFromFaceLock(); mKeyguardScreenCallback.keyguardDone(true); mKeyguardScreenCallback.reportSuccessfulUnlockAttempt(); Loading @@ -1372,7 +1380,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler public void cancel() { if (DEBUG) Log.d(TAG, "FaceLock cancel()"); hideFaceLockArea(); // Expose fallback stopFaceLock(); stopAndUnbindFromFaceLock(); mKeyguardScreenCallback.pokeWakelock(BACKUP_LOCK_TIMEOUT); } Loading @@ -1383,7 +1391,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler if (DEBUG) Log.d(TAG, "FaceLock reportFailedAttempt()"); mFailedFaceUnlockAttempts++; hideFaceLockArea(); // Expose fallback stopFaceLock(); stopAndUnbindFromFaceLock(); mKeyguardScreenCallback.pokeWakelock(BACKUP_LOCK_TIMEOUT); } Loading