resolve merge conflicts of 97bc1be819 to sc-v2-dev-plus-aosp

Change-Id: I863708cc55493f91722fc1f75868071ed8a7aaef
Merged-In: I5e3587ddb0fa4bd1ef68488485d73641e0582d2f
This commit is contained in:
Matt Casey
2021-06-23 20:57:14 +00:00
5 changed files with 29 additions and 11 deletions

View File

@@ -235,7 +235,8 @@ public class DependencyProvider {
NavigationBarOverlayController navBarOverlayController,
ConfigurationController configurationController,
NavigationBarA11yHelper navigationBarA11yHelper,
TaskbarDelegate taskbarDelegate) {
TaskbarDelegate taskbarDelegate,
UserTracker userTracker) {
return new NavigationBarController(context,
windowManager,
assistManagerLazy,
@@ -262,7 +263,8 @@ public class DependencyProvider {
navBarOverlayController,
configurationController,
navigationBarA11yHelper,
taskbarDelegate);
taskbarDelegate,
userTracker);
}
/** */

View File

@@ -130,6 +130,7 @@ import com.android.systemui.plugins.DarkIconDispatcher;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.recents.Recents;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.shared.recents.utilities.Utilities;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.QuickStepContract;
@@ -199,6 +200,7 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
private final NavigationBarOverlayController mNavbarOverlayController;
private final UiEventLogger mUiEventLogger;
private final NavigationBarA11yHelper mNavigationBarA11yHelper;
private final UserTracker mUserTracker;
private Bundle mSavedState;
private NavigationBarView mNavigationBarView;
@@ -460,7 +462,8 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
@Main Handler mainHandler,
NavigationBarOverlayController navbarOverlayController,
UiEventLogger uiEventLogger,
NavigationBarA11yHelper navigationBarA11yHelper) {
NavigationBarA11yHelper navigationBarA11yHelper,
UserTracker userTracker) {
mContext = context;
mWindowManager = windowManager;
mAccessibilityManager = accessibilityManager;
@@ -485,6 +488,8 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
mNavbarOverlayController = navbarOverlayController;
mUiEventLogger = uiEventLogger;
mNavigationBarA11yHelper = navigationBarA11yHelper;
mUserTracker = userTracker;
mNavBarMode = mNavigationModeController.addListener(this);
}
@@ -1375,12 +1380,14 @@ public class NavigationBar implements View.OnAttachStateChangeListener,
.getAssistInfoForUser(UserHandle.USER_CURRENT) != null;
boolean longPressDefault = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_assistLongPressHomeEnabledDefault);
mLongPressHomeEnabled = Settings.Secure.getInt(mContentResolver,
Settings.Secure.ASSIST_LONG_PRESS_HOME_ENABLED, longPressDefault ? 1 : 0) != 0;
mLongPressHomeEnabled = Settings.Secure.getIntForUser(mContentResolver,
Settings.Secure.ASSIST_LONG_PRESS_HOME_ENABLED, longPressDefault ? 1 : 0,
mUserTracker.getUserId()) != 0;
boolean gestureDefault = mContext.getResources().getBoolean(
com.android.internal.R.bool.config_assistTouchGestureEnabledDefault);
mAssistantTouchGestureEnabled = Settings.Secure.getInt(mContentResolver,
Settings.Secure.ASSIST_TOUCH_GESTURE_ENABLED, gestureDefault ? 1 : 0) != 0;
mAssistantTouchGestureEnabled = Settings.Secure.getIntForUser(mContentResolver,
Settings.Secure.ASSIST_TOUCH_GESTURE_ENABLED, gestureDefault ? 1 : 0,
mUserTracker.getUserId()) != 0;
if (mOverviewProxyService.getProxy() != null) {
try {
mOverviewProxyService.getProxy().onAssistantAvailable(mAssistantAvailable

View File

@@ -56,6 +56,7 @@ import com.android.systemui.model.SysUiState;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.recents.Recents;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.CommandQueue.Callbacks;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
@@ -116,6 +117,7 @@ public class NavigationBarController implements Callbacks,
private final TaskbarDelegate mTaskbarDelegate;
private int mNavMode;
private boolean mIsTablet;
private final UserTracker mUserTracker;
/** A displayId - nav bar maps. */
@VisibleForTesting
@@ -153,7 +155,8 @@ public class NavigationBarController implements Callbacks,
NavigationBarOverlayController navBarOverlayController,
ConfigurationController configurationController,
NavigationBarA11yHelper navigationBarA11yHelper,
TaskbarDelegate taskbarDelegate) {
TaskbarDelegate taskbarDelegate,
UserTracker userTracker) {
mContext = context;
mWindowManager = windowManager;
mAssistManagerLazy = assistManagerLazy;
@@ -189,6 +192,7 @@ public class NavigationBarController implements Callbacks,
mTaskbarDelegate.setOverviewProxyService(overviewProxyService,
navigationBarA11yHelper, mSysUiFlagsContainer);
mIsTablet = isTablet(mContext.getResources().getConfiguration());
mUserTracker = userTracker;
}
@Override
@@ -370,7 +374,8 @@ public class NavigationBarController implements Callbacks,
mHandler,
mNavBarOverlayController,
mUiEventLogger,
mNavigationBarA11yHelper);
mNavigationBarA11yHelper,
mUserTracker);
mNavigationBars.put(displayId, navBar);
View navigationBarView = navBar.createView(savedState);

View File

@@ -52,6 +52,7 @@ import com.android.systemui.model.SysUiState;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.recents.Recents;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.phone.ShadeController;
@@ -112,7 +113,8 @@ public class NavigationBarControllerTest extends SysuiTestCase {
mock(NavigationBarOverlayController.class),
mock(ConfigurationController.class),
mock(NavigationBarA11yHelper.class),
mock(TaskbarDelegate.class)));
mock(TaskbarDelegate.class),
mock(UserTracker.class)));
initializeNavigationBars();
}

View File

@@ -76,6 +76,7 @@ import com.android.systemui.navigationbar.gestural.EdgeBackGestureHandler;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.recents.Recents;
import com.android.systemui.settings.UserTracker;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.phone.ShadeController;
@@ -277,7 +278,8 @@ public class NavigationBarTest extends SysuiTestCase {
mHandler,
mock(NavigationBarOverlayController.class),
mUiEventLogger,
mock(NavigationBarA11yHelper.class)));
mock(NavigationBarA11yHelper.class),
mock(UserTracker.class)));
}
private void processAllMessages() {