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

Commit 2fe592d4 authored by Adrian Roos's avatar Adrian Roos
Browse files

Add trust indicator to keyguard

Changes the unlock icon to an open lock
when the keyguard will not ask for credentials.

Bug: 14295559
Change-Id: If34a5ec9e23b2d22813860faee125e6b2d700643
parent 9853e2a8
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -213,6 +213,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener {
    @Override
    public void onTrustChanged(boolean enabled, int userId) {
        mUserHasTrust.put(userId, enabled);

        for (int i = 0; i < mCallbacks.size(); i++) {
            KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
            if (cb != null) {
                cb.onTrustChanged(userId);
            }
        }
    }

    private boolean isTrustDisabled(int userId) {
+5 −0
Original line number Diff line number Diff line
@@ -179,4 +179,9 @@ public class KeyguardUpdateMonitorCallback {
     * {@link WindowManagerPolicy#OFF_BECAUSE_OF_TIMEOUT}.
     */
    public void onScreenTurnedOff(int why) { }

    /**
     * Called when trust changes for a user.
     */
    public void onTrustChanged(int userId) { }
}
+1007 B
Loading image diff...
+828 B
Loading image diff...
+1 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@
        android:textAppearance="?android:attr/textAppearanceMedium"/>

    <ImageView
        android:id="@+id/lock_icon"
        android:layout_width="64dp"
        android:layout_height="64dp"
        android:layout_gravity="bottom|center_horizontal"
Loading