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

Commit 756814b6 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topics "lockscreengesturelogger", "sbnp-notifentrymanager" into sc-v2-dev

* changes:
  [Dagger] Inject LockscreenGestureLogger into PanelViewController and StatusBarNotificationPresenter.
  [Dagger] Inject NotificationEntryManager into StatusBarNotificationPresenter.
parents dfb851d7 59de6b39
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ import com.android.internal.logging.UiEvent;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.logging.UiEventLoggerImpl;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.systemui.Dependency;
import com.android.systemui.EventLogConstants;
import com.android.systemui.EventLogTags;
import com.android.systemui.dagger.SysUISingleton;
@@ -88,10 +87,11 @@ public class LockscreenGestureLogger {
    }

    private ArrayMap<Integer, Integer> mLegacyMap;
    private final MetricsLogger mMetricsLogger = Dependency.get(MetricsLogger.class);
    private final MetricsLogger mMetricsLogger;

    @Inject
    public LockscreenGestureLogger() {
    public LockscreenGestureLogger(MetricsLogger metricsLogger) {
        mMetricsLogger = metricsLogger;
        mLegacyMap = new ArrayMap<>(EventLogConstants.METRICS_GESTURE_TYPE_MAP.length);
        for (int i = 0; i < EventLogConstants.METRICS_GESTURE_TYPE_MAP.length ; i++) {
            mLegacyMap.put(EventLogConstants.METRICS_GESTURE_TYPE_MAP[i], i);
+13 −5
Original line number Diff line number Diff line
@@ -482,7 +482,6 @@ public class NotificationPanelViewController extends PanelViewController {
    private float mLinearDarkAmount;

    private boolean mPulsing;
    private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
    private boolean mUserSetupComplete;
    private int mQsNotificationTopPadding;
    private boolean mHideIconsDuringLaunchAnimation = true;
@@ -742,12 +741,21 @@ public class NotificationPanelViewController extends PanelViewController {
            SplitShadeHeaderController splitShadeHeaderController,
            LockscreenSmartspaceController lockscreenSmartspaceController,
            UnlockedScreenOffAnimationController unlockedScreenOffAnimationController,
            LockscreenGestureLogger lockscreenGestureLogger,
            NotificationRemoteInputManager remoteInputManager,
            ControlsComponent controlsComponent) {
        super(view, falsingManager, dozeLog, keyguardStateController,
                (SysuiStatusBarStateController) statusBarStateController, vibratorHelper,
                statusBarKeyguardViewManager, latencyTracker, flingAnimationUtilsBuilder.get(),
                statusBarTouchableRegionManager, ambientState);
        super(view,
                falsingManager,
                dozeLog,
                keyguardStateController,
                (SysuiStatusBarStateController) statusBarStateController,
                vibratorHelper,
                statusBarKeyguardViewManager,
                latencyTracker,
                flingAnimationUtilsBuilder.get(),
                statusBarTouchableRegionManager,
                lockscreenGestureLogger,
                ambientState);
        mView = view;
        mVibratorHelper = vibratorHelper;
        mKeyguardMediaController = keyguardMediaController;
+3 −1
Original line number Diff line number Diff line
@@ -79,7 +79,6 @@ public abstract class PanelViewController {
    protected long mDownTime;
    protected boolean mTouchSlopExceededBeforeDown;
    private float mMinExpandHeight;
    private LockscreenGestureLogger mLockscreenGestureLogger = new LockscreenGestureLogger();
    private boolean mPanelUpdateWhenAnimatorEnds;
    private boolean mVibrateOnOpening;
    protected boolean mIsLaunchAnimationRunning;
@@ -182,6 +181,7 @@ public abstract class PanelViewController {
    protected final KeyguardStateController mKeyguardStateController;
    protected final SysuiStatusBarStateController mStatusBarStateController;
    protected final AmbientState mAmbientState;
    protected final LockscreenGestureLogger mLockscreenGestureLogger;

    protected void onExpandingFinished() {
        mBar.onExpandingFinished();
@@ -217,10 +217,12 @@ public abstract class PanelViewController {
            LatencyTracker latencyTracker,
            FlingAnimationUtils.Builder flingAnimationUtilsBuilder,
            StatusBarTouchableRegionManager statusBarTouchableRegionManager,
            LockscreenGestureLogger lockscreenGestureLogger,
            AmbientState ambientState) {
        mAmbientState = ambientState;
        mView = view;
        mStatusBarKeyguardViewManager = statusBarKeyguardViewManager;
        mLockscreenGestureLogger = lockscreenGestureLogger;
        mView.addOnAttachStateChangeListener(new View.OnAttachStateChangeListener() {
            @Override
            public void onViewAttachedToWindow(View v) {
+9 −0
Original line number Diff line number Diff line
@@ -197,6 +197,7 @@ import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.events.SystemStatusAnimationScheduler;
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationActivityStarter;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.NotificationLaunchAnimatorControllerProvider;
import com.android.systemui.statusbar.notification.NotificationWakeUpCoordinator;
import com.android.systemui.statusbar.notification.collection.legacy.VisualStabilityManager;
@@ -454,6 +455,7 @@ public class StatusBar extends SystemUI implements
    private BiometricUnlockController mBiometricUnlockController;
    private final LightBarController mLightBarController;
    private final Lazy<LockscreenWallpaper> mLockscreenWallpaperLazy;
    private final LockscreenGestureLogger mLockscreenGestureLogger;
    @Nullable
    protected LockscreenWallpaper mLockscreenWallpaper;
    private final AutoHideController mAutoHideController;
@@ -529,6 +531,7 @@ public class StatusBar extends SystemUI implements

    private final int[] mAbsPos = new int[2];

    protected final NotificationEntryManager mEntryManager;
    private final NotificationGutsManager mGutsManager;
    private final NotificationLogger mNotificationLogger;
    private final NotificationViewHierarchyManager mViewHierarchyManager;
@@ -805,6 +808,7 @@ public class StatusBar extends SystemUI implements
            FalsingManager falsingManager,
            FalsingCollector falsingCollector,
            BroadcastDispatcher broadcastDispatcher,
            NotificationEntryManager notificationEntryManager,
            NotificationGutsManager notificationGutsManager,
            NotificationLogger notificationLogger,
            NotificationInterruptStateProvider notificationInterruptStateProvider,
@@ -834,6 +838,7 @@ public class StatusBar extends SystemUI implements
            DozeParameters dozeParameters,
            ScrimController scrimController,
            Lazy<LockscreenWallpaper> lockscreenWallpaperLazy,
            LockscreenGestureLogger lockscreenGestureLogger,
            Lazy<BiometricUnlockController> biometricUnlockControllerLazy,
            DozeServiceHost dozeServiceHost,
            PowerManager powerManager,
@@ -894,6 +899,7 @@ public class StatusBar extends SystemUI implements
        mFalsingCollector = falsingCollector;
        mFalsingManager = falsingManager;
        mBroadcastDispatcher = broadcastDispatcher;
        mEntryManager = notificationEntryManager;
        mGutsManager = notificationGutsManager;
        mNotificationLogger = notificationLogger;
        mNotificationInterruptStateProvider = notificationInterruptStateProvider;
@@ -925,6 +931,7 @@ public class StatusBar extends SystemUI implements
        mDozeParameters = dozeParameters;
        mScrimController = scrimController;
        mLockscreenWallpaperLazy = lockscreenWallpaperLazy;
        mLockscreenGestureLogger = lockscreenGestureLogger;
        mScreenPinningRequest = screenPinningRequest;
        mDozeScrimController = dozeScrimController;
        mBiometricUnlockControllerLazy = biometricUnlockControllerLazy;
@@ -1530,9 +1537,11 @@ public class StatusBar extends SystemUI implements
                mViewHierarchyManager,
                mLockscreenUserManager,
                mStatusBarStateController,
                mEntryManager,
                mMediaManager,
                mGutsManager,
                mKeyguardUpdateMonitor,
                mLockscreenGestureLogger,
                mInitController,
                mNotificationInterruptStateProvider,
                mRemoteInputManager,
+6 −6
Original line number Diff line number Diff line
@@ -82,10 +82,6 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
        ConfigurationController.ConfigurationListener,
        NotificationRowBinderImpl.BindRowCallback,
        CommandQueue.Callbacks {

    private final LockscreenGestureLogger mLockscreenGestureLogger =
            Dependency.get(LockscreenGestureLogger.class);

    private static final String TAG = "StatusBarNotificationPresenter";

    private final ActivityStarter mActivityStarter = Dependency.get(ActivityStarter.class);
@@ -93,11 +89,11 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
    private final NotificationViewHierarchyManager mViewHierarchyManager;
    private final NotificationLockscreenUserManager mLockscreenUserManager;
    private final SysuiStatusBarStateController mStatusBarStateController;
    private final NotificationEntryManager mEntryManager =
            Dependency.get(NotificationEntryManager.class);
    private final NotificationEntryManager mEntryManager;
    private final NotificationMediaManager mMediaManager;
    private final NotificationGutsManager mGutsManager;
    private final KeyguardUpdateMonitor mKeyguardUpdateMonitor;
    private final LockscreenGestureLogger mLockscreenGestureLogger;

    private final NotificationPanelViewController mNotificationPanel;
    private final HeadsUpManagerPhone mHeadsUpManager;
@@ -139,9 +135,11 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
            NotificationViewHierarchyManager notificationViewHierarchyManager,
            NotificationLockscreenUserManager lockscreenUserManager,
            SysuiStatusBarStateController sysuiStatusBarStateController,
            NotificationEntryManager notificationEntryManager,
            NotificationMediaManager notificationMediaManager,
            NotificationGutsManager notificationGutsManager,
            KeyguardUpdateMonitor keyguardUpdateMonitor,
            LockscreenGestureLogger lockscreenGestureLogger,
            InitController initController,
            NotificationInterruptStateProvider notificationInterruptStateProvider,
            NotificationRemoteInputManager remoteInputManager,
@@ -159,9 +157,11 @@ public class StatusBarNotificationPresenter implements NotificationPresenter,
        mViewHierarchyManager = notificationViewHierarchyManager;
        mLockscreenUserManager = lockscreenUserManager;
        mStatusBarStateController = sysuiStatusBarStateController;
        mEntryManager = notificationEntryManager;
        mMediaManager = notificationMediaManager;
        mGutsManager = notificationGutsManager;
        mKeyguardUpdateMonitor = keyguardUpdateMonitor;
        mLockscreenGestureLogger = lockscreenGestureLogger;
        mAboveShelfObserver = new AboveShelfObserver(stackScrollerController.getView());
        mNotificationShadeWindowController = notificationShadeWindowController;
        mAboveShelfObserver.setListener(statusBarWindow.findViewById(
Loading