Loading packages/SystemUI/src/com/android/systemui/DependencyBinder.java +0 −7 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ import com.android.systemui.qs.QSHost; import com.android.systemui.qs.QSTileHost; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.StatusBarStateControllerImpl; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.phone.DarkIconDispatcherImpl; import com.android.systemui.statusbar.phone.ManagedProfileController; import com.android.systemui.statusbar.phone.ManagedProfileControllerImpl; Loading Loading @@ -235,10 +234,4 @@ public abstract class DependencyBinder { */ @Binds public abstract FalsingManager provideFalsingmanager(FalsingManagerProxy falsingManagerImpl); /** */ @Binds public abstract SysuiStatusBarStateController providesSysuiStatusBarStateController( StatusBarStateControllerImpl statusBarStateControllerImpl); } packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +83 −41 Original line number Diff line number Diff line Loading @@ -347,10 +347,10 @@ public class StatusBar extends SystemUI implements DemoMode, private BrightnessMirrorController mBrightnessMirrorController; private boolean mBrightnessMirrorVisible; protected BiometricUnlockController mBiometricUnlockController; @Inject LightBarController mLightBarController; private LightBarController mLightBarController; protected LockscreenWallpaper mLockscreenWallpaper; @VisibleForTesting @Inject AutoHideController mAutoHideController; protected AutoHideController mAutoHideController; private int mNaturalBarHeight = -1; Loading @@ -361,7 +361,7 @@ public class StatusBar extends SystemUI implements DemoMode, private int mStatusBarWindowState = WINDOW_STATE_SHOWING; protected StatusBarWindowController mStatusBarWindowController; @VisibleForTesting @Inject KeyguardUpdateMonitor mKeyguardUpdateMonitor; KeyguardUpdateMonitor mKeyguardUpdateMonitor; @VisibleForTesting DozeServiceHost mDozeServiceHost = new DozeServiceHost(); private boolean mWakeUpComingFromTouch; Loading @@ -369,7 +369,7 @@ public class StatusBar extends SystemUI implements DemoMode, private final Object mQueueLock = new Object(); @Inject StatusBarIconController mIconController; protected StatusBarIconController mIconController; @Inject DozeLog mDozeLog; @Inject Loading Loading @@ -400,7 +400,7 @@ public class StatusBar extends SystemUI implements DemoMode, protected FalsingManager mFalsingManager; @VisibleForTesting @Inject BroadcastDispatcher mBroadcastDispatcher; BroadcastDispatcher mBroadcastDispatcher; // expanded notifications protected NotificationPanelView mNotificationPanel; // the sliding/resizing panel within the notification window Loading @@ -413,7 +413,8 @@ public class StatusBar extends SystemUI implements DemoMode, // RemoteInputView to be activated after unlock private View mPendingRemoteInputView; @Inject RemoteInputQuickSettingsDisabler mRemoteInputQuickSettingsDisabler; private RemoteInputQuickSettingsDisabler mRemoteInputQuickSettingsDisabler = Dependency.get(RemoteInputQuickSettingsDisabler.class); private View mReportRejectedTouch; Loading @@ -422,17 +423,18 @@ public class StatusBar extends SystemUI implements DemoMode, private final int[] mAbsPos = new int[2]; private final ArrayList<Runnable> mPostCollapseRunnables = new ArrayList<>(); @Inject NotificationGutsManager mGutsManager; @Inject NotificationLogger mNotificationLogger; @Inject NotificationEntryManager mEntryManager; private NotificationGutsManager mGutsManager; protected NotificationLogger mNotificationLogger; protected NotificationEntryManager mEntryManager; private NotificationListController mNotificationListController; @Inject NotificationInterruptionStateProvider mNotificationInterruptionStateProvider; @Inject NotificationViewHierarchyManager mViewHierarchyManager; @Inject ForegroundServiceController mForegroundServiceController; @Inject AppOpsController mAppOpsController; @Inject KeyguardViewMediator mKeyguardViewMediator; @Inject ZenModeController mZenController; @Inject NotificationAlertingManager mNotificationAlertingManager; private NotificationInterruptionStateProvider mNotificationInterruptionStateProvider; protected NotificationViewHierarchyManager mViewHierarchyManager; protected ForegroundServiceController mForegroundServiceController; protected AppOpsController mAppOpsController; protected KeyguardViewMediator mKeyguardViewMediator; private ZenModeController mZenController; private final NotificationAlertingManager mNotificationAlertingManager = Dependency.get(NotificationAlertingManager.class); // for disabling the status bar private int mDisabled1 = 0; Loading @@ -443,7 +445,7 @@ public class StatusBar extends SystemUI implements DemoMode, private final Rect mLastFullscreenStackBounds = new Rect(); private final Rect mLastDockedStackBounds = new Rect(); @Inject DisplayMetrics mDisplayMetrics; private final DisplayMetrics mDisplayMetrics = Dependency.get(DisplayMetrics.class); // XXX: gesture research private final GestureRecorder mGestureRec = DEBUG_GESTURES Loading @@ -452,7 +454,7 @@ public class StatusBar extends SystemUI implements DemoMode, private ScreenPinningRequest mScreenPinningRequest; @Inject MetricsLogger mMetricsLogger; private final MetricsLogger mMetricsLogger = Dependency.get(MetricsLogger.class); // ensure quick settings is disabled until the current user makes it through the setup wizard @VisibleForTesting Loading Loading @@ -489,14 +491,14 @@ public class StatusBar extends SystemUI implements DemoMode, private ViewMediatorCallback mKeyguardViewMediatorCallback; protected ScrimController mScrimController; protected DozeScrimController mDozeScrimController; @Inject UiOffloadThread mUiOffloadThread; private final UiOffloadThread mUiOffloadThread = Dependency.get(UiOffloadThread.class); protected boolean mDozing; private boolean mDozingRequested; @Inject NotificationMediaManager mMediaManager; @Inject NotificationLockscreenUserManager mLockscreenUserManager; @Inject NotificationRemoteInputManager mRemoteInputManager; private NotificationMediaManager mMediaManager; protected NotificationLockscreenUserManager mLockscreenUserManager; protected NotificationRemoteInputManager mRemoteInputManager; private boolean mWallpaperSupported; private final BroadcastReceiver mWallpaperChangedReceiver = new BroadcastReceiver() { Loading Loading @@ -567,18 +569,18 @@ public class StatusBar extends SystemUI implements DemoMode, }; private KeyguardUserSwitcher mKeyguardUserSwitcher; @Inject UserSwitcherController mUserSwitcherController; @Inject NetworkController mNetworkController; @Inject BatteryController mBatteryController; protected UserSwitcherController mUserSwitcherController; private NetworkController mNetworkController; private BatteryController mBatteryController; protected boolean mPanelExpanded; private UiModeManager mUiModeManager; protected boolean mIsKeyguard; private LogMaker mStatusBarStateLog; protected NotificationIconAreaController mNotificationIconAreaController; @Nullable private View mAmbientIndicationContainer; @Inject SysuiColorExtractor mColorExtractor; @Inject ScreenLifecycle mScreenLifecycle; @Inject @VisibleForTesting WakefulnessLifecycle mWakefulnessLifecycle; private SysuiColorExtractor mColorExtractor; private ScreenLifecycle mScreenLifecycle; @VisibleForTesting WakefulnessLifecycle mWakefulnessLifecycle; private final View.OnClickListener mGoToLockedShadeListener = v -> { if (mState == StatusBarState.KEYGUARD) { Loading @@ -587,7 +589,8 @@ public class StatusBar extends SystemUI implements DemoMode, } }; private boolean mNoAnimationOnNextBarModeChange; @Inject SysuiStatusBarStateController mStatusBarStateController; private final SysuiStatusBarStateController mStatusBarStateController = (SysuiStatusBarStateController) Dependency.get(StatusBarStateController.class); private final KeyguardUpdateMonitorCallback mUpdateCallback = new KeyguardUpdateMonitorCallback() { Loading @@ -608,18 +611,19 @@ public class StatusBar extends SystemUI implements DemoMode, private HeadsUpAppearanceController mHeadsUpAppearanceController; private boolean mVibrateOnOpening; @Inject VibratorHelper mVibratorHelper; private VibratorHelper mVibratorHelper; private ActivityLaunchAnimator mActivityLaunchAnimator; protected StatusBarNotificationPresenter mPresenter; private NotificationActivityStarter mNotificationActivityStarter; private boolean mPulsing; @Inject BubbleController mBubbleController; protected BubbleController mBubbleController; private final BubbleController.BubbleExpandListener mBubbleExpandListener = (isExpanding, key) -> { mEntryManager.updateNotifications(); updateScrimController(); }; private ActivityIntentHelper mActivityIntentHelper; private ShadeController mShadeController; @Override public void onActiveStateChanged(int code, int uid, String packageName, boolean active) { Loading @@ -637,13 +641,41 @@ public class StatusBar extends SystemUI implements DemoMode, @Override public void start() { mGroupManager = Dependency.get(NotificationGroupManager.class); mGroupAlertTransferHelper = Dependency.get(NotificationGroupAlertTransferHelper.class); mVisualStabilityManager = Dependency.get(VisualStabilityManager.class); mNotificationLogger = Dependency.get(NotificationLogger.class); mRemoteInputManager = Dependency.get(NotificationRemoteInputManager.class); mNotificationListener = Dependency.get(NotificationListener.class); mNotificationListener.registerAsSystemService(); mNetworkController = Dependency.get(NetworkController.class); mUserSwitcherController = Dependency.get(UserSwitcherController.class); mScreenLifecycle = Dependency.get(ScreenLifecycle.class); mScreenLifecycle.addObserver(mScreenObserver); mWakefulnessLifecycle = Dependency.get(WakefulnessLifecycle.class); mWakefulnessLifecycle.addObserver(mWakefulnessObserver); mBatteryController = Dependency.get(BatteryController.class); mAssistManager = Dependency.get(AssistManager.class); mUiModeManager = mContext.getSystemService(UiModeManager.class); mLockscreenUserManager = Dependency.get(NotificationLockscreenUserManager.class); mGutsManager = Dependency.get(NotificationGutsManager.class); mMediaManager = Dependency.get(NotificationMediaManager.class); mEntryManager = Dependency.get(NotificationEntryManager.class); mBypassHeadsUpNotifier.setUp(mEntryManager); mNotificationInterruptionStateProvider = Dependency.get(NotificationInterruptionStateProvider.class); mViewHierarchyManager = Dependency.get(NotificationViewHierarchyManager.class); mForegroundServiceController = Dependency.get(ForegroundServiceController.class); mAppOpsController = Dependency.get(AppOpsController.class); mZenController = Dependency.get(ZenModeController.class); mKeyguardViewMediator = getComponent(KeyguardViewMediator.class); mColorExtractor = Dependency.get(SysuiColorExtractor.class); mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class); mNavigationBarController = Dependency.get(NavigationBarController.class); mBubbleController = Dependency.get(BubbleController.class); mBubbleController.setExpandListener(mBubbleExpandListener); mActivityIntentHelper = new ActivityIntentHelper(mContext); mBroadcastDispatcher = Dependency.get(BroadcastDispatcher.class); KeyguardSliceProvider sliceProvider = KeyguardSliceProvider.getAttachedInstance(); if (sliceProvider != null) { sliceProvider.initDependencies(mMediaManager, mStatusBarStateController, Loading @@ -666,6 +698,7 @@ public class StatusBar extends SystemUI implements DemoMode, mVibrateOnOpening = mContext.getResources().getBoolean( R.bool.config_vibrateOnIconAnimation); mVibratorHelper = Dependency.get(VibratorHelper.class); DateTimeView.setReceiverHandler(Dependency.get(Dependency.TIME_TICK_HANDLER)); putComponent(StatusBar.class, this); Loading @@ -679,6 +712,7 @@ public class StatusBar extends SystemUI implements DemoMode, mContext.getSystemService(Context.ACCESSIBILITY_SERVICE); mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); mKeyguardUpdateMonitor = Dependency.get(KeyguardUpdateMonitor.class); mKeyguardUpdateMonitor.setKeyguardBypassController(mKeyguardBypassController); mBarService = IStatusBarService.Stub.asInterface( ServiceManager.getService(Context.STATUS_BAR_SERVICE)); Loading Loading @@ -867,6 +901,7 @@ public class StatusBar extends SystemUI implements DemoMode, .replace(R.id.status_bar_container, new CollapsedStatusBarFragment(), CollapsedStatusBarFragment.TAG) .commit(); mIconController = Dependency.get(StatusBarIconController.class); mHeadsUpManager.setUp(mStatusBarWindow, mGroupManager, this, mVisualStabilityManager); Dependency.get(ConfigurationController.class).addCallback(mHeadsUpManager); Loading Loading @@ -912,8 +947,11 @@ public class StatusBar extends SystemUI implements DemoMode, } }); mAutoHideController = Dependency.get(AutoHideController.class); mAutoHideController.setStatusBar(this); mLightBarController = Dependency.get(LightBarController.class); ScrimView scrimBehind = mStatusBarWindow.findViewById(R.id.scrim_behind); ScrimView scrimInFront = mStatusBarWindow.findViewById(R.id.scrim_in_front); ScrimView scrimForBubble = mStatusBarWindow.findViewById(R.id.scrim_for_bubble); Loading Loading @@ -1085,6 +1123,7 @@ public class StatusBar extends SystemUI implements DemoMode, final StatusBarRemoteInputCallback mStatusBarRemoteInputCallback = (StatusBarRemoteInputCallback) Dependency.get( NotificationRemoteInputManager.Callback.class); mShadeController = Dependency.get(ShadeController.class); final ActivityStarter activityStarter = Dependency.get(ActivityStarter.class); mNotificationActivityStarter = new StatusBarNotificationActivityStarter(mContext, Loading @@ -1092,7 +1131,7 @@ public class StatusBar extends SystemUI implements DemoMode, mHeadsUpManager, activityStarter, mActivityLaunchAnimator, mBarService, mStatusBarStateController, mKeyguardManager, mDreamManager, mRemoteInputManager, mStatusBarRemoteInputCallback, mGroupManager, mLockscreenUserManager, this, mKeyguardStateController, mLockscreenUserManager, mShadeController, mKeyguardStateController, mNotificationInterruptionStateProvider, mMetricsLogger, new LockPatternUtils(mContext), Dependency.get(MAIN_HANDLER), Dependency.get(BG_HANDLER), mActivityIntentHelper, mBubbleController); Loading @@ -1101,7 +1140,7 @@ public class StatusBar extends SystemUI implements DemoMode, mEntryManager.setRowBinder(rowBinder); rowBinder.setNotificationClicker(new NotificationClicker( this, mBubbleController, mNotificationActivityStarter)); this, Dependency.get(BubbleController.class), mNotificationActivityStarter)); mGroupAlertTransferHelper.bind(mEntryManager, mGroupManager); mNotificationListController.bind(); Loading Loading @@ -4188,11 +4227,12 @@ public class StatusBar extends SystemUI implements DemoMode, // all notifications protected ViewGroup mStackScroller; @Inject NotificationGroupManager mGroupManager; @Inject NotificationGroupAlertTransferHelper mGroupAlertTransferHelper; protected NotificationGroupManager mGroupManager; protected NotificationGroupAlertTransferHelper mGroupAlertTransferHelper; // handling reordering @Inject VisualStabilityManager mVisualStabilityManager; protected VisualStabilityManager mVisualStabilityManager; protected AccessibilityManager mAccessibilityManager; Loading @@ -4208,9 +4248,10 @@ public class StatusBar extends SystemUI implements DemoMode, protected StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; protected KeyguardManager mKeyguardManager; @Inject DeviceProvisionedController mDeviceProvisionedController; private DeviceProvisionedController mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class); @Inject protected NavigationBarController mNavigationBarController; protected NavigationBarController mNavigationBarController; // UI-specific methods Loading @@ -4226,7 +4267,7 @@ public class StatusBar extends SystemUI implements DemoMode, protected NotificationShelf mNotificationShelf; protected EmptyShadeView mEmptyShadeView; @Inject AssistManager mAssistManager; protected AssistManager mAssistManager; public boolean isDeviceInteractive() { return mDeviceInteractive; Loading Loading @@ -4285,7 +4326,7 @@ public class StatusBar extends SystemUI implements DemoMode, } } @Inject NotificationListener mNotificationListener; protected NotificationListener mNotificationListener; public void setNotificationSnoozed(StatusBarNotification sbn, SnoozeOption snoozeOption) { if (snoozeOption.getSnoozeCriterion() != null) { Loading Loading @@ -4421,7 +4462,8 @@ public class StatusBar extends SystemUI implements DemoMode, executeActionDismissingKeyguard(() -> { try { intent.send(null, 0, null, null, null, null, getActivityOptions( mActivityLaunchAnimator.getLaunchAnimation(associatedView, isOccluded()))); mActivityLaunchAnimator.getLaunchAnimation(associatedView, mShadeController.isOccluded()))); } catch (PendingIntent.CanceledException e) { // the stack trace isn't very helpful here. // Just log the exception message. Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; @RunWith(AndroidTestingRunner.class) @RunWithLooper(setAsMainLooper = true) @RunWithLooper() @SmallTest public class NavigationBarFragmentTest extends SysuiBaseFragmentTest { private static final int EXTERNAL_DISPLAY_ID = 2; Loading Loading @@ -217,7 +217,7 @@ public class NavigationBarFragmentTest extends SysuiBaseFragmentTest { // Set IME window status for default NavBar. mCommandQueue.setImeWindowStatus(DEFAULT_DISPLAY, null, IME_VISIBLE, BACK_DISPOSITION_DEFAULT, true, false); processAllMessages(); Handler.getMain().runWithScissors(() -> { }, 500); // Verify IME window state will be updated in default NavBar & external NavBar state reset. assertEquals(NAVIGATION_HINT_BACK_ALT | NAVIGATION_HINT_IME_SHOWN, Loading @@ -228,7 +228,7 @@ public class NavigationBarFragmentTest extends SysuiBaseFragmentTest { // Set IME window status for external NavBar. mCommandQueue.setImeWindowStatus(EXTERNAL_DISPLAY_ID, null, IME_VISIBLE, BACK_DISPOSITION_DEFAULT, true, false); processAllMessages(); Handler.getMain().runWithScissors(() -> { }, 500); // Verify IME window state will be updated in external NavBar & default NavBar state reset. assertEquals(NAVIGATION_HINT_BACK_ALT | NAVIGATION_HINT_IME_SHOWN, Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java +74 −141 File changed.Preview size limit exceeded, changes collapsed. Show changes Loading
packages/SystemUI/src/com/android/systemui/DependencyBinder.java +0 −7 Original line number Diff line number Diff line Loading @@ -30,7 +30,6 @@ import com.android.systemui.qs.QSHost; import com.android.systemui.qs.QSTileHost; import com.android.systemui.statusbar.NotificationRemoteInputManager; import com.android.systemui.statusbar.StatusBarStateControllerImpl; import com.android.systemui.statusbar.SysuiStatusBarStateController; import com.android.systemui.statusbar.phone.DarkIconDispatcherImpl; import com.android.systemui.statusbar.phone.ManagedProfileController; import com.android.systemui.statusbar.phone.ManagedProfileControllerImpl; Loading Loading @@ -235,10 +234,4 @@ public abstract class DependencyBinder { */ @Binds public abstract FalsingManager provideFalsingmanager(FalsingManagerProxy falsingManagerImpl); /** */ @Binds public abstract SysuiStatusBarStateController providesSysuiStatusBarStateController( StatusBarStateControllerImpl statusBarStateControllerImpl); }
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +83 −41 Original line number Diff line number Diff line Loading @@ -347,10 +347,10 @@ public class StatusBar extends SystemUI implements DemoMode, private BrightnessMirrorController mBrightnessMirrorController; private boolean mBrightnessMirrorVisible; protected BiometricUnlockController mBiometricUnlockController; @Inject LightBarController mLightBarController; private LightBarController mLightBarController; protected LockscreenWallpaper mLockscreenWallpaper; @VisibleForTesting @Inject AutoHideController mAutoHideController; protected AutoHideController mAutoHideController; private int mNaturalBarHeight = -1; Loading @@ -361,7 +361,7 @@ public class StatusBar extends SystemUI implements DemoMode, private int mStatusBarWindowState = WINDOW_STATE_SHOWING; protected StatusBarWindowController mStatusBarWindowController; @VisibleForTesting @Inject KeyguardUpdateMonitor mKeyguardUpdateMonitor; KeyguardUpdateMonitor mKeyguardUpdateMonitor; @VisibleForTesting DozeServiceHost mDozeServiceHost = new DozeServiceHost(); private boolean mWakeUpComingFromTouch; Loading @@ -369,7 +369,7 @@ public class StatusBar extends SystemUI implements DemoMode, private final Object mQueueLock = new Object(); @Inject StatusBarIconController mIconController; protected StatusBarIconController mIconController; @Inject DozeLog mDozeLog; @Inject Loading Loading @@ -400,7 +400,7 @@ public class StatusBar extends SystemUI implements DemoMode, protected FalsingManager mFalsingManager; @VisibleForTesting @Inject BroadcastDispatcher mBroadcastDispatcher; BroadcastDispatcher mBroadcastDispatcher; // expanded notifications protected NotificationPanelView mNotificationPanel; // the sliding/resizing panel within the notification window Loading @@ -413,7 +413,8 @@ public class StatusBar extends SystemUI implements DemoMode, // RemoteInputView to be activated after unlock private View mPendingRemoteInputView; @Inject RemoteInputQuickSettingsDisabler mRemoteInputQuickSettingsDisabler; private RemoteInputQuickSettingsDisabler mRemoteInputQuickSettingsDisabler = Dependency.get(RemoteInputQuickSettingsDisabler.class); private View mReportRejectedTouch; Loading @@ -422,17 +423,18 @@ public class StatusBar extends SystemUI implements DemoMode, private final int[] mAbsPos = new int[2]; private final ArrayList<Runnable> mPostCollapseRunnables = new ArrayList<>(); @Inject NotificationGutsManager mGutsManager; @Inject NotificationLogger mNotificationLogger; @Inject NotificationEntryManager mEntryManager; private NotificationGutsManager mGutsManager; protected NotificationLogger mNotificationLogger; protected NotificationEntryManager mEntryManager; private NotificationListController mNotificationListController; @Inject NotificationInterruptionStateProvider mNotificationInterruptionStateProvider; @Inject NotificationViewHierarchyManager mViewHierarchyManager; @Inject ForegroundServiceController mForegroundServiceController; @Inject AppOpsController mAppOpsController; @Inject KeyguardViewMediator mKeyguardViewMediator; @Inject ZenModeController mZenController; @Inject NotificationAlertingManager mNotificationAlertingManager; private NotificationInterruptionStateProvider mNotificationInterruptionStateProvider; protected NotificationViewHierarchyManager mViewHierarchyManager; protected ForegroundServiceController mForegroundServiceController; protected AppOpsController mAppOpsController; protected KeyguardViewMediator mKeyguardViewMediator; private ZenModeController mZenController; private final NotificationAlertingManager mNotificationAlertingManager = Dependency.get(NotificationAlertingManager.class); // for disabling the status bar private int mDisabled1 = 0; Loading @@ -443,7 +445,7 @@ public class StatusBar extends SystemUI implements DemoMode, private final Rect mLastFullscreenStackBounds = new Rect(); private final Rect mLastDockedStackBounds = new Rect(); @Inject DisplayMetrics mDisplayMetrics; private final DisplayMetrics mDisplayMetrics = Dependency.get(DisplayMetrics.class); // XXX: gesture research private final GestureRecorder mGestureRec = DEBUG_GESTURES Loading @@ -452,7 +454,7 @@ public class StatusBar extends SystemUI implements DemoMode, private ScreenPinningRequest mScreenPinningRequest; @Inject MetricsLogger mMetricsLogger; private final MetricsLogger mMetricsLogger = Dependency.get(MetricsLogger.class); // ensure quick settings is disabled until the current user makes it through the setup wizard @VisibleForTesting Loading Loading @@ -489,14 +491,14 @@ public class StatusBar extends SystemUI implements DemoMode, private ViewMediatorCallback mKeyguardViewMediatorCallback; protected ScrimController mScrimController; protected DozeScrimController mDozeScrimController; @Inject UiOffloadThread mUiOffloadThread; private final UiOffloadThread mUiOffloadThread = Dependency.get(UiOffloadThread.class); protected boolean mDozing; private boolean mDozingRequested; @Inject NotificationMediaManager mMediaManager; @Inject NotificationLockscreenUserManager mLockscreenUserManager; @Inject NotificationRemoteInputManager mRemoteInputManager; private NotificationMediaManager mMediaManager; protected NotificationLockscreenUserManager mLockscreenUserManager; protected NotificationRemoteInputManager mRemoteInputManager; private boolean mWallpaperSupported; private final BroadcastReceiver mWallpaperChangedReceiver = new BroadcastReceiver() { Loading Loading @@ -567,18 +569,18 @@ public class StatusBar extends SystemUI implements DemoMode, }; private KeyguardUserSwitcher mKeyguardUserSwitcher; @Inject UserSwitcherController mUserSwitcherController; @Inject NetworkController mNetworkController; @Inject BatteryController mBatteryController; protected UserSwitcherController mUserSwitcherController; private NetworkController mNetworkController; private BatteryController mBatteryController; protected boolean mPanelExpanded; private UiModeManager mUiModeManager; protected boolean mIsKeyguard; private LogMaker mStatusBarStateLog; protected NotificationIconAreaController mNotificationIconAreaController; @Nullable private View mAmbientIndicationContainer; @Inject SysuiColorExtractor mColorExtractor; @Inject ScreenLifecycle mScreenLifecycle; @Inject @VisibleForTesting WakefulnessLifecycle mWakefulnessLifecycle; private SysuiColorExtractor mColorExtractor; private ScreenLifecycle mScreenLifecycle; @VisibleForTesting WakefulnessLifecycle mWakefulnessLifecycle; private final View.OnClickListener mGoToLockedShadeListener = v -> { if (mState == StatusBarState.KEYGUARD) { Loading @@ -587,7 +589,8 @@ public class StatusBar extends SystemUI implements DemoMode, } }; private boolean mNoAnimationOnNextBarModeChange; @Inject SysuiStatusBarStateController mStatusBarStateController; private final SysuiStatusBarStateController mStatusBarStateController = (SysuiStatusBarStateController) Dependency.get(StatusBarStateController.class); private final KeyguardUpdateMonitorCallback mUpdateCallback = new KeyguardUpdateMonitorCallback() { Loading @@ -608,18 +611,19 @@ public class StatusBar extends SystemUI implements DemoMode, private HeadsUpAppearanceController mHeadsUpAppearanceController; private boolean mVibrateOnOpening; @Inject VibratorHelper mVibratorHelper; private VibratorHelper mVibratorHelper; private ActivityLaunchAnimator mActivityLaunchAnimator; protected StatusBarNotificationPresenter mPresenter; private NotificationActivityStarter mNotificationActivityStarter; private boolean mPulsing; @Inject BubbleController mBubbleController; protected BubbleController mBubbleController; private final BubbleController.BubbleExpandListener mBubbleExpandListener = (isExpanding, key) -> { mEntryManager.updateNotifications(); updateScrimController(); }; private ActivityIntentHelper mActivityIntentHelper; private ShadeController mShadeController; @Override public void onActiveStateChanged(int code, int uid, String packageName, boolean active) { Loading @@ -637,13 +641,41 @@ public class StatusBar extends SystemUI implements DemoMode, @Override public void start() { mGroupManager = Dependency.get(NotificationGroupManager.class); mGroupAlertTransferHelper = Dependency.get(NotificationGroupAlertTransferHelper.class); mVisualStabilityManager = Dependency.get(VisualStabilityManager.class); mNotificationLogger = Dependency.get(NotificationLogger.class); mRemoteInputManager = Dependency.get(NotificationRemoteInputManager.class); mNotificationListener = Dependency.get(NotificationListener.class); mNotificationListener.registerAsSystemService(); mNetworkController = Dependency.get(NetworkController.class); mUserSwitcherController = Dependency.get(UserSwitcherController.class); mScreenLifecycle = Dependency.get(ScreenLifecycle.class); mScreenLifecycle.addObserver(mScreenObserver); mWakefulnessLifecycle = Dependency.get(WakefulnessLifecycle.class); mWakefulnessLifecycle.addObserver(mWakefulnessObserver); mBatteryController = Dependency.get(BatteryController.class); mAssistManager = Dependency.get(AssistManager.class); mUiModeManager = mContext.getSystemService(UiModeManager.class); mLockscreenUserManager = Dependency.get(NotificationLockscreenUserManager.class); mGutsManager = Dependency.get(NotificationGutsManager.class); mMediaManager = Dependency.get(NotificationMediaManager.class); mEntryManager = Dependency.get(NotificationEntryManager.class); mBypassHeadsUpNotifier.setUp(mEntryManager); mNotificationInterruptionStateProvider = Dependency.get(NotificationInterruptionStateProvider.class); mViewHierarchyManager = Dependency.get(NotificationViewHierarchyManager.class); mForegroundServiceController = Dependency.get(ForegroundServiceController.class); mAppOpsController = Dependency.get(AppOpsController.class); mZenController = Dependency.get(ZenModeController.class); mKeyguardViewMediator = getComponent(KeyguardViewMediator.class); mColorExtractor = Dependency.get(SysuiColorExtractor.class); mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class); mNavigationBarController = Dependency.get(NavigationBarController.class); mBubbleController = Dependency.get(BubbleController.class); mBubbleController.setExpandListener(mBubbleExpandListener); mActivityIntentHelper = new ActivityIntentHelper(mContext); mBroadcastDispatcher = Dependency.get(BroadcastDispatcher.class); KeyguardSliceProvider sliceProvider = KeyguardSliceProvider.getAttachedInstance(); if (sliceProvider != null) { sliceProvider.initDependencies(mMediaManager, mStatusBarStateController, Loading @@ -666,6 +698,7 @@ public class StatusBar extends SystemUI implements DemoMode, mVibrateOnOpening = mContext.getResources().getBoolean( R.bool.config_vibrateOnIconAnimation); mVibratorHelper = Dependency.get(VibratorHelper.class); DateTimeView.setReceiverHandler(Dependency.get(Dependency.TIME_TICK_HANDLER)); putComponent(StatusBar.class, this); Loading @@ -679,6 +712,7 @@ public class StatusBar extends SystemUI implements DemoMode, mContext.getSystemService(Context.ACCESSIBILITY_SERVICE); mPowerManager = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE); mKeyguardUpdateMonitor = Dependency.get(KeyguardUpdateMonitor.class); mKeyguardUpdateMonitor.setKeyguardBypassController(mKeyguardBypassController); mBarService = IStatusBarService.Stub.asInterface( ServiceManager.getService(Context.STATUS_BAR_SERVICE)); Loading Loading @@ -867,6 +901,7 @@ public class StatusBar extends SystemUI implements DemoMode, .replace(R.id.status_bar_container, new CollapsedStatusBarFragment(), CollapsedStatusBarFragment.TAG) .commit(); mIconController = Dependency.get(StatusBarIconController.class); mHeadsUpManager.setUp(mStatusBarWindow, mGroupManager, this, mVisualStabilityManager); Dependency.get(ConfigurationController.class).addCallback(mHeadsUpManager); Loading Loading @@ -912,8 +947,11 @@ public class StatusBar extends SystemUI implements DemoMode, } }); mAutoHideController = Dependency.get(AutoHideController.class); mAutoHideController.setStatusBar(this); mLightBarController = Dependency.get(LightBarController.class); ScrimView scrimBehind = mStatusBarWindow.findViewById(R.id.scrim_behind); ScrimView scrimInFront = mStatusBarWindow.findViewById(R.id.scrim_in_front); ScrimView scrimForBubble = mStatusBarWindow.findViewById(R.id.scrim_for_bubble); Loading Loading @@ -1085,6 +1123,7 @@ public class StatusBar extends SystemUI implements DemoMode, final StatusBarRemoteInputCallback mStatusBarRemoteInputCallback = (StatusBarRemoteInputCallback) Dependency.get( NotificationRemoteInputManager.Callback.class); mShadeController = Dependency.get(ShadeController.class); final ActivityStarter activityStarter = Dependency.get(ActivityStarter.class); mNotificationActivityStarter = new StatusBarNotificationActivityStarter(mContext, Loading @@ -1092,7 +1131,7 @@ public class StatusBar extends SystemUI implements DemoMode, mHeadsUpManager, activityStarter, mActivityLaunchAnimator, mBarService, mStatusBarStateController, mKeyguardManager, mDreamManager, mRemoteInputManager, mStatusBarRemoteInputCallback, mGroupManager, mLockscreenUserManager, this, mKeyguardStateController, mLockscreenUserManager, mShadeController, mKeyguardStateController, mNotificationInterruptionStateProvider, mMetricsLogger, new LockPatternUtils(mContext), Dependency.get(MAIN_HANDLER), Dependency.get(BG_HANDLER), mActivityIntentHelper, mBubbleController); Loading @@ -1101,7 +1140,7 @@ public class StatusBar extends SystemUI implements DemoMode, mEntryManager.setRowBinder(rowBinder); rowBinder.setNotificationClicker(new NotificationClicker( this, mBubbleController, mNotificationActivityStarter)); this, Dependency.get(BubbleController.class), mNotificationActivityStarter)); mGroupAlertTransferHelper.bind(mEntryManager, mGroupManager); mNotificationListController.bind(); Loading Loading @@ -4188,11 +4227,12 @@ public class StatusBar extends SystemUI implements DemoMode, // all notifications protected ViewGroup mStackScroller; @Inject NotificationGroupManager mGroupManager; @Inject NotificationGroupAlertTransferHelper mGroupAlertTransferHelper; protected NotificationGroupManager mGroupManager; protected NotificationGroupAlertTransferHelper mGroupAlertTransferHelper; // handling reordering @Inject VisualStabilityManager mVisualStabilityManager; protected VisualStabilityManager mVisualStabilityManager; protected AccessibilityManager mAccessibilityManager; Loading @@ -4208,9 +4248,10 @@ public class StatusBar extends SystemUI implements DemoMode, protected StatusBarKeyguardViewManager mStatusBarKeyguardViewManager; protected KeyguardManager mKeyguardManager; @Inject DeviceProvisionedController mDeviceProvisionedController; private DeviceProvisionedController mDeviceProvisionedController = Dependency.get(DeviceProvisionedController.class); @Inject protected NavigationBarController mNavigationBarController; protected NavigationBarController mNavigationBarController; // UI-specific methods Loading @@ -4226,7 +4267,7 @@ public class StatusBar extends SystemUI implements DemoMode, protected NotificationShelf mNotificationShelf; protected EmptyShadeView mEmptyShadeView; @Inject AssistManager mAssistManager; protected AssistManager mAssistManager; public boolean isDeviceInteractive() { return mDeviceInteractive; Loading Loading @@ -4285,7 +4326,7 @@ public class StatusBar extends SystemUI implements DemoMode, } } @Inject NotificationListener mNotificationListener; protected NotificationListener mNotificationListener; public void setNotificationSnoozed(StatusBarNotification sbn, SnoozeOption snoozeOption) { if (snoozeOption.getSnoozeCriterion() != null) { Loading Loading @@ -4421,7 +4462,8 @@ public class StatusBar extends SystemUI implements DemoMode, executeActionDismissingKeyguard(() -> { try { intent.send(null, 0, null, null, null, null, getActivityOptions( mActivityLaunchAnimator.getLaunchAnimation(associatedView, isOccluded()))); mActivityLaunchAnimator.getLaunchAnimation(associatedView, mShadeController.isOccluded()))); } catch (PendingIntent.CanceledException e) { // the stack trace isn't very helpful here. // Just log the exception message. Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/NavigationBarFragmentTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ import org.mockito.Mock; import org.mockito.MockitoAnnotations; @RunWith(AndroidTestingRunner.class) @RunWithLooper(setAsMainLooper = true) @RunWithLooper() @SmallTest public class NavigationBarFragmentTest extends SysuiBaseFragmentTest { private static final int EXTERNAL_DISPLAY_ID = 2; Loading Loading @@ -217,7 +217,7 @@ public class NavigationBarFragmentTest extends SysuiBaseFragmentTest { // Set IME window status for default NavBar. mCommandQueue.setImeWindowStatus(DEFAULT_DISPLAY, null, IME_VISIBLE, BACK_DISPOSITION_DEFAULT, true, false); processAllMessages(); Handler.getMain().runWithScissors(() -> { }, 500); // Verify IME window state will be updated in default NavBar & external NavBar state reset. assertEquals(NAVIGATION_HINT_BACK_ALT | NAVIGATION_HINT_IME_SHOWN, Loading @@ -228,7 +228,7 @@ public class NavigationBarFragmentTest extends SysuiBaseFragmentTest { // Set IME window status for external NavBar. mCommandQueue.setImeWindowStatus(EXTERNAL_DISPLAY_ID, null, IME_VISIBLE, BACK_DISPOSITION_DEFAULT, true, false); processAllMessages(); Handler.getMain().runWithScissors(() -> { }, 500); // Verify IME window state will be updated in external NavBar & default NavBar state reset. assertEquals(NAVIGATION_HINT_BACK_ALT | NAVIGATION_HINT_IME_SHOWN, Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java +74 −141 File changed.Preview size limit exceeded, changes collapsed. Show changes