Merge "DO NOT MERGE cherry-picked FU framework tablet commits" into ics-mr1
This commit is contained in:
committed by
Android (Google) Code Review
commit
8a1131d789
@@ -63,7 +63,7 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<!-- right side: password -->
|
<!-- right side: password -->
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:layout_width="0dip"
|
android:layout_width="0dip"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
@@ -72,6 +72,7 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
android:layout_width="330dip"
|
android:layout_width="330dip"
|
||||||
android:layout_height="wrap_content">
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
@@ -152,6 +153,15 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</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>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -61,92 +61,109 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<!-- bottom: password -->
|
<!-- bottom: password -->
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dip"
|
android:layout_height="0dip"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
<!-- Password entry field -->
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="330dip"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_centerInParent="true"
|
||||||
android:layout_gravity="center"
|
android:orientation="vertical"
|
||||||
android:layout_marginTop="120dip"
|
android:gravity="center">
|
||||||
android:layout_marginBottom="5dip"
|
|
||||||
android:background="@drawable/lockscreen_password_field_dark">
|
|
||||||
|
|
||||||
<EditText android:id="@+id/passwordEntry"
|
<!-- Password entry field -->
|
||||||
|
<LinearLayout
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:layout_width="330dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="0dip"
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginTop="120dip"
|
||||||
|
android:layout_marginBottom="5dip"
|
||||||
|
android:background="@drawable/lockscreen_password_field_dark">
|
||||||
|
|
||||||
|
<EditText android:id="@+id/passwordEntry"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="0dip"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:singleLine="true"
|
||||||
|
android:textStyle="normal"
|
||||||
|
android:inputType="textPassword"
|
||||||
|
android:gravity="center"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left"
|
||||||
|
android:textSize="24sp"
|
||||||
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
|
android:background="@null"
|
||||||
|
android:textColor="#ffffffff"
|
||||||
|
android:privateImeOptions="com.google.android.inputmethod.latin.forceAscii"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- This delete button is only visible for numeric PIN entry -->
|
||||||
|
<ImageButton android:id="@+id/pinDel"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@android:drawable/ic_input_delete"
|
||||||
|
android:clickable="true"
|
||||||
|
android:padding="8dip"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<ImageView android:id="@+id/switch_ime_button"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:src="@drawable/ic_lockscreen_ime"
|
||||||
|
android:clickable="true"
|
||||||
|
android:padding="8dip"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<View
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dip"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:singleLine="true"
|
/>
|
||||||
android:textStyle="normal"
|
|
||||||
android:inputType="textPassword"
|
|
||||||
android:gravity="center"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="@dimen/keyguard_lockscreen_pin_margin_left"
|
|
||||||
android:textSize="24sp"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:background="@null"
|
|
||||||
android:textColor="#ffffffff"
|
|
||||||
android:privateImeOptions="com.google.android.inputmethod.latin.forceAscii"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- This delete button is only visible for numeric PIN entry -->
|
<!-- Numeric keyboard -->
|
||||||
<ImageButton android:id="@+id/pinDel"
|
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
|
||||||
|
android:layout_width="330dip"
|
||||||
|
android:layout_height="260dip"
|
||||||
|
android:background="#40000000"
|
||||||
|
android:keyBackground="@drawable/btn_keyboard_key_ics"
|
||||||
|
android:layout_marginBottom="80dip"
|
||||||
|
android:clickable="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- emergency call button -->
|
||||||
|
<Button android:id="@+id/emergencyCallButton"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@android:drawable/ic_input_delete"
|
android:drawableLeft="@drawable/ic_emergency"
|
||||||
android:clickable="true"
|
android:drawablePadding="8dip"
|
||||||
android:padding="8dip"
|
android:text="@string/lockscreen_emergency_call"
|
||||||
android:layout_gravity="center"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
/>
|
style="@style/Widget.Button.Transparent"
|
||||||
|
/>
|
||||||
<ImageView android:id="@+id/switch_ime_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:src="@drawable/ic_lockscreen_ime"
|
|
||||||
android:clickable="true"
|
|
||||||
android:padding="8dip"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:background="?android:attr/selectableItemBackground"
|
|
||||||
android:visibility="gone"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<View
|
<!-- Area to overlay FaceLock -->
|
||||||
android:layout_width="match_parent"
|
<View android:id="@+id/faceLockAreaView"
|
||||||
android:layout_height="0dip"
|
android:visibility="invisible"
|
||||||
android:layout_weight="1"
|
android:layout_width="512dip"
|
||||||
|
android:layout_height="512dip"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:background="@color/facelock_color_background"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- Numeric keyboard -->
|
</RelativeLayout>
|
||||||
<com.android.internal.widget.PasswordEntryKeyboardView android:id="@+id/keyboard"
|
|
||||||
android:layout_width="330dip"
|
|
||||||
android:layout_height="260dip"
|
|
||||||
android:background="#40000000"
|
|
||||||
android:keyBackground="@drawable/btn_keyboard_key_ics"
|
|
||||||
android:layout_marginBottom="80dip"
|
|
||||||
android:clickable="true"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- emergency call button -->
|
|
||||||
<Button
|
|
||||||
android:id="@+id/emergencyCallButton"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:drawableLeft="@drawable/ic_emergency"
|
|
||||||
android:drawablePadding="8dip"
|
|
||||||
android:text="@string/lockscreen_emergency_call"
|
|
||||||
android:visibility="gone"
|
|
||||||
style="@style/Widget.Button.Transparent"
|
|
||||||
/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -72,48 +72,65 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center_vertical|center_horizontal">
|
android:gravity="center_vertical|center_horizontal">
|
||||||
|
|
||||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
<RelativeLayout
|
||||||
android:layout_width="354dip"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="354dip"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<!-- Emergency and forgot pattern buttons. -->
|
|
||||||
<LinearLayout
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_below="@id/lockPattern"
|
android:layout_centerInParent="true"
|
||||||
android:layout_alignLeft="@id/lockPattern"
|
android:gravity="center_vertical|center_horizontal">
|
||||||
android:layout_alignRight="@id/lockPattern"
|
|
||||||
android:layout_marginTop="28dip"
|
|
||||||
android:gravity="center"
|
|
||||||
style="?android:attr/buttonBarStyle"
|
|
||||||
android:weightSum="2">
|
|
||||||
|
|
||||||
<Button android:id="@+id/forgotPatternButton"
|
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="354dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="354dip"
|
||||||
android:layout_gravity="center"
|
android:layout_gravity="center_vertical"
|
||||||
style="?android:attr/buttonBarButtonStyle"
|
|
||||||
android:drawableLeft="@drawable/lockscreen_forgot_password_button"
|
|
||||||
android:drawablePadding="8dip"
|
|
||||||
android:text="@string/lockscreen_forgot_pattern_button_text"
|
|
||||||
android:visibility="gone"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button android:id="@+id/emergencyCallButton"
|
<!-- Emergency and forgot pattern buttons. -->
|
||||||
android:layout_width="wrap_content"
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:orientation="horizontal"
|
||||||
style="?android:attr/buttonBarButtonStyle"
|
android:layout_below="@id/lockPattern"
|
||||||
android:drawableLeft="@drawable/ic_emergency"
|
android:layout_alignLeft="@id/lockPattern"
|
||||||
android:drawablePadding="8dip"
|
android:layout_alignRight="@id/lockPattern"
|
||||||
android:text="@string/lockscreen_emergency_call"
|
android:layout_marginTop="28dip"
|
||||||
android:visibility="gone"
|
style="?android:attr/buttonBarStyle"
|
||||||
/>
|
android:gravity="center"
|
||||||
|
android:weightSum="2">
|
||||||
|
|
||||||
</LinearLayout>
|
<Button android:id="@+id/forgotPatternButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
style="?android:attr/buttonBarButtonStyle"
|
||||||
|
android:drawableLeft="@drawable/lockscreen_forgot_password_button"
|
||||||
|
android:drawablePadding="8dip"
|
||||||
|
android:text="@string/lockscreen_forgot_pattern_button_text"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Button android:id="@+id/emergencyCallButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
style="?android:attr/buttonBarButtonStyle"
|
||||||
|
android:drawableLeft="@drawable/ic_emergency"
|
||||||
|
android:drawablePadding="8dip"
|
||||||
|
android:text="@string/lockscreen_emergency_call"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</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>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|||||||
@@ -62,52 +62,71 @@
|
|||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
<!-- bottom: lock pattern, emergency dialer and forgot pattern button -->
|
<!-- bottom: lock pattern, emergency dialer and forgot pattern button -->
|
||||||
<LinearLayout
|
<RelativeLayout
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dip"
|
android:layout_height="0dip"
|
||||||
android:orientation="vertical"
|
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
<RelativeLayout
|
||||||
android:layout_width="354dip"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="354dip"
|
|
||||||
android:layout_marginTop="50dip"/>
|
|
||||||
|
|
||||||
<!-- Emergency and forgot pattern buttons. -->
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:layout_centerInParent="true"
|
||||||
style="?android:attr/buttonBarStyle"
|
android:gravity="center">
|
||||||
android:gravity="center"
|
|
||||||
android:weightSum="2">
|
|
||||||
|
|
||||||
<Button android:id="@+id/forgotPatternButton"
|
<com.android.internal.widget.LockPatternView android:id="@+id/lockPattern"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="354dip"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="354dip"
|
||||||
android:layout_gravity="center"
|
android:layout_marginTop="50dip"
|
||||||
style="?android:attr/buttonBarButtonStyle"
|
|
||||||
android:drawableLeft="@drawable/lockscreen_forgot_password_button"
|
|
||||||
android:drawablePadding="8dip"
|
|
||||||
android:text="@string/lockscreen_forgot_pattern_button_text"
|
|
||||||
android:visibility="gone"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button android:id="@+id/emergencyCallButton"
|
<!-- Emergency and forgot pattern buttons. -->
|
||||||
android:layout_width="wrap_content"
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:orientation="horizontal"
|
||||||
style="?android:attr/buttonBarButtonStyle"
|
android:layout_below="@id/lockPattern"
|
||||||
android:drawableLeft="@drawable/ic_emergency"
|
android:layout_alignLeft="@id/lockPattern"
|
||||||
android:drawablePadding="8dip"
|
android:layout_alignRight="@id/lockPattern"
|
||||||
android:text="@string/lockscreen_emergency_call"
|
style="?android:attr/buttonBarStyle"
|
||||||
android:visibility="gone"
|
android:gravity="center"
|
||||||
/>
|
android:weightSum="2">
|
||||||
|
|
||||||
</LinearLayout>
|
<Button android:id="@+id/forgotPatternButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
style="?android:attr/buttonBarButtonStyle"
|
||||||
|
android:drawableLeft="@drawable/lockscreen_forgot_password_button"
|
||||||
|
android:drawablePadding="8dip"
|
||||||
|
android:text="@string/lockscreen_forgot_pattern_button_text"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
</LinearLayout>
|
<Button android:id="@+id/emergencyCallButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
style="?android:attr/buttonBarButtonStyle"
|
||||||
|
android:drawableLeft="@drawable/ic_emergency"
|
||||||
|
android:drawablePadding="8dip"
|
||||||
|
android:text="@string/lockscreen_emergency_call"
|
||||||
|
android:visibility="gone"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</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>
|
</com.android.internal.widget.LinearLayoutWithDefaultTouchRecepient>
|
||||||
|
|
||||||
|
|||||||
@@ -584,15 +584,20 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
|
|||||||
(failedBackupAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT);
|
(failedBackupAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT);
|
||||||
if (tooManyFaceUnlockTries) Log.i(TAG, "tooManyFaceUnlockTries: " + tooManyFaceUnlockTries);
|
if (tooManyFaceUnlockTries) Log.i(TAG, "tooManyFaceUnlockTries: " + tooManyFaceUnlockTries);
|
||||||
if (mUpdateMonitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE
|
if (mUpdateMonitor.getPhoneState() == TelephonyManager.CALL_STATE_IDLE
|
||||||
|
&& usingFaceLock()
|
||||||
&& !mHasOverlay
|
&& !mHasOverlay
|
||||||
&& !tooManyFaceUnlockTries
|
&& !tooManyFaceUnlockTries
|
||||||
&& !backupIsTimedOut) {
|
&& !backupIsTimedOut) {
|
||||||
bindToFaceLock();
|
bindToFaceLock();
|
||||||
|
|
||||||
// Show FaceLock area, but only for a little bit so lockpattern will become visible if
|
// Show FaceLock area, but only for a little bit so lockpattern will become visible if
|
||||||
// FaceLock fails to start or crashes
|
// FaceLock fails to start or crashes
|
||||||
if (usingFaceLock()) {
|
showFaceLockAreaWithTimeout(FACELOCK_VIEW_AREA_SERVICE_TIMEOUT);
|
||||||
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 {
|
} else {
|
||||||
hideFaceLockArea();
|
hideFaceLockArea();
|
||||||
}
|
}
|
||||||
@@ -1292,8 +1297,11 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mFaceLockAreaView != null) {
|
if (mFaceLockAreaView != null) {
|
||||||
|
int[] faceLockPosition;
|
||||||
|
faceLockPosition = new int[2];
|
||||||
|
mFaceLockAreaView.getLocationInWindow(faceLockPosition);
|
||||||
startFaceLock(mFaceLockAreaView.getWindowToken(),
|
startFaceLock(mFaceLockAreaView.getWindowToken(),
|
||||||
mFaceLockAreaView.getLeft(), mFaceLockAreaView.getTop(),
|
faceLockPosition[0], faceLockPosition[1],
|
||||||
mFaceLockAreaView.getWidth(), mFaceLockAreaView.getHeight());
|
mFaceLockAreaView.getWidth(), mFaceLockAreaView.getHeight());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1311,14 +1319,14 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Tells the FaceLock service to start displaying its UI and perform recognition
|
// 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()) {
|
if (usingFaceLock()) {
|
||||||
synchronized (mFaceLockServiceRunningLock) {
|
synchronized (mFaceLockServiceRunningLock) {
|
||||||
if (!mFaceLockServiceRunning) {
|
if (!mFaceLockServiceRunning) {
|
||||||
if (DEBUG) Log.d(TAG, "Starting FaceLock");
|
if (DEBUG) Log.d(TAG, "Starting FaceLock");
|
||||||
try {
|
try {
|
||||||
mFaceLockService.startUi(windowToken, x, y, h, w);
|
mFaceLockService.startUi(windowToken, x, y, w, h);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
Log.e(TAG, "Caught exception starting FaceLock: " + e.toString());
|
Log.e(TAG, "Caught exception starting FaceLock: " + e.toString());
|
||||||
return;
|
return;
|
||||||
@@ -1360,7 +1368,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
|
|||||||
public void unlock() {
|
public void unlock() {
|
||||||
if (DEBUG) Log.d(TAG, "FaceLock unlock()");
|
if (DEBUG) Log.d(TAG, "FaceLock unlock()");
|
||||||
showFaceLockArea(); // Keep fallback covered
|
showFaceLockArea(); // Keep fallback covered
|
||||||
stopFaceLock();
|
stopAndUnbindFromFaceLock();
|
||||||
|
|
||||||
mKeyguardScreenCallback.keyguardDone(true);
|
mKeyguardScreenCallback.keyguardDone(true);
|
||||||
mKeyguardScreenCallback.reportSuccessfulUnlockAttempt();
|
mKeyguardScreenCallback.reportSuccessfulUnlockAttempt();
|
||||||
@@ -1372,7 +1380,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
|
|||||||
public void cancel() {
|
public void cancel() {
|
||||||
if (DEBUG) Log.d(TAG, "FaceLock cancel()");
|
if (DEBUG) Log.d(TAG, "FaceLock cancel()");
|
||||||
hideFaceLockArea(); // Expose fallback
|
hideFaceLockArea(); // Expose fallback
|
||||||
stopFaceLock();
|
stopAndUnbindFromFaceLock();
|
||||||
mKeyguardScreenCallback.pokeWakelock(BACKUP_LOCK_TIMEOUT);
|
mKeyguardScreenCallback.pokeWakelock(BACKUP_LOCK_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1383,7 +1391,7 @@ public class LockPatternKeyguardView extends KeyguardViewBase implements Handler
|
|||||||
if (DEBUG) Log.d(TAG, "FaceLock reportFailedAttempt()");
|
if (DEBUG) Log.d(TAG, "FaceLock reportFailedAttempt()");
|
||||||
mFailedFaceUnlockAttempts++;
|
mFailedFaceUnlockAttempts++;
|
||||||
hideFaceLockArea(); // Expose fallback
|
hideFaceLockArea(); // Expose fallback
|
||||||
stopFaceLock();
|
stopAndUnbindFromFaceLock();
|
||||||
mKeyguardScreenCallback.pokeWakelock(BACKUP_LOCK_TIMEOUT);
|
mKeyguardScreenCallback.pokeWakelock(BACKUP_LOCK_TIMEOUT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user