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

Commit fa00d329 authored by Beverly Tai's avatar Beverly Tai Committed by Android (Google) Code Review
Browse files

Merge "Refactor LockScreenLockIconController" into sc-dev

parents 92ee6580 5abb6f4e
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -1909,13 +1909,15 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab
    }

    /**
     * Whether to show the lock icon on lock screen and bouncer. This depends on the enrolled
     * biometrics to the device.
     * Whether to show the lock icon on lock screen and bouncer.
     */
    public boolean shouldShowLockIcon() {
    public boolean canShowLockIcon() {
        if (mLockScreenMode == LOCK_SCREEN_MODE_LAYOUT_1) {
            return isFaceAuthEnabledForUser(KeyguardUpdateMonitor.getCurrentUser())
                    && !isUdfpsEnrolled();
        }
        return true;
    }

    /**
     * @return true if there's at least one udfps enrolled
+1 −10
Original line number Diff line number Diff line
@@ -23,8 +23,6 @@ import android.view.ViewGroup;
import com.android.systemui.R;
import com.android.systemui.dagger.SysUISingleton;
import com.android.systemui.statusbar.notification.row.dagger.NotificationShelfComponent;
import com.android.systemui.statusbar.phone.LockIcon;
import com.android.systemui.statusbar.phone.LockscreenLockIconController;
import com.android.systemui.statusbar.phone.NotificationPanelView;
import com.android.systemui.statusbar.phone.NotificationShadeWindowView;
import com.android.systemui.statusbar.phone.StatusBarWindowView;
@@ -41,7 +39,6 @@ public class SuperStatusBarViewFactory {

    private final Context mContext;
    private final InjectionInflationController mInjectionInflationController;
    private final LockscreenLockIconController mLockIconController;
    private final NotificationShelfComponent.Builder mNotificationShelfComponentBuilder;

    private NotificationShadeWindowView mNotificationShadeWindowView;
@@ -51,11 +48,9 @@ public class SuperStatusBarViewFactory {
    @Inject
    public SuperStatusBarViewFactory(Context context,
            InjectionInflationController injectionInflationController,
            NotificationShelfComponent.Builder notificationShelfComponentBuilder,
            LockscreenLockIconController lockIconController) {
            NotificationShelfComponent.Builder notificationShelfComponentBuilder) {
        mContext = context;
        mInjectionInflationController = injectionInflationController;
        mLockIconController = lockIconController;
        mNotificationShelfComponentBuilder = notificationShelfComponentBuilder;
    }

@@ -77,10 +72,6 @@ public class SuperStatusBarViewFactory {
            throw new IllegalStateException(
                    "R.layout.super_notification_shade could not be properly inflated");
        }
        LockIcon lockIcon = mNotificationShadeWindowView.findViewById(R.id.lock_icon);
        if (lockIcon != null) {
            mLockIconController.attach(lockIcon);
        }

        return mNotificationShadeWindowView;
    }
+2 −5
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public final class DozeServiceHost implements DozeHost {
            "persist.sysui.wake_performs_auth", true);
    private boolean mDozingRequested;
    private boolean mPulsing;
    private WakefulnessLifecycle mWakefulnessLifecycle;
    private final WakefulnessLifecycle mWakefulnessLifecycle;
    private final SysuiStatusBarStateController mStatusBarStateController;
    private final DeviceProvisionedController mDeviceProvisionedController;
    private final HeadsUpManagerPhone mHeadsUpManagerPhone;
@@ -86,9 +86,8 @@ public final class DozeServiceHost implements DozeHost {
    private final NotificationShadeWindowController mNotificationShadeWindowController;
    private final NotificationWakeUpCoordinator mNotificationWakeUpCoordinator;
    private NotificationShadeWindowViewController mNotificationShadeWindowViewController;
    private final LockscreenLockIconController mLockscreenLockIconController;
    private final AuthController mAuthController;
    private NotificationIconAreaController mNotificationIconAreaController;
    private final NotificationIconAreaController mNotificationIconAreaController;
    private StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
    private NotificationPanelViewController mNotificationPanel;
    private View mAmbientIndicationContainer;
@@ -109,7 +108,6 @@ public final class DozeServiceHost implements DozeHost {
            PulseExpansionHandler pulseExpansionHandler,
            NotificationShadeWindowController notificationShadeWindowController,
            NotificationWakeUpCoordinator notificationWakeUpCoordinator,
            LockscreenLockIconController lockscreenLockIconController,
            AuthController authController,
            NotificationIconAreaController notificationIconAreaController) {
        super();
@@ -129,7 +127,6 @@ public final class DozeServiceHost implements DozeHost {
        mPulseExpansionHandler = pulseExpansionHandler;
        mNotificationShadeWindowController = notificationShadeWindowController;
        mNotificationWakeUpCoordinator = notificationWakeUpCoordinator;
        mLockscreenLockIconController = lockscreenLockIconController;
        mAuthController = authController;
        mNotificationIconAreaController = notificationIconAreaController;
    }
+253 −275

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -910,7 +910,7 @@ public class NotificationPanelViewController extends PanelViewController {
                    clockPreferredY, hasCustomClock(),
                    hasVisibleNotifications, mInterpolatedDarkAmount, mEmptyDragAmount,
                    bypassEnabled, getUnlockedStackScrollerPadding(),
                    mUpdateMonitor.shouldShowLockIcon(),
                    mUpdateMonitor.canShowLockIcon(),
                    getQsExpansionFraction(),
                    mDisplayCutoutTopInset);
            mClockPositionAlgorithm.run(mClockPositionResult);
Loading