Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 497e6995 authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Revert "Content description for padlock icon depending on state"" into lmp-dev

parents 2cf8b71e b5428e16
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -67,6 +67,6 @@
        android:src="@drawable/ic_lock_24dp"
        android:src="@drawable/ic_lock_24dp"
        android:scaleType="center"
        android:scaleType="center"
        android:tint="#ffffffff"
        android:tint="#ffffffff"
        android:contentDescription="@string/accessibility_unlock_button_not_secured" />
        android:contentDescription="@string/accessibility_unlock_button" />


</com.android.systemui.statusbar.phone.KeyguardBottomAreaView>
</com.android.systemui.statusbar.phone.KeyguardBottomAreaView>
+2 −11
Original line number Original line Diff line number Diff line
@@ -213,6 +213,8 @@
    <string name="accessibility_camera_button">Camera</string>
    <string name="accessibility_camera_button">Camera</string>
    <!-- Content description of the phone button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
    <!-- Content description of the phone button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_phone_button">Phone</string>
    <string name="accessibility_phone_button">Phone</string>
    <!-- Content description of the unlock button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_unlock_button">Unlock</string>
    <!-- Click action label for accessibility for the unlock button. [CHAR LIMIT=NONE] -->
    <!-- Click action label for accessibility for the unlock button. [CHAR LIMIT=NONE] -->
    <string name="unlock_label">unlock</string>
    <string name="unlock_label">unlock</string>
    <!-- Click action label for accessibility for the phone button. [CHAR LIMIT=NONE] -->
    <!-- Click action label for accessibility for the phone button. [CHAR LIMIT=NONE] -->
@@ -220,17 +222,6 @@
    <!-- Click action label for accessibility for the phone button. [CHAR LIMIT=NONE] -->
    <!-- Click action label for accessibility for the phone button. [CHAR LIMIT=NONE] -->
    <string name="camera_label">open camera</string>
    <string name="camera_label">open camera</string>


    <!-- Content description of the lock icon when device is secured (lock closed) and trust not managed (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_unlock_button_secured">Device secured.</string>
    <!-- Content description of the lock icon when device is not secured (lock open) and trust not managed (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_unlock_button_not_secured">Device not secured.</string>
    <!-- Content description of the lock icon when device is secured (lock closed) and trust managed (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_unlock_button_secured_trust_managed">Device secured, trust agent active.</string>
    <!-- Content description of the lock icon when device is not secured (lock open) and trust managed (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_unlock_button_not_secured_trust_managed">Device not secured, trust agent active.</string>
    <!-- Content description of the lock icon when face unlock is running (face icon) and trust managed (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_unlock_button_face_unlock_running">Face detection running, trust agent active.</string>

    <!-- Content description of the switch input method button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
    <!-- Content description of the switch input method button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_ime_switch_button">Switch input method button.</string>
    <string name="accessibility_ime_switch_button">Switch input method button.</string>
    <!-- Content description of the compatibility zoom button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
    <!-- Content description of the compatibility zoom button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
+1 −12
Original line number Original line Diff line number Diff line
@@ -380,21 +380,10 @@ public class KeyguardBottomAreaView extends FrameLayout implements View.OnClickL
        mLockIcon.setImageResource(iconRes);
        mLockIcon.setImageResource(iconRes);
        boolean trustManaged = mUnlockMethodCache.isTrustManaged();
        boolean trustManaged = mUnlockMethodCache.isTrustManaged();
        mTrustDrawable.setTrustManaged(trustManaged);
        mTrustDrawable.setTrustManaged(trustManaged);

        updateLockIconClickability();
        updateLockIconClickability();
        updateLockIconContentDescription(mUnlockMethodCache.isFaceUnlockRunning(),
                mUnlockMethodCache.isMethodInsecure(), trustManaged);
    }
    }


    private void updateLockIconContentDescription(boolean faceUnlockRunning, boolean insecure,

            boolean trustManaged) {
        mLockIcon.setContentDescription(getResources().getString(
                faceUnlockRunning ? R.string.accessibility_unlock_button_face_unlock_running
                : insecure && !trustManaged ? R.string.accessibility_unlock_button_not_secured
                : insecure ? R.string.accessibility_unlock_button_not_secured_trust_managed
                : !trustManaged ? R.string.accessibility_unlock_button_secured
                : R.string.accessibility_unlock_button_secured_trust_managed));
    }


    public KeyguardAffordanceView getPhoneView() {
    public KeyguardAffordanceView getPhoneView() {
        return mPhoneImageView;
        return mPhoneImageView;