Loading packages/SystemUI/res/layout/auth_biometric_contents.xml +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ android:layout_width="@dimen/biometric_dialog_biometric_icon_size" android:layout_height="@dimen/biometric_dialog_biometric_icon_size" android:layout_gravity="center" android:contentDescription="@null" android:scaleType="fitXY" /> </FrameLayout> Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.java +27 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.util.Log; import androidx.annotation.Nullable; import com.android.systemui.R; public class AuthBiometricFingerprintView extends AuthBiometricView { Loading Loading @@ -94,12 +96,37 @@ public class AuthBiometricFingerprintView extends AuthBiometricView { mIconView.setImageDrawable(icon); final CharSequence iconContentDescription = getIconContentDescription(newState); if (iconContentDescription != null) { mIconView.setContentDescription(iconContentDescription); } if (animation != null && shouldAnimateForTransition(lastState, newState)) { animation.forceAnimationOnUI(); animation.start(); } } @Nullable private CharSequence getIconContentDescription(int newState) { switch (newState) { case STATE_IDLE: case STATE_AUTHENTICATING_ANIMATING_IN: case STATE_AUTHENTICATING: case STATE_PENDING_CONFIRMATION: case STATE_AUTHENTICATED: return mContext.getString( R.string.accessibility_fingerprint_dialog_fingerprint_icon); case STATE_ERROR: case STATE_HELP: return mContext.getString(R.string.biometric_dialog_try_again); default: return null; } } private boolean shouldAnimateForTransition(int oldState, int newState) { switch (newState) { case STATE_HELP: Loading packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java +0 −1 Original line number Diff line number Diff line Loading @@ -636,7 +636,6 @@ public abstract class AuthBiometricView extends LinearLayout { mIndicatorView.setText(message); mIndicatorView.setTextColor(mTextColorError); mIndicatorView.setVisibility(View.VISIBLE); mIndicatorView.setSelected(true); mHandler.postDelayed(resetMessageRunnable, mInjector.getDelayAfterError()); Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this); Loading packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +2 −1 Original line number Diff line number Diff line Loading @@ -698,7 +698,8 @@ public class UdfpsController implements DozeReceiver { // This view overlaps the sensor area, so prevent it from being selectable // during a11y. if (reason == IUdfpsOverlayController.REASON_ENROLL_FIND_SENSOR || reason == IUdfpsOverlayController.REASON_ENROLL_ENROLLING) { || reason == IUdfpsOverlayController.REASON_ENROLL_ENROLLING || reason == IUdfpsOverlayController.REASON_AUTH_BP) { mView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); } Loading Loading
packages/SystemUI/res/layout/auth_biometric_contents.xml +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ android:layout_width="@dimen/biometric_dialog_biometric_icon_size" android:layout_height="@dimen/biometric_dialog_biometric_icon_size" android:layout_gravity="center" android:contentDescription="@null" android:scaleType="fitXY" /> </FrameLayout> Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFingerprintView.java +27 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,8 @@ import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.util.Log; import androidx.annotation.Nullable; import com.android.systemui.R; public class AuthBiometricFingerprintView extends AuthBiometricView { Loading Loading @@ -94,12 +96,37 @@ public class AuthBiometricFingerprintView extends AuthBiometricView { mIconView.setImageDrawable(icon); final CharSequence iconContentDescription = getIconContentDescription(newState); if (iconContentDescription != null) { mIconView.setContentDescription(iconContentDescription); } if (animation != null && shouldAnimateForTransition(lastState, newState)) { animation.forceAnimationOnUI(); animation.start(); } } @Nullable private CharSequence getIconContentDescription(int newState) { switch (newState) { case STATE_IDLE: case STATE_AUTHENTICATING_ANIMATING_IN: case STATE_AUTHENTICATING: case STATE_PENDING_CONFIRMATION: case STATE_AUTHENTICATED: return mContext.getString( R.string.accessibility_fingerprint_dialog_fingerprint_icon); case STATE_ERROR: case STATE_HELP: return mContext.getString(R.string.biometric_dialog_try_again); default: return null; } } private boolean shouldAnimateForTransition(int oldState, int newState) { switch (newState) { case STATE_HELP: Loading
packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricView.java +0 −1 Original line number Diff line number Diff line Loading @@ -636,7 +636,6 @@ public abstract class AuthBiometricView extends LinearLayout { mIndicatorView.setText(message); mIndicatorView.setTextColor(mTextColorError); mIndicatorView.setVisibility(View.VISIBLE); mIndicatorView.setSelected(true); mHandler.postDelayed(resetMessageRunnable, mInjector.getDelayAfterError()); Utils.notifyAccessibilityContentChanged(mAccessibilityManager, this); Loading
packages/SystemUI/src/com/android/systemui/biometrics/UdfpsController.java +2 −1 Original line number Diff line number Diff line Loading @@ -698,7 +698,8 @@ public class UdfpsController implements DozeReceiver { // This view overlaps the sensor area, so prevent it from being selectable // during a11y. if (reason == IUdfpsOverlayController.REASON_ENROLL_FIND_SENSOR || reason == IUdfpsOverlayController.REASON_ENROLL_ENROLLING) { || reason == IUdfpsOverlayController.REASON_ENROLL_ENROLLING || reason == IUdfpsOverlayController.REASON_AUTH_BP) { mView.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); } Loading