Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java +10 −3 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.view.ViewStub; import androidx.recyclerview.widget.GridLayoutManager; import com.android.internal.widget.LockPatternUtils; import com.android.systemui.CarSystemUIFactory; import com.android.systemui.R; import com.android.systemui.SystemUIFactory; Loading Loading @@ -117,8 +118,9 @@ public class FullscreenUserSwitcher { /* isAddUser= */ false, /* isForeground= */ true); // If the initial user has trusted device, display the unlock dialog on the keyguard. if (hasTrustedDevice(initialUser)) { // If the initial user has screen lock and trusted device, display the unlock dialog on the // keyguard. if (hasScreenLock(initialUser) && hasTrustedDevice(initialUser)) { mUnlockDialogHelper.showUnlockDialogAfterDelay(initialUser, mOnHideListener); } else { Loading Loading @@ -160,7 +162,7 @@ public class FullscreenUserSwitcher { */ private void onUserSelected(UserGridRecyclerView.UserRecord record) { mSelectedUser = record; if (hasTrustedDevice(record.mInfo.id)) { if (hasScreenLock(record.mInfo.id) && hasTrustedDevice(record.mInfo.id)) { mUnlockDialogHelper.showUnlockDialog(record.mInfo.id, mOnHideListener); return; } Loading Loading @@ -198,6 +200,11 @@ public class FullscreenUserSwitcher { } private boolean hasScreenLock(int uid) { LockPatternUtils lockPatternUtils = new LockPatternUtils(mContext); return lockPatternUtils.isSecure(uid); } private boolean hasTrustedDevice(int uid) { if (mEnrollmentManager == null) { // car service not ready, so it cannot be available. return false; Loading Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/FullscreenUserSwitcher.java +10 −3 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.view.ViewStub; import androidx.recyclerview.widget.GridLayoutManager; import com.android.internal.widget.LockPatternUtils; import com.android.systemui.CarSystemUIFactory; import com.android.systemui.R; import com.android.systemui.SystemUIFactory; Loading Loading @@ -117,8 +118,9 @@ public class FullscreenUserSwitcher { /* isAddUser= */ false, /* isForeground= */ true); // If the initial user has trusted device, display the unlock dialog on the keyguard. if (hasTrustedDevice(initialUser)) { // If the initial user has screen lock and trusted device, display the unlock dialog on the // keyguard. if (hasScreenLock(initialUser) && hasTrustedDevice(initialUser)) { mUnlockDialogHelper.showUnlockDialogAfterDelay(initialUser, mOnHideListener); } else { Loading Loading @@ -160,7 +162,7 @@ public class FullscreenUserSwitcher { */ private void onUserSelected(UserGridRecyclerView.UserRecord record) { mSelectedUser = record; if (hasTrustedDevice(record.mInfo.id)) { if (hasScreenLock(record.mInfo.id) && hasTrustedDevice(record.mInfo.id)) { mUnlockDialogHelper.showUnlockDialog(record.mInfo.id, mOnHideListener); return; } Loading Loading @@ -198,6 +200,11 @@ public class FullscreenUserSwitcher { } private boolean hasScreenLock(int uid) { LockPatternUtils lockPatternUtils = new LockPatternUtils(mContext); return lockPatternUtils.isSecure(uid); } private boolean hasTrustedDevice(int uid) { if (mEnrollmentManager == null) { // car service not ready, so it cannot be available. return false; Loading