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

Commit dd87b7b5 authored by Justin Weir's avatar Justin Weir Committed by Android (Google) Code Review
Browse files

Merge changes from topics "284332422", "b284332422" into udc-qpr-dev

* changes:
  Remove CentralSurfaces.getNotificationShadeWindowViewController
  Remove CentralSurfacesImpl.getNotificationShadeWindowView
  Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView
  Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView
  Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView
  Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView
  Remove calls to CentralSurfacesImpl.getNotificationShadeWindowView
parents b1432a74 15c57b58
Loading
Loading
Loading
Loading
+7 −8
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ import android.view.IWallpaperVisibilityListener;
import android.view.IWindowManager;
import android.view.View;
import android.view.WindowInsets;
import android.view.WindowManagerGlobal;
import android.view.accessibility.AccessibilityManager;

import androidx.annotation.NonNull;
@@ -69,10 +68,13 @@ import com.android.systemui.settings.DisplayTracker;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.phone.BarTransitions.TransitionMode;
import com.android.systemui.statusbar.phone.CentralSurfaces;
import com.android.systemui.statusbar.policy.KeyguardStateController;

import dagger.Lazy;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
@@ -80,8 +82,6 @@ import java.util.Optional;

import javax.inject.Inject;

import dagger.Lazy;

/**
 * Extracts shared elements between navbar and taskbar delegate to de-dupe logic and help them
 * experience the joys of friendship.
@@ -111,6 +111,7 @@ public final class NavBarHelper implements
    private final AccessibilityButtonTargetsObserver mAccessibilityButtonTargetsObserver;
    private final List<NavbarTaskbarStateUpdater> mStateListeners = new ArrayList<>();
    private final Context mContext;
    private final NotificationShadeWindowController mNotificationShadeWindowController;
    private final CommandQueue mCommandQueue;
    private final ContentResolver mContentResolver;
    private final EdgeBackGestureHandler mEdgeBackGestureHandler;
@@ -182,9 +183,11 @@ public final class NavBarHelper implements
            IWindowManager wm,
            UserTracker userTracker,
            DisplayTracker displayTracker,
            NotificationShadeWindowController notificationShadeWindowController,
            DumpManager dumpManager,
            CommandQueue commandQueue) {
        mContext = context;
        mNotificationShadeWindowController = notificationShadeWindowController;
        mCommandQueue = commandQueue;
        mContentResolver = mContext.getContentResolver();
        mAccessibilityManager = accessibilityManager;
@@ -460,11 +463,7 @@ public final class NavBarHelper implements
     * {@link InputMethodService} and the keyguard states.
     */
    public boolean isImeShown(int vis) {
        View shadeWindowView = null;
        if (mCentralSurfacesOptionalLazy.get().isPresent()) {
            shadeWindowView =
                    mCentralSurfacesOptionalLazy.get().get().getNotificationShadeWindowView();
        }
        View shadeWindowView =  mNotificationShadeWindowController.getWindowRootView();
        boolean isKeyguardShowing = mKeyguardStateController.isShowing();
        boolean imeVisibleOnShade = shadeWindowView != null && shadeWindowView.isAttachedToWindow()
                && shadeWindowView.getRootWindowInsets().isVisible(WindowInsets.Type.ime());
+1 −1
Original line number Diff line number Diff line
@@ -2573,7 +2573,7 @@ public final class NotificationPanelViewController implements ShadeSurface, Dump
                                        this);
                                return;
                            }
                            if (mCentralSurfaces.getNotificationShadeWindowView()
                            if (mNotificationShadeWindowController.getWindowRootView()
                                    .isVisibleToUser()) {
                                mView.getViewTreeObserver().removeOnGlobalLayoutListener(
                                        this);
+3 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ import com.android.systemui.plugins.ActivityStarter.OnDismissAction
import com.android.systemui.settings.UserTracker
import com.android.systemui.shade.ShadeController
import com.android.systemui.statusbar.NotificationLockscreenUserManager
import com.android.systemui.statusbar.NotificationShadeWindowController
import com.android.systemui.statusbar.SysuiStatusBarStateController
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow
import com.android.systemui.statusbar.policy.DeviceProvisionedController
@@ -68,6 +69,7 @@ constructor(
    private val keyguardViewMediatorLazy: Lazy<KeyguardViewMediator>,
    private val shadeControllerLazy: Lazy<ShadeController>,
    private val statusBarKeyguardViewManagerLazy: Lazy<StatusBarKeyguardViewManager>,
    private val notifShadeWindowControllerLazy: Lazy<NotificationShadeWindowController>,
    private val activityLaunchAnimator: ActivityLaunchAnimator,
    private val context: Context,
    private val lockScreenUserManager: NotificationLockscreenUserManager,
@@ -866,6 +868,7 @@ constructor(
                    return StatusBarLaunchAnimatorController(
                        animationController,
                        it,
                        notifShadeWindowControllerLazy.get(),
                        isLaunchForActivity
                    )
                }
+0 −6
Original line number Diff line number Diff line
@@ -46,8 +46,6 @@ import com.android.systemui.navigationbar.NavigationBarView;
import com.android.systemui.plugins.ActivityStarter.OnDismissAction;
import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper;
import com.android.systemui.qs.QSPanelController;
import com.android.systemui.shade.NotificationShadeWindowView;
import com.android.systemui.shade.NotificationShadeWindowViewController;
import com.android.systemui.shade.ShadeViewController;
import com.android.systemui.shared.system.RemoteAnimationRunnerCompat;
import com.android.systemui.statusbar.NotificationPresenter;
@@ -212,10 +210,6 @@ public interface CentralSurfaces extends Dumpable, LifecycleOwner {
     */
    void wakeUpIfDozing(long time, String why, @PowerManager.WakeReason int wakeReason);

    NotificationShadeWindowView getNotificationShadeWindowView();

    NotificationShadeWindowViewController getNotificationShadeWindowViewController();

    /** */
    ShadeViewController getShadeViewController();

+5 −15
Original line number Diff line number Diff line
@@ -457,7 +457,7 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
    private PhoneStatusBarTransitions mStatusBarTransitions;
    private final AuthRippleController mAuthRippleController;
    @WindowVisibleState private int mStatusBarWindowState = WINDOW_STATE_SHOWING;
    protected final NotificationShadeWindowController mNotificationShadeWindowController;
    private final NotificationShadeWindowController mNotificationShadeWindowController;
    private final StatusBarInitializer mStatusBarInitializer;
    private final StatusBarWindowController mStatusBarWindowController;
    private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
@@ -1143,7 +1143,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
                    @Override
                    public void onPluginConnected(OverlayPlugin plugin, Context pluginContext) {
                        mMainExecutor.execute(
                                () -> plugin.setup(getNotificationShadeWindowView(),
                                () -> plugin.setup(
                                        mNotificationShadeWindowController.getWindowRootView(),
                                        getNavigationBarView(),
                                        new Callback(plugin), mDozeParameters));
                    }
@@ -1742,16 +1743,6 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
        Trace.endSection();
    }

    @Override
    public NotificationShadeWindowView getNotificationShadeWindowView() {
        return mNotificationShadeWindowView;
    }

    @Override
    public NotificationShadeWindowViewController getNotificationShadeWindowViewController() {
        return mNotificationShadeWindowViewController;
    }

    @Override
    public ShadeViewController getShadeViewController() {
        return mShadeSurface;
@@ -3051,9 +3042,8 @@ public class CentralSurfacesImpl implements CoreStartable, CentralSurfaces {
    }

    protected ViewRootImpl getViewRootImpl()  {
        NotificationShadeWindowView nswv = getNotificationShadeWindowView();
        if (nswv != null) return nswv.getViewRootImpl();

        View root = mNotificationShadeWindowController.getWindowRootView();
        if (root != null) return root.getViewRootImpl();
        return null;
    }
    /**
Loading