Merge "For devices with udfps, always show bg on udfps" into sc-dev am: d2e60974cb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15392265 Change-Id: I1d0c75414634c4e2ddfc6dadde0bc5029d2962e9
This commit is contained in:
@@ -14,10 +14,11 @@
|
|||||||
-->
|
-->
|
||||||
<shape
|
<shape
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:androidprv="http://schemas.android.com/apk/prv/res/android"
|
||||||
android:shape="oval">
|
android:shape="oval">
|
||||||
|
|
||||||
<solid
|
<solid
|
||||||
android:color="?android:attr/colorBackground"/>
|
android:color="?androidprv:attr/colorSurface"/>
|
||||||
|
|
||||||
<size
|
<size
|
||||||
android:width="64dp"
|
android:width="64dp"
|
||||||
|
|||||||
42
packages/SystemUI/res/drawable/ic_unlock.xml
Normal file
42
packages/SystemUI/res/drawable/ic_unlock.xml
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<!--
|
||||||
|
Copyright (C) 2021 The Android Open Source Project
|
||||||
|
|
||||||
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
you may not use this file except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="65dp" android:width="46dp" android:viewportHeight="65" android:viewportWidth="46">
|
||||||
|
<group android:translateX="8.625" android:translateY="13.625">
|
||||||
|
<path
|
||||||
|
android:strokeColor="#FF000000"
|
||||||
|
android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2.5"
|
||||||
|
android:pathData="M4.75 15 C4.75,15 23.25,15 23.25,15 C24.35,15 25.25,15.9 25.25,17 C25.25,17 25.25,33 25.25,33 C25.25,34.1 24.35,35 23.25,35 C23.25,35 4.75,35 4.75,35 C3.65,35 2.75,34.1 2.75,33 C2.75,33 2.75,17 2.75,17 C2.75,15.9 3.65,15 4.75,15c " />
|
||||||
|
</group>
|
||||||
|
<group android:translateX="14" android:translateY="13.5">
|
||||||
|
<path
|
||||||
|
android:strokeColor="#FF000000"
|
||||||
|
android:strokeLineCap="round"
|
||||||
|
android:strokeLineJoin="round"
|
||||||
|
android:strokeWidth="2.5"
|
||||||
|
android:pathData="M27.19 14.81 C27.19,14.81 27.19,8.3 27.19,8.3 C27.19,4.92 24.44,2.88 21.19,2.75 C17.74,2.62 15,4.74 15,8.11 C15,8.11 15,15 15,15 " />
|
||||||
|
</group>
|
||||||
|
<group android:translateX="20" android:translateY="35.75">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FF000000"
|
||||||
|
android:fillAlpha="1"
|
||||||
|
android:fillType="nonZero"
|
||||||
|
android:pathData=" M2.75 5.25 C4.13,5.25 5.25,4.13 5.25,2.75 C5.25,1.37 4.13,0.25 2.75,0.25 C1.37,0.25 0.25,1.37 0.25,2.75 C0.25,4.13 1.37,5.25 2.75,5.25c " />
|
||||||
|
</group>
|
||||||
|
</vector>
|
||||||
@@ -55,9 +55,23 @@
|
|||||||
android:id="@+id/lock_icon_view"
|
android:id="@+id/lock_icon_view"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="48px"
|
android:layout_gravity="center">
|
||||||
android:layout_gravity="center"
|
<!-- Background protection -->
|
||||||
android:scaleType="centerCrop"/>
|
<ImageView
|
||||||
|
android:id="@+id/lock_icon_bg"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@drawable/fingerprint_bg"
|
||||||
|
android:visibility="invisible"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/lock_icon"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="48px"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:scaleType="centerCrop"/>
|
||||||
|
</com.android.keyguard.LockIconView>
|
||||||
|
|
||||||
<com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer
|
<com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|||||||
@@ -26,8 +26,7 @@
|
|||||||
android:id="@+id/udfps_keyguard_fp_bg"
|
android:id="@+id/udfps_keyguard_fp_bg"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@drawable/fingerprint_bg"
|
android:src="@drawable/fingerprint_bg"/>
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
<!-- Fingerprint -->
|
<!-- Fingerprint -->
|
||||||
<!-- AOD dashed fingerprint icon with moving dashes -->
|
<!-- AOD dashed fingerprint icon with moving dashes -->
|
||||||
|
|||||||
@@ -17,15 +17,20 @@
|
|||||||
package com.android.keyguard;
|
package com.android.keyguard;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.res.ColorStateList;
|
||||||
import android.graphics.PointF;
|
import android.graphics.PointF;
|
||||||
import android.graphics.RectF;
|
import android.graphics.RectF;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
import android.view.View;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
|
import com.android.settingslib.Utils;
|
||||||
import com.android.systemui.Dumpable;
|
import com.android.systemui.Dumpable;
|
||||||
|
import com.android.systemui.R;
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
@@ -33,16 +38,47 @@ import java.io.PrintWriter;
|
|||||||
/**
|
/**
|
||||||
* A view positioned under the notification shade.
|
* A view positioned under the notification shade.
|
||||||
*/
|
*/
|
||||||
public class LockIconView extends ImageView implements Dumpable {
|
public class LockIconView extends FrameLayout implements Dumpable {
|
||||||
@NonNull private final RectF mSensorRect;
|
@NonNull private final RectF mSensorRect;
|
||||||
@NonNull private PointF mLockIconCenter = new PointF(0f, 0f);
|
@NonNull private PointF mLockIconCenter = new PointF(0f, 0f);
|
||||||
private int mRadius;
|
private int mRadius;
|
||||||
|
|
||||||
|
private ImageView mLockIcon;
|
||||||
|
private ImageView mUnlockBgView;
|
||||||
|
|
||||||
|
private int mLockIconColor;
|
||||||
|
|
||||||
public LockIconView(Context context, AttributeSet attrs) {
|
public LockIconView(Context context, AttributeSet attrs) {
|
||||||
super(context, attrs);
|
super(context, attrs);
|
||||||
mSensorRect = new RectF();
|
mSensorRect = new RectF();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onFinishInflate() {
|
||||||
|
super.onFinishInflate();
|
||||||
|
mLockIcon = findViewById(R.id.lock_icon);
|
||||||
|
mUnlockBgView = findViewById(R.id.lock_icon_bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void updateColorAndBackgroundVisibility(boolean useBackground) {
|
||||||
|
if (useBackground) {
|
||||||
|
mLockIconColor = Utils.getColorAttrDefaultColor(getContext(),
|
||||||
|
android.R.attr.textColorPrimary);
|
||||||
|
mUnlockBgView.setBackground(getContext().getDrawable(R.drawable.fingerprint_bg));
|
||||||
|
mUnlockBgView.setVisibility(View.VISIBLE);
|
||||||
|
} else {
|
||||||
|
mLockIconColor = Utils.getColorAttrDefaultColor(getContext(),
|
||||||
|
R.attr.wallpaperTextColorAccent);
|
||||||
|
mUnlockBgView.setVisibility(View.GONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
mLockIcon.setImageTintList(ColorStateList.valueOf(mLockIconColor));
|
||||||
|
}
|
||||||
|
|
||||||
|
void setImageDrawable(Drawable drawable) {
|
||||||
|
mLockIcon.setImageDrawable(drawable);
|
||||||
|
}
|
||||||
|
|
||||||
void setCenterLocation(@NonNull PointF center, int radius) {
|
void setCenterLocation(@NonNull PointF center, int radius) {
|
||||||
mLockIconCenter = center;
|
mLockIconCenter = center;
|
||||||
mRadius = radius;
|
mRadius = radius;
|
||||||
@@ -70,7 +106,6 @@ public class LockIconView extends ImageView implements Dumpable {
|
|||||||
return mLockIconCenter.y - mRadius;
|
return mLockIconCenter.y - mRadius;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) {
|
public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) {
|
||||||
pw.println("Center in px (x, y)= (" + mLockIconCenter.x + ", " + mLockIconCenter.y + ")");
|
pw.println("Center in px (x, y)= (" + mLockIconCenter.x + ", " + mLockIconCenter.y + ")");
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
|
import androidx.core.view.accessibility.AccessibilityNodeInfoCompat;
|
||||||
|
|
||||||
import com.android.settingslib.Utils;
|
|
||||||
import com.android.systemui.Dumpable;
|
import com.android.systemui.Dumpable;
|
||||||
import com.android.systemui.R;
|
import com.android.systemui.R;
|
||||||
import com.android.systemui.biometrics.AuthController;
|
import com.android.systemui.biometrics.AuthController;
|
||||||
@@ -111,7 +110,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
private boolean mUserUnlockedWithBiometric;
|
private boolean mUserUnlockedWithBiometric;
|
||||||
private Runnable mCancelDelayedUpdateVisibilityRunnable;
|
private Runnable mCancelDelayedUpdateVisibilityRunnable;
|
||||||
|
|
||||||
private boolean mHasUdfps;
|
private boolean mUdfpsSupported;
|
||||||
private float mHeightPixels;
|
private float mHeightPixels;
|
||||||
private float mWidthPixels;
|
private float mWidthPixels;
|
||||||
private int mBottomPadding; // in pixels
|
private int mBottomPadding; // in pixels
|
||||||
@@ -152,9 +151,8 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
|
|
||||||
final Context context = view.getContext();
|
final Context context = view.getContext();
|
||||||
mUnlockIcon = mView.getContext().getResources().getDrawable(
|
mUnlockIcon = mView.getContext().getResources().getDrawable(
|
||||||
R.anim.lock_to_unlock,
|
R.drawable.ic_unlock,
|
||||||
mView.getContext().getTheme());
|
mView.getContext().getTheme());
|
||||||
((AnimatedVectorDrawable) mUnlockIcon).start();
|
|
||||||
mLockIcon = mView.getContext().getResources().getDrawable(
|
mLockIcon = mView.getContext().getResources().getDrawable(
|
||||||
R.anim.lock_to_unlock,
|
R.anim.lock_to_unlock,
|
||||||
mView.getContext().getTheme());
|
mView.getContext().getTheme());
|
||||||
@@ -177,7 +175,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
protected void onViewAttached() {
|
protected void onViewAttached() {
|
||||||
// we check this here instead of onInit since the FingerprintManager + FaceManager may not
|
// we check this here instead of onInit since the FingerprintManager + FaceManager may not
|
||||||
// have started up yet onInit
|
// have started up yet onInit
|
||||||
mHasUdfps = mAuthController.getUdfpsSensorLocation() != null;
|
mUdfpsSupported = mAuthController.getUdfpsSensorLocation() != null;
|
||||||
|
|
||||||
updateConfiguration();
|
updateConfiguration();
|
||||||
updateKeyguardShowing();
|
updateKeyguardShowing();
|
||||||
@@ -307,12 +305,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateColors() {
|
private void updateColors() {
|
||||||
final int color = Utils.getColorAttrDefaultColor(mView.getContext(),
|
mView.updateColorAndBackgroundVisibility(mUdfpsSupported);
|
||||||
R.attr.wallpaperTextColorAccent);
|
|
||||||
mFpToUnlockIcon.setTint(color);
|
|
||||||
mLockToUnlockIcon.setTint(color);
|
|
||||||
mLockIcon.setTint(color);
|
|
||||||
mUnlockIcon.setTint(color);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateConfiguration() {
|
private void updateConfiguration() {
|
||||||
@@ -325,7 +318,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void updateLockIconLocation() {
|
private void updateLockIconLocation() {
|
||||||
if (mHasUdfps) {
|
if (mUdfpsSupported) {
|
||||||
FingerprintSensorPropertiesInternal props = mAuthController.getUdfpsProps().get(0);
|
FingerprintSensorPropertiesInternal props = mAuthController.getUdfpsProps().get(0);
|
||||||
mView.setCenterLocation(new PointF(props.sensorLocationX, props.sensorLocationY),
|
mView.setCenterLocation(new PointF(props.sensorLocationX, props.sensorLocationY),
|
||||||
props.sensorRadius);
|
props.sensorRadius);
|
||||||
@@ -467,6 +460,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
@Override
|
@Override
|
||||||
public void onConfigChanged(Configuration newConfig) {
|
public void onConfigChanged(Configuration newConfig) {
|
||||||
updateConfiguration();
|
updateConfiguration();
|
||||||
|
updateColors();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -560,7 +554,7 @@ public class LockIconViewController extends ViewController<LockIconView> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isClickable() {
|
private boolean isClickable() {
|
||||||
return mUdfpsEnrolled || mShowUnlockIcon;
|
return mUdfpsSupported || mShowUnlockIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ import com.android.systemui.statusbar.LockscreenShadeTransitionController;
|
|||||||
import com.android.systemui.statusbar.phone.KeyguardBypassController;
|
import com.android.systemui.statusbar.phone.KeyguardBypassController;
|
||||||
import com.android.systemui.statusbar.phone.StatusBar;
|
import com.android.systemui.statusbar.phone.StatusBar;
|
||||||
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
||||||
|
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||||
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
||||||
import com.android.systemui.util.concurrency.DelayableExecutor;
|
import com.android.systemui.util.concurrency.DelayableExecutor;
|
||||||
import com.android.systemui.util.concurrency.Execution;
|
import com.android.systemui.util.concurrency.Execution;
|
||||||
@@ -123,6 +124,7 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
@NonNull private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
|
@NonNull private final LockscreenShadeTransitionController mLockscreenShadeTransitionController;
|
||||||
@Nullable private final UdfpsHbmProvider mHbmProvider;
|
@Nullable private final UdfpsHbmProvider mHbmProvider;
|
||||||
@NonNull private final KeyguardBypassController mKeyguardBypassController;
|
@NonNull private final KeyguardBypassController mKeyguardBypassController;
|
||||||
|
@NonNull private final ConfigurationController mConfigurationController;
|
||||||
@VisibleForTesting @NonNull final BiometricOrientationEventListener mOrientationListener;
|
@VisibleForTesting @NonNull final BiometricOrientationEventListener mOrientationListener;
|
||||||
// Currently the UdfpsController supports a single UDFPS sensor. If devices have multiple
|
// Currently the UdfpsController supports a single UDFPS sensor. If devices have multiple
|
||||||
// sensors, this, in addition to a lot of the code here, will be updated.
|
// sensors, this, in addition to a lot of the code here, will be updated.
|
||||||
@@ -522,7 +524,8 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
@NonNull KeyguardStateController keyguardStateController,
|
@NonNull KeyguardStateController keyguardStateController,
|
||||||
@NonNull KeyguardBypassController keyguardBypassController,
|
@NonNull KeyguardBypassController keyguardBypassController,
|
||||||
@NonNull DisplayManager displayManager,
|
@NonNull DisplayManager displayManager,
|
||||||
@Main Handler mainHandler) {
|
@Main Handler mainHandler,
|
||||||
|
@NonNull ConfigurationController configurationController) {
|
||||||
mContext = context;
|
mContext = context;
|
||||||
mExecution = execution;
|
mExecution = execution;
|
||||||
// TODO (b/185124905): inject main handler and vibrator once done prototyping
|
// TODO (b/185124905): inject main handler and vibrator once done prototyping
|
||||||
@@ -557,6 +560,7 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
displayManager,
|
displayManager,
|
||||||
mainHandler);
|
mainHandler);
|
||||||
mKeyguardBypassController = keyguardBypassController;
|
mKeyguardBypassController = keyguardBypassController;
|
||||||
|
mConfigurationController = configurationController;
|
||||||
|
|
||||||
mSensorProps = findFirstUdfps();
|
mSensorProps = findFirstUdfps();
|
||||||
// At least one UDFPS sensor exists
|
// At least one UDFPS sensor exists
|
||||||
@@ -776,6 +780,7 @@ public class UdfpsController implements DozeReceiver {
|
|||||||
mDumpManager,
|
mDumpManager,
|
||||||
mKeyguardViewMediator,
|
mKeyguardViewMediator,
|
||||||
mLockscreenShadeTransitionController,
|
mLockscreenShadeTransitionController,
|
||||||
|
mConfigurationController,
|
||||||
this
|
this
|
||||||
);
|
);
|
||||||
case IUdfpsOverlayController.REASON_AUTH_BP:
|
case IUdfpsOverlayController.REASON_AUTH_BP:
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import static com.android.systemui.doze.util.BurnInHelperKt.getBurnInProgressOff
|
|||||||
import android.animation.Animator;
|
import android.animation.Animator;
|
||||||
import android.animation.AnimatorListenerAdapter;
|
import android.animation.AnimatorListenerAdapter;
|
||||||
import android.animation.AnimatorSet;
|
import android.animation.AnimatorSet;
|
||||||
import android.animation.ArgbEvaluator;
|
|
||||||
import android.animation.ObjectAnimator;
|
import android.animation.ObjectAnimator;
|
||||||
import android.animation.ValueAnimator;
|
import android.animation.ValueAnimator;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -51,17 +50,14 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
|
|||||||
private UdfpsDrawable mFingerprintDrawable; // placeholder
|
private UdfpsDrawable mFingerprintDrawable; // placeholder
|
||||||
private LottieAnimationView mAodFp;
|
private LottieAnimationView mAodFp;
|
||||||
private LottieAnimationView mLockScreenFp;
|
private LottieAnimationView mLockScreenFp;
|
||||||
private int mUdfpsBouncerColor;
|
|
||||||
private int mWallpaperTextColor;
|
|
||||||
private int mStatusBarState;
|
private int mStatusBarState;
|
||||||
|
|
||||||
// used when highlighting fp icon:
|
// used when highlighting fp icon:
|
||||||
private int mTextColorPrimary;
|
private int mTextColorPrimary;
|
||||||
private ImageView mBgProtection;
|
private ImageView mBgProtection;
|
||||||
boolean mUdfpsRequested;
|
boolean mUdfpsRequested;
|
||||||
int mUdfpsRequestedColor;
|
|
||||||
|
|
||||||
private AnimatorSet mAnimatorSet;
|
private AnimatorSet mBackgroundInAnimator = new AnimatorSet();
|
||||||
private int mAlpha; // 0-255
|
private int mAlpha; // 0-255
|
||||||
|
|
||||||
// AOD anti-burn-in offsets
|
// AOD anti-burn-in offsets
|
||||||
@@ -89,20 +85,15 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
|
|||||||
super.onFinishInflate();
|
super.onFinishInflate();
|
||||||
mAodFp = findViewById(R.id.udfps_aod_fp);
|
mAodFp = findViewById(R.id.udfps_aod_fp);
|
||||||
mLockScreenFp = findViewById(R.id.udfps_lockscreen_fp);
|
mLockScreenFp = findViewById(R.id.udfps_lockscreen_fp);
|
||||||
|
|
||||||
mBgProtection = findViewById(R.id.udfps_keyguard_fp_bg);
|
mBgProtection = findViewById(R.id.udfps_keyguard_fp_bg);
|
||||||
|
|
||||||
mWallpaperTextColor = Utils.getColorAttrDefaultColor(mContext,
|
updateColor();
|
||||||
R.attr.wallpaperTextColorAccent);
|
|
||||||
mTextColorPrimary = Utils.getColorAttrDefaultColor(mContext,
|
|
||||||
android.R.attr.textColorPrimary);
|
|
||||||
|
|
||||||
// requires call to invalidate to update the color (see #updateColor)
|
// requires call to invalidate to update the color
|
||||||
mLockScreenFp.addValueCallback(
|
mLockScreenFp.addValueCallback(
|
||||||
new KeyPath("**"), LottieProperty.COLOR_FILTER,
|
new KeyPath("**"), LottieProperty.COLOR_FILTER,
|
||||||
frameInfo -> new PorterDuffColorFilter(getColor(), PorterDuff.Mode.SRC_ATOP)
|
frameInfo -> new PorterDuffColorFilter(mTextColorPrimary, PorterDuff.Mode.SRC_ATOP)
|
||||||
);
|
);
|
||||||
mUdfpsRequested = false;
|
|
||||||
|
|
||||||
mHintAnimator = ObjectAnimator.ofFloat(mLockScreenFp, "progress", 1f, 0f, 1f);
|
mHintAnimator = ObjectAnimator.ofFloat(mLockScreenFp, "progress", 1f, 0f, 1f);
|
||||||
mHintAnimator.setDuration(4000);
|
mHintAnimator.setDuration(4000);
|
||||||
@@ -148,13 +139,7 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void requestUdfps(boolean request, int color) {
|
void requestUdfps(boolean request, int color) {
|
||||||
if (request) {
|
|
||||||
mUdfpsRequestedColor = color;
|
|
||||||
} else {
|
|
||||||
mUdfpsRequestedColor = -1;
|
|
||||||
}
|
|
||||||
mUdfpsRequested = request;
|
mUdfpsRequested = request;
|
||||||
updateColor();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void setStatusBarState(int statusBarState) {
|
void setStatusBarState(int statusBarState) {
|
||||||
@@ -162,31 +147,10 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void updateColor() {
|
void updateColor() {
|
||||||
mWallpaperTextColor = Utils.getColorAttrDefaultColor(mContext,
|
|
||||||
R.attr.wallpaperTextColorAccent);
|
|
||||||
mTextColorPrimary = Utils.getColorAttrDefaultColor(mContext,
|
mTextColorPrimary = Utils.getColorAttrDefaultColor(mContext,
|
||||||
android.R.attr.textColorPrimary);
|
android.R.attr.textColorPrimary);
|
||||||
mLockScreenFp.invalidate();
|
mBgProtection.setImageDrawable(getContext().getDrawable(R.drawable.fingerprint_bg));
|
||||||
mBgProtection.setBackground(getContext().getDrawable(R.drawable.fingerprint_bg));
|
mLockScreenFp.invalidate(); // updated with a valueCallback
|
||||||
}
|
|
||||||
|
|
||||||
private boolean showingUdfpsBouncer() {
|
|
||||||
return mBgProtection.getVisibility() == View.VISIBLE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private int getColor() {
|
|
||||||
if (isUdfpsColorRequested()) {
|
|
||||||
return mUdfpsRequestedColor;
|
|
||||||
} else if (showingUdfpsBouncer()) {
|
|
||||||
return mUdfpsBouncerColor;
|
|
||||||
} else {
|
|
||||||
return mWallpaperTextColor;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isUdfpsColorRequested() {
|
|
||||||
return mUdfpsRequested && mUdfpsRequestedColor != -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -200,7 +164,13 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
|
|||||||
@Override
|
@Override
|
||||||
protected int updateAlpha() {
|
protected int updateAlpha() {
|
||||||
int alpha = super.updateAlpha();
|
int alpha = super.updateAlpha();
|
||||||
mLockScreenFp.setImageAlpha(alpha);
|
mLockScreenFp.setAlpha(alpha / 255f);
|
||||||
|
if (mInterpolatedDarkAmount != 0f) {
|
||||||
|
mBgProtection.setAlpha(1f - mInterpolatedDarkAmount);
|
||||||
|
} else {
|
||||||
|
mBgProtection.setAlpha(alpha / 255f);
|
||||||
|
}
|
||||||
|
|
||||||
return alpha;
|
return alpha;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,6 +185,7 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
|
|||||||
void onDozeAmountChanged(float linear, float eased) {
|
void onDozeAmountChanged(float linear, float eased) {
|
||||||
mHintAnimator.cancel();
|
mHintAnimator.cancel();
|
||||||
mInterpolatedDarkAmount = eased;
|
mInterpolatedDarkAmount = eased;
|
||||||
|
updateAlpha();
|
||||||
updateBurnInOffsets();
|
updateBurnInOffsets();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,52 +199,21 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
|
|||||||
/**
|
/**
|
||||||
* Animates in the bg protection circle behind the fp icon to highlight the icon.
|
* Animates in the bg protection circle behind the fp icon to highlight the icon.
|
||||||
*/
|
*/
|
||||||
void animateUdfpsBouncer(Runnable onEndAnimation) {
|
void animateInUdfpsBouncer(Runnable onEndAnimation) {
|
||||||
if (showingUdfpsBouncer() && mBgProtection.getAlpha() == 1f) {
|
if (mBackgroundInAnimator.isRunning()) {
|
||||||
// already fully highlighted, don't re-animate
|
// already animating in
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mAnimatorSet != null) {
|
// fade in and scale up
|
||||||
mAnimatorSet.cancel();
|
mBackgroundInAnimator = new AnimatorSet();
|
||||||
}
|
mBackgroundInAnimator.playTogether(
|
||||||
|
|
||||||
mAnimatorSet = new AnimatorSet();
|
|
||||||
mAnimatorSet.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
|
|
||||||
mAnimatorSet.setDuration(500);
|
|
||||||
mAnimatorSet.addListener(new AnimatorListenerAdapter() {
|
|
||||||
@Override
|
|
||||||
public void onAnimationStart(Animator animation) {
|
|
||||||
mBgProtection.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
ValueAnimator fpIconColorAnim;
|
|
||||||
if (isShadeLocked()) {
|
|
||||||
// set color and fade in since we weren't showing before
|
|
||||||
mUdfpsBouncerColor = mTextColorPrimary;
|
|
||||||
fpIconColorAnim = ValueAnimator.ofInt(0, 255);
|
|
||||||
fpIconColorAnim.addUpdateListener(valueAnimator ->
|
|
||||||
mLockScreenFp.setImageAlpha((int) valueAnimator.getAnimatedValue()));
|
|
||||||
} else {
|
|
||||||
// update icon color
|
|
||||||
fpIconColorAnim = new ValueAnimator();
|
|
||||||
fpIconColorAnim.setIntValues(
|
|
||||||
isUdfpsColorRequested() ? mUdfpsRequestedColor : mWallpaperTextColor,
|
|
||||||
mTextColorPrimary);
|
|
||||||
fpIconColorAnim.setEvaluator(ArgbEvaluator.getInstance());
|
|
||||||
fpIconColorAnim.addUpdateListener(valueAnimator -> {
|
|
||||||
mUdfpsBouncerColor = (int) valueAnimator.getAnimatedValue();
|
|
||||||
updateColor();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
mAnimatorSet.playTogether(
|
|
||||||
ObjectAnimator.ofFloat(mBgProtection, View.ALPHA, 0f, 1f),
|
ObjectAnimator.ofFloat(mBgProtection, View.ALPHA, 0f, 1f),
|
||||||
ObjectAnimator.ofFloat(mBgProtection, View.SCALE_X, 0f, 1f),
|
ObjectAnimator.ofFloat(mBgProtection, View.SCALE_X, 0f, 1f),
|
||||||
ObjectAnimator.ofFloat(mBgProtection, View.SCALE_Y, 0f, 1f),
|
ObjectAnimator.ofFloat(mBgProtection, View.SCALE_Y, 0f, 1f));
|
||||||
fpIconColorAnim);
|
mBackgroundInAnimator.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
|
||||||
mAnimatorSet.addListener(new AnimatorListenerAdapter() {
|
mBackgroundInAnimator.setDuration(500);
|
||||||
|
mBackgroundInAnimator.addListener(new AnimatorListenerAdapter() {
|
||||||
@Override
|
@Override
|
||||||
public void onAnimationEnd(Animator animation) {
|
public void onAnimationEnd(Animator animation) {
|
||||||
if (onEndAnimation != null) {
|
if (onEndAnimation != null) {
|
||||||
@@ -281,66 +221,7 @@ public class UdfpsKeyguardView extends UdfpsAnimationView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
mAnimatorSet.start();
|
mBackgroundInAnimator.start();
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Animates out the bg protection circle behind the fp icon to unhighlight the icon.
|
|
||||||
*/
|
|
||||||
void animateAwayUdfpsBouncer(@Nullable Runnable onEndAnimation) {
|
|
||||||
if (!showingUdfpsBouncer()) {
|
|
||||||
// already hidden
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mAnimatorSet != null) {
|
|
||||||
mAnimatorSet.cancel();
|
|
||||||
}
|
|
||||||
|
|
||||||
ValueAnimator fpIconColorAnim;
|
|
||||||
if (isShadeLocked()) {
|
|
||||||
// fade out
|
|
||||||
mUdfpsBouncerColor = mTextColorPrimary;
|
|
||||||
fpIconColorAnim = ValueAnimator.ofInt(255, 0);
|
|
||||||
fpIconColorAnim.addUpdateListener(valueAnimator ->
|
|
||||||
mLockScreenFp.setImageAlpha((int) valueAnimator.getAnimatedValue()));
|
|
||||||
} else {
|
|
||||||
// update icon color
|
|
||||||
fpIconColorAnim = new ValueAnimator();
|
|
||||||
fpIconColorAnim.setIntValues(
|
|
||||||
mTextColorPrimary,
|
|
||||||
isUdfpsColorRequested() ? mUdfpsRequestedColor : mWallpaperTextColor);
|
|
||||||
fpIconColorAnim.setEvaluator(ArgbEvaluator.getInstance());
|
|
||||||
fpIconColorAnim.addUpdateListener(valueAnimator -> {
|
|
||||||
mUdfpsBouncerColor = (int) valueAnimator.getAnimatedValue();
|
|
||||||
updateColor();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
mAnimatorSet = new AnimatorSet();
|
|
||||||
mAnimatorSet.playTogether(
|
|
||||||
ObjectAnimator.ofFloat(mBgProtection, View.ALPHA, 1f, 0f),
|
|
||||||
ObjectAnimator.ofFloat(mBgProtection, View.SCALE_X, 1f, 0f),
|
|
||||||
ObjectAnimator.ofFloat(mBgProtection, View.SCALE_Y, 1f, 0f),
|
|
||||||
fpIconColorAnim);
|
|
||||||
mAnimatorSet.setInterpolator(Interpolators.FAST_OUT_SLOW_IN);
|
|
||||||
mAnimatorSet.setDuration(500);
|
|
||||||
|
|
||||||
mAnimatorSet.addListener(new AnimatorListenerAdapter() {
|
|
||||||
@Override
|
|
||||||
public void onAnimationEnd(Animator animation) {
|
|
||||||
mBgProtection.setVisibility(View.GONE);
|
|
||||||
if (onEndAnimation != null) {
|
|
||||||
onEndAnimation.run();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
mAnimatorSet.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean isAnimating() {
|
|
||||||
return mAnimatorSet != null && mAnimatorSet.isRunning();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isShadeLocked() {
|
private boolean isShadeLocked() {
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ package com.android.systemui.biometrics;
|
|||||||
import static com.android.systemui.statusbar.StatusBarState.KEYGUARD;
|
import static com.android.systemui.statusbar.StatusBarState.KEYGUARD;
|
||||||
|
|
||||||
import android.annotation.NonNull;
|
import android.annotation.NonNull;
|
||||||
|
import android.content.res.Configuration;
|
||||||
import android.hardware.biometrics.BiometricSourceType;
|
import android.hardware.biometrics.BiometricSourceType;
|
||||||
import android.util.MathUtils;
|
import android.util.MathUtils;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
@@ -36,6 +37,7 @@ import com.android.systemui.statusbar.StatusBarState;
|
|||||||
import com.android.systemui.statusbar.phone.KeyguardBouncer;
|
import com.android.systemui.statusbar.phone.KeyguardBouncer;
|
||||||
import com.android.systemui.statusbar.phone.StatusBar;
|
import com.android.systemui.statusbar.phone.StatusBar;
|
||||||
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
||||||
|
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||||
import com.android.systemui.util.concurrency.DelayableExecutor;
|
import com.android.systemui.util.concurrency.DelayableExecutor;
|
||||||
|
|
||||||
import java.io.FileDescriptor;
|
import java.io.FileDescriptor;
|
||||||
@@ -58,6 +60,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
@NonNull private final DelayableExecutor mExecutor;
|
@NonNull private final DelayableExecutor mExecutor;
|
||||||
@NonNull private final KeyguardViewMediator mKeyguardViewMediator;
|
@NonNull private final KeyguardViewMediator mKeyguardViewMediator;
|
||||||
@NonNull private final LockscreenShadeTransitionController mLockScreenShadeTransitionController;
|
@NonNull private final LockscreenShadeTransitionController mLockScreenShadeTransitionController;
|
||||||
|
@NonNull private final ConfigurationController mConfigurationController;
|
||||||
@NonNull private final UdfpsController mUdfpsController;
|
@NonNull private final UdfpsController mUdfpsController;
|
||||||
|
|
||||||
@Nullable private Runnable mCancelDelayedHintRunnable;
|
@Nullable private Runnable mCancelDelayedHintRunnable;
|
||||||
@@ -88,6 +91,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
@NonNull DumpManager dumpManager,
|
@NonNull DumpManager dumpManager,
|
||||||
@NonNull KeyguardViewMediator keyguardViewMediator,
|
@NonNull KeyguardViewMediator keyguardViewMediator,
|
||||||
@NonNull LockscreenShadeTransitionController transitionController,
|
@NonNull LockscreenShadeTransitionController transitionController,
|
||||||
|
@NonNull ConfigurationController configurationController,
|
||||||
@NonNull UdfpsController udfpsController) {
|
@NonNull UdfpsController udfpsController) {
|
||||||
super(view, statusBarStateController, statusBarOptional, dumpManager);
|
super(view, statusBarStateController, statusBarOptional, dumpManager);
|
||||||
mKeyguardViewManager = statusBarKeyguardViewManager;
|
mKeyguardViewManager = statusBarKeyguardViewManager;
|
||||||
@@ -95,6 +99,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
mExecutor = mainDelayableExecutor;
|
mExecutor = mainDelayableExecutor;
|
||||||
mKeyguardViewMediator = keyguardViewMediator;
|
mKeyguardViewMediator = keyguardViewMediator;
|
||||||
mLockScreenShadeTransitionController = transitionController;
|
mLockScreenShadeTransitionController = transitionController;
|
||||||
|
mConfigurationController = configurationController;
|
||||||
mUdfpsController = udfpsController;
|
mUdfpsController = udfpsController;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,6 +126,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
mQsExpanded = mKeyguardViewManager.isQsExpanded();
|
mQsExpanded = mKeyguardViewManager.isQsExpanded();
|
||||||
mInputBouncerHiddenAmount = KeyguardBouncer.EXPANSION_HIDDEN;
|
mInputBouncerHiddenAmount = KeyguardBouncer.EXPANSION_HIDDEN;
|
||||||
mIsBouncerVisible = mKeyguardViewManager.bouncerIsOrWillBeShowing();
|
mIsBouncerVisible = mKeyguardViewManager.bouncerIsOrWillBeShowing();
|
||||||
|
mConfigurationController.addCallback(mConfigurationListener);
|
||||||
updateAlpha();
|
updateAlpha();
|
||||||
updatePauseAuth();
|
updatePauseAuth();
|
||||||
|
|
||||||
@@ -137,6 +143,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
mStatusBarStateController.removeCallback(mStateListener);
|
mStatusBarStateController.removeCallback(mStateListener);
|
||||||
mKeyguardViewManager.removeAlternateAuthInterceptor(mAlternateAuthInterceptor);
|
mKeyguardViewManager.removeAlternateAuthInterceptor(mAlternateAuthInterceptor);
|
||||||
mKeyguardUpdateMonitor.requestFaceAuthOnOccludingApp(false);
|
mKeyguardUpdateMonitor.requestFaceAuthOnOccludingApp(false);
|
||||||
|
mConfigurationController.removeCallback(mConfigurationListener);
|
||||||
if (mLockScreenShadeTransitionController.getUdfpsKeyguardViewController() == this) {
|
if (mLockScreenShadeTransitionController.getUdfpsKeyguardViewController() == this) {
|
||||||
mLockScreenShadeTransitionController.setUdfpsKeyguardViewController(null);
|
mLockScreenShadeTransitionController.setUdfpsKeyguardViewController(null);
|
||||||
}
|
}
|
||||||
@@ -159,7 +166,6 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
pw.println("mAlpha=" + mView.getAlpha());
|
pw.println("mAlpha=" + mView.getAlpha());
|
||||||
pw.println("mUdfpsRequested=" + mUdfpsRequested);
|
pw.println("mUdfpsRequested=" + mUdfpsRequested);
|
||||||
pw.println("mView.mUdfpsRequested=" + mView.mUdfpsRequested);
|
pw.println("mView.mUdfpsRequested=" + mView.mUdfpsRequested);
|
||||||
pw.println("mView.mUdfpsRequestedColor=" + mView.mUdfpsRequestedColor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -174,12 +180,17 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
mShowingUdfpsBouncer = show;
|
mShowingUdfpsBouncer = show;
|
||||||
updatePauseAuth();
|
updatePauseAuth();
|
||||||
if (mShowingUdfpsBouncer) {
|
if (mShowingUdfpsBouncer) {
|
||||||
mView.animateUdfpsBouncer(() ->
|
if (mStatusBarState == StatusBarState.SHADE_LOCKED) {
|
||||||
mKeyguardUpdateMonitor.requestFaceAuthOnOccludingApp(true));
|
mView.animateInUdfpsBouncer(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mKeyguardViewManager.isOccluded()) {
|
||||||
|
mKeyguardUpdateMonitor.requestFaceAuthOnOccludingApp(true);
|
||||||
|
}
|
||||||
|
|
||||||
mView.announceForAccessibility(mView.getContext().getString(
|
mView.announceForAccessibility(mView.getContext().getString(
|
||||||
R.string.accessibility_fingerprint_bouncer));
|
R.string.accessibility_fingerprint_bouncer));
|
||||||
} else {
|
} else {
|
||||||
mView.animateAwayUdfpsBouncer(null);
|
|
||||||
mKeyguardUpdateMonitor.requestFaceAuthOnOccludingApp(false);
|
mKeyguardUpdateMonitor.requestFaceAuthOnOccludingApp(false);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@@ -367,7 +378,7 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAnimating() {
|
public boolean isAnimating() {
|
||||||
return mView.isAnimating();
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -408,4 +419,27 @@ public class UdfpsKeyguardViewController extends UdfpsAnimationViewController<Ud
|
|||||||
pw.println(getTag());
|
pw.println(getTag());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private final ConfigurationController.ConfigurationListener mConfigurationListener =
|
||||||
|
new ConfigurationController.ConfigurationListener() {
|
||||||
|
@Override
|
||||||
|
public void onUiModeChanged() {
|
||||||
|
mView.updateColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onThemeChanged() {
|
||||||
|
mView.updateColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onOverlayChanged() {
|
||||||
|
mView.updateColor();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onConfigChanged(Configuration newConfig) {
|
||||||
|
mView.updateColor();
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ import com.android.systemui.statusbar.LockscreenShadeTransitionController;
|
|||||||
import com.android.systemui.statusbar.phone.KeyguardBypassController;
|
import com.android.systemui.statusbar.phone.KeyguardBypassController;
|
||||||
import com.android.systemui.statusbar.phone.StatusBar;
|
import com.android.systemui.statusbar.phone.StatusBar;
|
||||||
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
||||||
|
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||||
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
||||||
import com.android.systemui.util.concurrency.Execution;
|
import com.android.systemui.util.concurrency.Execution;
|
||||||
import com.android.systemui.util.concurrency.FakeExecution;
|
import com.android.systemui.util.concurrency.FakeExecution;
|
||||||
@@ -144,6 +145,8 @@ public class UdfpsControllerTest extends SysuiTestCase {
|
|||||||
private DisplayManager mDisplayManager;
|
private DisplayManager mDisplayManager;
|
||||||
@Mock
|
@Mock
|
||||||
private Handler mHandler;
|
private Handler mHandler;
|
||||||
|
@Mock
|
||||||
|
private ConfigurationController mConfigurationController;
|
||||||
|
|
||||||
private FakeExecutor mFgExecutor;
|
private FakeExecutor mFgExecutor;
|
||||||
|
|
||||||
@@ -225,7 +228,8 @@ public class UdfpsControllerTest extends SysuiTestCase {
|
|||||||
mKeyguardStateController,
|
mKeyguardStateController,
|
||||||
mKeyguardBypassController,
|
mKeyguardBypassController,
|
||||||
mDisplayManager,
|
mDisplayManager,
|
||||||
mHandler);
|
mHandler,
|
||||||
|
mConfigurationController);
|
||||||
verify(mFingerprintManager).setUdfpsOverlayController(mOverlayCaptor.capture());
|
verify(mFingerprintManager).setUdfpsOverlayController(mOverlayCaptor.capture());
|
||||||
mOverlayController = mOverlayCaptor.getValue();
|
mOverlayController = mOverlayCaptor.getValue();
|
||||||
verify(mScreenLifecycle).addObserver(mScreenObserverCaptor.capture());
|
verify(mScreenLifecycle).addObserver(mScreenObserverCaptor.capture());
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import com.android.systemui.statusbar.LockscreenShadeTransitionController;
|
|||||||
import com.android.systemui.statusbar.StatusBarState;
|
import com.android.systemui.statusbar.StatusBarState;
|
||||||
import com.android.systemui.statusbar.phone.StatusBar;
|
import com.android.systemui.statusbar.phone.StatusBar;
|
||||||
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
|
||||||
|
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||||
import com.android.systemui.util.concurrency.DelayableExecutor;
|
import com.android.systemui.util.concurrency.DelayableExecutor;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
@@ -77,6 +78,8 @@ public class UdfpsKeyguardViewControllerTest extends SysuiTestCase {
|
|||||||
@Mock
|
@Mock
|
||||||
private KeyguardViewMediator mKeyguardViewMediator;
|
private KeyguardViewMediator mKeyguardViewMediator;
|
||||||
@Mock
|
@Mock
|
||||||
|
private ConfigurationController mConfigurationController;
|
||||||
|
@Mock
|
||||||
private UdfpsController mUdfpsController;
|
private UdfpsController mUdfpsController;
|
||||||
|
|
||||||
private UdfpsKeyguardViewController mController;
|
private UdfpsKeyguardViewController mController;
|
||||||
@@ -111,6 +114,7 @@ public class UdfpsKeyguardViewControllerTest extends SysuiTestCase {
|
|||||||
mDumpManager,
|
mDumpManager,
|
||||||
mKeyguardViewMediator,
|
mKeyguardViewMediator,
|
||||||
mLockscreenShadeTransitionController,
|
mLockscreenShadeTransitionController,
|
||||||
|
mConfigurationController,
|
||||||
mUdfpsController);
|
mUdfpsController);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user