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

Commit 74b7f3c1 authored by Matt Pietal's avatar Matt Pietal
Browse files

Start keyguard docs

1. Move responsibility for the bouncer container to the
NotificationShadeWindowViewController
2. Start very basic keyguard documentation (much more to come)

Bug: 195430376
Test: atest KeyguardBouncerTest StatusBarTest StatusBarKeyguardViewManagerTest
      NotificationPanelViewControllerTest
Change-Id: Iba45a9252fd37c00b2023407eb44bd91c44a87ad
parent 5250bc61
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
# Keyguard (aka Lockscreen)

Keyguard is responsible for:

1. Handling authentication to allow the user to unlock the device, via biometrics or [KeyguardBouncer][1]
2. Displaying informational content such as the time, notifications, and smartspace
3. Always-on Display (AOD)

Keyguard is the first screen available when turning on the device, as long as the user has not specified a security method of NONE.

[1]: /frameworks/base/packages/SystemUI/docs/keyguard/bouncer.md
+18 −0
Original line number Diff line number Diff line
# Bouncer

[KeyguardBouncer][1] is the component responsible for displaying the security method set by the user (password, PIN, pattern) as well as SIM-related security methods, allowing the user to unlock the device or SIM.

## Components

The bouncer contains a hierarchy of controllers/views to render the user's security method and to manage the authentication attempts.

1. [KeyguardBouncer][1] - Entrypoint for managing the bouncer visibility.
  1. [KeyguardHostViewController][2] - Intercepts media keys. Can most likely be merged with the next item.
    1. [KeyguardSecurityContainerController][3] - Manages unlock attempt responses, one-handed use
       1. [KeyguardSecurityViewFlipperController][4] - Based upon the [KeyguardSecurityModel#SecurityMode][5], will instantiate the required view and controller. PIN, Pattern, etc.

[1]: /frameworks/base/packages/SystemUI/com/android/systemui/statusbar/phone/KeyguardBouncer
[2]: /frameworks/base/packages/SystemUI/com/android/keyguard/KeyguardHostViewController
[3]: /frameworks/base/packages/SystemUI/com/android/keyguard/KeyguardSecurityContainerController
[4]: /frameworks/base/packages/SystemUI/com/android/keyguard/KeyguardSecurityViewFlipperController
[5]: /frameworks/base/packages/SystemUI/com/android/keyguard/KeyguardSecurityModel
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@
            android:singleLine="true"
            android:ellipsize="marquee"
            android:focusable="true" />
        <FrameLayout android:id="@+id/keyboard_bouncer_container"
        <FrameLayout android:id="@+id/keyguard_bouncer_container"
                     android:layout_height="0dp"
                     android:layout_width="match_parent"
                     android:layout_weight="1" />
+0 −3
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.keyguard;

import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewRootImpl;

import com.android.systemui.keyguard.KeyguardViewMediator;
@@ -186,14 +185,12 @@ public interface KeyguardViewController {
    /**
     * Registers the StatusBar to which this Keyguard View is mounted.
     * @param statusBar
     * @param container
     * @param notificationPanelViewController
     * @param biometricUnlockController
     * @param notificationContainer
     * @param bypassController
     */
    void registerStatusBar(StatusBar statusBar,
            ViewGroup container,
            NotificationPanelViewController notificationPanelViewController,
            BiometricUnlockController biometricUnlockController,
            View notificationContainer,
+2 −4
Original line number Diff line number Diff line
@@ -77,7 +77,6 @@ import android.view.IRemoteAnimationRunner;
import android.view.RemoteAnimationTarget;
import android.view.SyncRtSurfaceTransactionApplier;
import android.view.View;
import android.view.ViewGroup;
import android.view.WindowManager;
import android.view.WindowManagerPolicyConstants;
import android.view.animation.Animation;
@@ -2623,7 +2622,6 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
     * Registers the StatusBar to which the Keyguard View is mounted.
     *
     * @param statusBar
     * @param container
     * @param panelView
     * @param biometricUnlockController
     * @param notificationContainer
@@ -2631,10 +2629,10 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable,
     * @return the View Controller for the Keyguard View this class is mediating.
     */
    public KeyguardViewController registerStatusBar(StatusBar statusBar,
            ViewGroup container, NotificationPanelViewController panelView,
            NotificationPanelViewController panelView,
            BiometricUnlockController biometricUnlockController,
            View notificationContainer, KeyguardBypassController bypassController) {
        mKeyguardViewControllerLazy.get().registerStatusBar(statusBar, container, panelView,
        mKeyguardViewControllerLazy.get().registerStatusBar(statusBar, panelView,
                biometricUnlockController, notificationContainer, bypassController);
        return mKeyguardViewControllerLazy.get();
    }
Loading