Loading packages/SystemUI/res/layout/keyguard_bottom_area.xml +1 −2 Original line number Diff line number Diff line Loading @@ -68,7 +68,6 @@ android:layout_height="@dimen/keyguard_affordance_height" android:layout_gravity="bottom|center_horizontal" android:src="@drawable/ic_lock_24dp" android:scaleType="center" android:contentDescription="@string/accessibility_unlock_button" /> android:scaleType="center" /> </com.android.systemui.statusbar.phone.KeyguardBottomAreaView> packages/SystemUI/res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,10 @@ <string name="accessibility_voice_assist_button">Voice Assist</string> <!-- Content description of the unlock button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_unlock_button">Unlock</string> <!-- Content description of the unlock button when fingerpint is on (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_unlock_button_fingerprint">Unlock button, waiting for fingerprint</string> <!-- Accessibility action of the unlock button when fingerpint is on (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_unlock_without_fingerprint">Unlock without using your fingerprint</string> <!-- Click action label for accessibility for the unlock button. [CHAR LIMIT=NONE] --> <string name="unlock_label">unlock</string> <!-- Click action label for accessibility for the phone button. [CHAR LIMIT=NONE] --> Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +11 −0 Original line number Diff line number Diff line Loading @@ -614,6 +614,13 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL } }; private final Runnable mHideTransientIndicationRunnable = new Runnable() { @Override public void run() { mIndicationController.hideTransientIndication(); } }; private final KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() { @Override Loading Loading @@ -657,6 +664,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL @Override public void onFingerprintError(int msgId, String errString) { // TODO: Go to bouncer if this is "too many attempts" (lockout) error. mIndicationController.showTransientIndication(errString, getResources().getColor(R.color.system_warning_color, null)); removeCallbacks(mHideTransientIndicationRunnable); postDelayed(mHideTransientIndicationRunnable, 5000); } }; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +21 −2 Original line number Diff line number Diff line Loading @@ -16,14 +16,13 @@ package com.android.systemui.statusbar.phone; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; import android.graphics.drawable.AnimatedVectorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.InsetDrawable; import android.util.AttributeSet; import android.view.View; import android.view.accessibility.AccessibilityNodeInfo; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.systemui.R; Loading Loading @@ -54,6 +53,7 @@ public class LockIcon extends KeyguardAffordanceView { private final TrustDrawable mTrustDrawable; private final UnlockMethodCache mUnlockMethodCache; private AccessibilityController mAccessibilityController; private boolean mHasFingerPrintIcon; public LockIcon(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -128,6 +128,11 @@ public class LockIcon extends KeyguardAffordanceView { setRestingAlpha( anyFingerprintIcon ? 1f : KeyguardAffordanceHelper.SWIPE_RESTING_ALPHA_AMOUNT); setImageDrawable(icon); String contentDescription = getResources().getString(anyFingerprintIcon ? R.string.accessibility_unlock_button_fingerprint : R.string.accessibility_unlock_button); setContentDescription(contentDescription); mHasFingerPrintIcon = anyFingerprintIcon; if (animation != null) { // If we play the draw on animation, delay it by one frame when the screen is Loading Loading @@ -167,6 +172,20 @@ public class LockIcon extends KeyguardAffordanceView { setFocusable(mAccessibilityController.isAccessibilityEnabled()); } @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); if (mHasFingerPrintIcon) { // Avoid that the button description is also spoken info.setClassName(LockIcon.class.getName()); AccessibilityNodeInfo.AccessibilityAction unlock = new AccessibilityNodeInfo.AccessibilityAction( AccessibilityNodeInfo.ACTION_CLICK, getContext().getString(R.string.accessibility_unlock_without_fingerprint)); info.addAction(unlock); } } public void setAccessibilityController(AccessibilityController accessibilityController) { mAccessibilityController = accessibilityController; } Loading Loading
packages/SystemUI/res/layout/keyguard_bottom_area.xml +1 −2 Original line number Diff line number Diff line Loading @@ -68,7 +68,6 @@ android:layout_height="@dimen/keyguard_affordance_height" android:layout_gravity="bottom|center_horizontal" android:src="@drawable/ic_lock_24dp" android:scaleType="center" android:contentDescription="@string/accessibility_unlock_button" /> android:scaleType="center" /> </com.android.systemui.statusbar.phone.KeyguardBottomAreaView>
packages/SystemUI/res/values/strings.xml +4 −0 Original line number Diff line number Diff line Loading @@ -215,6 +215,10 @@ <string name="accessibility_voice_assist_button">Voice Assist</string> <!-- Content description of the unlock button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_unlock_button">Unlock</string> <!-- Content description of the unlock button when fingerpint is on (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_unlock_button_fingerprint">Unlock button, waiting for fingerprint</string> <!-- Accessibility action of the unlock button when fingerpint is on (not shown on the screen). [CHAR LIMIT=NONE] --> <string name="accessibility_unlock_without_fingerprint">Unlock without using your fingerprint</string> <!-- Click action label for accessibility for the unlock button. [CHAR LIMIT=NONE] --> <string name="unlock_label">unlock</string> <!-- Click action label for accessibility for the phone button. [CHAR LIMIT=NONE] --> Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java +11 −0 Original line number Diff line number Diff line Loading @@ -614,6 +614,13 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL } }; private final Runnable mHideTransientIndicationRunnable = new Runnable() { @Override public void run() { mIndicationController.hideTransientIndication(); } }; private final KeyguardUpdateMonitorCallback mUpdateMonitorCallback = new KeyguardUpdateMonitorCallback() { @Override Loading Loading @@ -657,6 +664,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL @Override public void onFingerprintError(int msgId, String errString) { // TODO: Go to bouncer if this is "too many attempts" (lockout) error. mIndicationController.showTransientIndication(errString, getResources().getColor(R.color.system_warning_color, null)); removeCallbacks(mHideTransientIndicationRunnable); postDelayed(mHideTransientIndicationRunnable, 5000); } }; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/LockIcon.java +21 −2 Original line number Diff line number Diff line Loading @@ -16,14 +16,13 @@ package com.android.systemui.statusbar.phone; import android.annotation.NonNull; import android.annotation.Nullable; import android.content.Context; import android.graphics.drawable.AnimatedVectorDrawable; import android.graphics.drawable.Drawable; import android.graphics.drawable.InsetDrawable; import android.util.AttributeSet; import android.view.View; import android.view.accessibility.AccessibilityNodeInfo; import com.android.keyguard.KeyguardUpdateMonitor; import com.android.systemui.R; Loading Loading @@ -54,6 +53,7 @@ public class LockIcon extends KeyguardAffordanceView { private final TrustDrawable mTrustDrawable; private final UnlockMethodCache mUnlockMethodCache; private AccessibilityController mAccessibilityController; private boolean mHasFingerPrintIcon; public LockIcon(Context context, AttributeSet attrs) { super(context, attrs); Loading Loading @@ -128,6 +128,11 @@ public class LockIcon extends KeyguardAffordanceView { setRestingAlpha( anyFingerprintIcon ? 1f : KeyguardAffordanceHelper.SWIPE_RESTING_ALPHA_AMOUNT); setImageDrawable(icon); String contentDescription = getResources().getString(anyFingerprintIcon ? R.string.accessibility_unlock_button_fingerprint : R.string.accessibility_unlock_button); setContentDescription(contentDescription); mHasFingerPrintIcon = anyFingerprintIcon; if (animation != null) { // If we play the draw on animation, delay it by one frame when the screen is Loading Loading @@ -167,6 +172,20 @@ public class LockIcon extends KeyguardAffordanceView { setFocusable(mAccessibilityController.isAccessibilityEnabled()); } @Override public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(info); if (mHasFingerPrintIcon) { // Avoid that the button description is also spoken info.setClassName(LockIcon.class.getName()); AccessibilityNodeInfo.AccessibilityAction unlock = new AccessibilityNodeInfo.AccessibilityAction( AccessibilityNodeInfo.ACTION_CLICK, getContext().getString(R.string.accessibility_unlock_without_fingerprint)); info.addAction(unlock); } } public void setAccessibilityController(AccessibilityController accessibilityController) { mAccessibilityController = accessibilityController; } Loading