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

Commit 80515f0c authored by Justin Weir's avatar Justin Weir
Browse files

Replace many references to NPVC with an interface

Replaces all but 1 reference to NPVC with ShadeViewController and
the CentralSurfacesImpl reference with the larger ShadeSurface
interface. Fixes a small number of oversights from the CL that
created the interfaces, i.e. adding/moving methods and constants.

Test: manually ran through go/shade-cujs
Test: atest SystemUITests SystemUIGoogleTests
Bug: 273789810
Change-Id: I6f5cc38e0385939872394111be39912dd403d50d
parent 6a4ed756
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -23,8 +23,8 @@ import android.view.ViewRootImpl;
import androidx.annotation.Nullable;

import com.android.systemui.keyguard.KeyguardViewMediator;
import com.android.systemui.shade.NotificationPanelViewController;
import com.android.systemui.shade.ShadeExpansionStateManager;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.statusbar.phone.BiometricUnlockController;
import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
@@ -178,7 +178,7 @@ public interface KeyguardViewController {
     * Registers the CentralSurfaces to which this Keyguard View is mounted.
     */
    void registerCentralSurfaces(CentralSurfaces centralSurfaces,
            NotificationPanelViewController notificationPanelViewController,
            ShadeViewController shadeViewController,
            @Nullable ShadeExpansionStateManager shadeExpansionStateManager,
            BiometricUnlockController biometricUnlockController,
            View notificationContainer,
+3 −3
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
package com.android.keyguard.dagger;

import com.android.keyguard.KeyguardStatusViewController;
import com.android.systemui.shade.NotificationPanelViewController;
import com.android.systemui.shade.ShadeViewStateProvider;
import com.android.systemui.statusbar.phone.KeyguardStatusBarView;
import com.android.systemui.statusbar.phone.KeyguardStatusBarViewController;

@@ -37,8 +37,8 @@ public interface KeyguardStatusBarViewComponent {
    interface Factory {
        KeyguardStatusBarViewComponent build(
                @BindsInstance KeyguardStatusBarView view,
                @BindsInstance NotificationPanelViewController.NotificationPanelViewStateProvider
                        notificationPanelViewStateProvider);
                @BindsInstance ShadeViewStateProvider
                        shadeViewStateProvider);
    }

    /** Builds a {@link KeyguardStatusViewController}. */
+3 −3
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ import android.graphics.Region;
import android.view.GestureDetector;
import android.view.MotionEvent;

import com.android.systemui.shade.NotificationPanelViewController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.statusbar.phone.CentralSurfaces;

import java.util.Optional;
@@ -54,8 +54,8 @@ public class ShadeTouchHandler implements DreamTouchHandler {
        }

        session.registerInputListener(ev -> {
            final NotificationPanelViewController viewController =
                    mSurfaces.map(CentralSurfaces::getNotificationPanelViewController).orElse(null);
            final ShadeViewController viewController =
                    mSurfaces.map(CentralSurfaces::getShadeViewController).orElse(null);

            if (viewController != null) {
                viewController.handleExternalTouch((MotionEvent) ev);
+8 −8
Original line number Diff line number Diff line
@@ -25,16 +25,16 @@ import com.android.systemui.R;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.dreams.touch.BouncerSwipeTouchHandler;
import com.android.systemui.dreams.touch.DreamTouchHandler;
import com.android.systemui.shade.NotificationPanelViewController;
import com.android.systemui.shade.ShadeViewController;
import com.android.wm.shell.animation.FlingAnimationUtils;

import javax.inject.Named;
import javax.inject.Provider;

import dagger.Module;
import dagger.Provides;
import dagger.multibindings.IntoSet;

import javax.inject.Named;
import javax.inject.Provider;

/**
 * This module captures the components associated with {@link BouncerSwipeTouchHandler}.
 */
@@ -78,8 +78,8 @@ public class BouncerSwipeModule {
        return flingAnimationUtilsBuilderProvider.get()
                .reset()
                .setMaxLengthSeconds(
                        NotificationPanelViewController.FLING_CLOSING_MAX_LENGTH_SECONDS)
                .setSpeedUpFactor(NotificationPanelViewController.FLING_SPEED_UP_FACTOR)
                        ShadeViewController.FLING_CLOSING_MAX_LENGTH_SECONDS)
                .setSpeedUpFactor(ShadeViewController.FLING_SPEED_UP_FACTOR)
                .build();
    }

@@ -92,8 +92,8 @@ public class BouncerSwipeModule {
            Provider<FlingAnimationUtils.Builder> flingAnimationUtilsBuilderProvider) {
        return flingAnimationUtilsBuilderProvider.get()
                .reset()
                .setMaxLengthSeconds(NotificationPanelViewController.FLING_MAX_LENGTH_SECONDS)
                .setSpeedUpFactor(NotificationPanelViewController.FLING_SPEED_UP_FACTOR)
                .setMaxLengthSeconds(ShadeViewController.FLING_MAX_LENGTH_SECONDS)
                .setSpeedUpFactor(ShadeViewController.FLING_SPEED_UP_FACTOR)
                .build();
    }

+2 −2
Original line number Diff line number Diff line
@@ -134,9 +134,9 @@ import com.android.systemui.keyguard.dagger.KeyguardModule;
import com.android.systemui.navigationbar.NavigationModeController;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shade.NotificationPanelViewController;
import com.android.systemui.shade.ShadeController;
import com.android.systemui.shade.ShadeExpansionStateManager;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationShadeDepthController;
@@ -3098,7 +3098,7 @@ public class KeyguardViewMediator implements CoreStartable, Dumpable,
     * @return the View Controller for the Keyguard View this class is mediating.
     */
    public KeyguardViewController registerCentralSurfaces(CentralSurfaces centralSurfaces,
            NotificationPanelViewController panelView,
            ShadeViewController panelView,
            @Nullable ShadeExpansionStateManager shadeExpansionStateManager,
            BiometricUnlockController biometricUnlockController,
            View notificationContainer, KeyguardBypassController bypassController) {
Loading