Introduce AutoHideController to centralize call to WMS (4/N)
AutoHideController is a per-display controller and has following tasks:
1. Control all auto-hide logic in SystemUi
2. Update hide/unhide status to WMS
Bug: 117478341
Test: atest SystemUITests
Change-Id: I5066030c750f72e6e0b0d70cd377109458989c7d
diff --git a/packages/SystemUI/src/com/android/systemui/Dependency.java b/packages/SystemUI/src/com/android/systemui/Dependency.java
index 6e50429..c9ca972 100644
--- a/packages/SystemUI/src/com/android/systemui/Dependency.java
+++ b/packages/SystemUI/src/com/android/systemui/Dependency.java
@@ -65,6 +65,7 @@
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import com.android.systemui.statusbar.notification.row.NotificationBlockingHelperManager;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
+import com.android.systemui.statusbar.phone.AutoHideController;
import com.android.systemui.statusbar.phone.KeyguardDismissUtil;
import com.android.systemui.statusbar.phone.LightBarController;
import com.android.systemui.statusbar.phone.LockscreenGestureLogger;
@@ -270,6 +271,7 @@
@Inject
Lazy<NotificationAlertingManager> mNotificationAlertingManager;
@Inject Lazy<SensorPrivacyManager> mSensorPrivacyManager;
+ @Inject Lazy<AutoHideController> mAutoHideController;
@Inject @Named(BG_LOOPER_NAME) Lazy<Looper> mBgLooper;
@Inject @Named(BG_HANDLER_NAME) Lazy<Handler> mBgHandler;
@Inject @Named(MAIN_HANDLER_NAME) Lazy<Handler> mMainHandler;
@@ -443,6 +445,12 @@
mProviders.put(NotificationEntryManager.class, mNotificationEntryManager::get);
mProviders.put(NotificationAlertingManager.class, mNotificationAlertingManager::get);
+ // TODO(b/118592525): to support multi-display , we start to add something which is
+ // per-display, while others may be global. I think it's time to add
+ // a new class maybe named DisplayDependency to solve per-display
+ // Dependency problem.
+ mProviders.put(AutoHideController.class, mAutoHideController::get);
+
sDependency = this;
}