Merge "Generalize AutoHideController to be shared" into rvc-dev am: dfb1fe98af am: ddf2e56a2f
Change-Id: Ic713d8169f20c87ccab53168ef1f0fe7a82a7273
This commit is contained in:
@@ -16,6 +16,12 @@
|
||||
|
||||
package com.android.systemui.navigationbar.car;
|
||||
|
||||
import static android.view.InsetsState.ITYPE_NAVIGATION_BAR;
|
||||
import static android.view.InsetsState.containsType;
|
||||
|
||||
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_SEMI_TRANSPARENT;
|
||||
import static com.android.systemui.statusbar.phone.BarTransitions.MODE_TRANSPARENT;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.inputmethodservice.InputMethodService;
|
||||
@@ -37,9 +43,12 @@ import com.android.systemui.car.CarDeviceProvisionedController;
|
||||
import com.android.systemui.car.CarDeviceProvisionedListener;
|
||||
import com.android.systemui.dagger.qualifiers.Main;
|
||||
import com.android.systemui.shared.system.ActivityManagerWrapper;
|
||||
import com.android.systemui.statusbar.AutoHideUiElement;
|
||||
import com.android.systemui.statusbar.CommandQueue;
|
||||
import com.android.systemui.statusbar.NavigationBarController;
|
||||
import com.android.systemui.statusbar.SuperStatusBarViewFactory;
|
||||
import com.android.systemui.statusbar.phone.AutoHideController;
|
||||
import com.android.systemui.statusbar.phone.BarTransitions;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
||||
import com.android.systemui.statusbar.policy.KeyguardStateController;
|
||||
|
||||
@@ -57,6 +66,7 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
||||
private final WindowManager mWindowManager;
|
||||
private final CarDeviceProvisionedController mCarDeviceProvisionedController;
|
||||
private final CommandQueue mCommandQueue;
|
||||
private final AutoHideController mAutoHideController;
|
||||
private final ButtonSelectionStateListener mButtonSelectionStateListener;
|
||||
private final Handler mMainHandler;
|
||||
private final Lazy<KeyguardStateController> mKeyguardStateControllerLazy;
|
||||
@@ -64,6 +74,8 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
||||
private final SuperStatusBarViewFactory mSuperStatusBarViewFactory;
|
||||
private final ButtonSelectionStateController mButtonSelectionStateController;
|
||||
|
||||
private final int mDisplayId;
|
||||
|
||||
private IStatusBarService mBarService;
|
||||
private ActivityManagerWrapper mActivityManagerWrapper;
|
||||
|
||||
@@ -86,12 +98,16 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
||||
private boolean mDeviceIsSetUpForUser = true;
|
||||
private boolean mIsUserSetupInProgress = false;
|
||||
|
||||
private @BarTransitions.TransitionMode int mNavigationBarMode;
|
||||
private boolean mTransientShown;
|
||||
|
||||
@Inject
|
||||
public CarNavigationBar(Context context,
|
||||
CarNavigationBarController carNavigationBarController,
|
||||
WindowManager windowManager,
|
||||
DeviceProvisionedController deviceProvisionedController,
|
||||
CommandQueue commandQueue,
|
||||
AutoHideController autoHideController,
|
||||
ButtonSelectionStateListener buttonSelectionStateListener,
|
||||
@Main Handler mainHandler,
|
||||
Lazy<KeyguardStateController> keyguardStateControllerLazy,
|
||||
@@ -104,12 +120,15 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
||||
mCarDeviceProvisionedController = (CarDeviceProvisionedController)
|
||||
deviceProvisionedController;
|
||||
mCommandQueue = commandQueue;
|
||||
mAutoHideController = autoHideController;
|
||||
mButtonSelectionStateListener = buttonSelectionStateListener;
|
||||
mMainHandler = mainHandler;
|
||||
mKeyguardStateControllerLazy = keyguardStateControllerLazy;
|
||||
mNavigationBarControllerLazy = navigationBarControllerLazy;
|
||||
mSuperStatusBarViewFactory = superStatusBarViewFactory;
|
||||
mButtonSelectionStateController = buttonSelectionStateController;
|
||||
|
||||
mDisplayId = mWindowManager.getDefaultDisplay().getDisplayId();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -133,6 +152,23 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
||||
ex.rethrowFromSystemServer();
|
||||
}
|
||||
|
||||
mAutoHideController.addAutoHideUiElement(new AutoHideUiElement() {
|
||||
@Override
|
||||
public void synchronizeState() {
|
||||
// No op.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return mTransientShown;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hide() {
|
||||
clearTransient();
|
||||
}
|
||||
});
|
||||
|
||||
mDeviceIsSetUpForUser = mCarDeviceProvisionedController.isCurrentUserSetup();
|
||||
mIsUserSetupInProgress = mCarDeviceProvisionedController.isCurrentUserSetupInProgress();
|
||||
mCarDeviceProvisionedController.addCallback(
|
||||
@@ -340,6 +376,39 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
||||
isKeyboardVisible ? View.GONE : View.VISIBLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void showTransient(int displayId, int[] types) {
|
||||
if (displayId != mDisplayId) {
|
||||
return;
|
||||
}
|
||||
if (!containsType(types, ITYPE_NAVIGATION_BAR)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mTransientShown) {
|
||||
mTransientShown = true;
|
||||
handleTransientChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void abortTransient(int displayId, int[] types) {
|
||||
if (displayId != mDisplayId) {
|
||||
return;
|
||||
}
|
||||
if (!containsType(types, ITYPE_NAVIGATION_BAR)) {
|
||||
return;
|
||||
}
|
||||
clearTransient();
|
||||
}
|
||||
|
||||
private void clearTransient() {
|
||||
if (mTransientShown) {
|
||||
mTransientShown = false;
|
||||
handleTransientChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
|
||||
pw.print(" mTaskStackListener=");
|
||||
@@ -347,4 +416,18 @@ public class CarNavigationBar extends SystemUI implements CommandQueue.Callbacks
|
||||
pw.print(" mBottomNavigationBarView=");
|
||||
pw.println(mBottomNavigationBarView);
|
||||
}
|
||||
|
||||
private void handleTransientChanged() {
|
||||
updateBarMode(mTransientShown ? MODE_SEMI_TRANSPARENT : MODE_TRANSPARENT);
|
||||
}
|
||||
|
||||
// Returns true if the bar mode is changed.
|
||||
private boolean updateBarMode(int barMode) {
|
||||
if (mNavigationBarMode != barMode) {
|
||||
mNavigationBarMode = barMode;
|
||||
mAutoHideController.touchAutoHide();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import android.os.HandlerThread;
|
||||
import android.os.ServiceManager;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.view.Choreographer;
|
||||
import android.view.IWindowManager;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.WindowManager;
|
||||
|
||||
@@ -47,6 +48,7 @@ import com.android.systemui.shared.system.ActivityManagerWrapper;
|
||||
import com.android.systemui.shared.system.DevicePolicyManagerWrapper;
|
||||
import com.android.systemui.statusbar.CommandQueue;
|
||||
import com.android.systemui.statusbar.NavigationBarController;
|
||||
import com.android.systemui.statusbar.phone.AutoHideController;
|
||||
import com.android.systemui.statusbar.phone.ConfigurationControllerImpl;
|
||||
import com.android.systemui.statusbar.policy.ConfigurationController;
|
||||
import com.android.systemui.statusbar.policy.DataSaverController;
|
||||
@@ -166,6 +168,14 @@ public class DependencyProvider {
|
||||
return new ConfigurationControllerImpl(context);
|
||||
}
|
||||
|
||||
/** */
|
||||
@Singleton
|
||||
@Provides
|
||||
public AutoHideController provideAutoHideController(Context context,
|
||||
@Main Handler mainHandler, IWindowManager iWindowManager) {
|
||||
return new AutoHideController(context, mainHandler, iWindowManager);
|
||||
}
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
public ActivityManagerWrapper provideActivityManagerWrapper() {
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2020 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.systemui.statusbar;
|
||||
|
||||
/**
|
||||
* Common interface for a UI element controlled by
|
||||
* {@link com.android.systemui.statusbar.phone.AutoHideController}. These UI elements automatically
|
||||
* hidden by {@link com.android.systemui.statusbar.phone.AutoHideController} when in some transient
|
||||
* state.
|
||||
*/
|
||||
public interface AutoHideUiElement {
|
||||
|
||||
/**
|
||||
* Ensures that the {@link AutoHideUiElement} reflects the current expected state. This
|
||||
* method will be posted as a {@link Runnable} in the main thread.
|
||||
*/
|
||||
void synchronizeState();
|
||||
|
||||
/**
|
||||
* The {@link com.android.systemui.statusbar.phone.AutoHideController} is responsible for
|
||||
* automatically hiding ui elements that are only shown transiently. This method determines
|
||||
* whether a manual touch should also hide the ui elements that are temporarily visible.
|
||||
*
|
||||
* Note that all {@link AutoHideUiElement} instances should return true for a manual touch to
|
||||
* trigger {@link #hide()} on the ui elements.
|
||||
*/
|
||||
default boolean shouldHideOnTouch() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Returns true if the {@link AutoHideUiElement} is visible. */
|
||||
boolean isVisible();
|
||||
|
||||
/**
|
||||
* Called to hide the {@link AutoHideUiElement} through the
|
||||
* {@link com.android.systemui.statusbar.phone.AutoHideController}.
|
||||
*/
|
||||
void hide();
|
||||
}
|
||||
@@ -149,7 +149,6 @@ public class NavigationBarController implements Callbacks {
|
||||
AutoHideController autoHideController = isOnDefaultDisplay
|
||||
? Dependency.get(AutoHideController.class)
|
||||
: new AutoHideController(context, mHandler,
|
||||
Dependency.get(NotificationRemoteInputManager.class),
|
||||
Dependency.get(IWindowManager.class));
|
||||
navBar.setAutoHideController(autoHideController);
|
||||
navBar.restoreAppearanceAndTransientState();
|
||||
|
||||
@@ -19,56 +19,64 @@ package com.android.systemui.statusbar.phone;
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.os.RemoteException;
|
||||
import android.util.ArraySet;
|
||||
import android.util.Log;
|
||||
import android.view.IWindowManager;
|
||||
import android.view.MotionEvent;
|
||||
|
||||
import com.android.systemui.dagger.qualifiers.Main;
|
||||
import com.android.systemui.statusbar.NotificationRemoteInputManager;
|
||||
import com.android.systemui.statusbar.phone.dagger.StatusBarPhoneModule;
|
||||
import com.android.systemui.statusbar.AutoHideUiElement;
|
||||
|
||||
/** A controller to control all auto-hide things. */
|
||||
import java.util.Set;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
/** A controller to control all auto-hide things. Also see {@link AutoHideUiElement}. */
|
||||
public class AutoHideController {
|
||||
private static final String TAG = "AutoHideController";
|
||||
private static final long AUTO_HIDE_TIMEOUT_MS = 2250;
|
||||
|
||||
private final IWindowManager mWindowManagerService;
|
||||
|
||||
private final Handler mHandler;
|
||||
private final NotificationRemoteInputManager mRemoteInputManager;
|
||||
private StatusBar mStatusBar;
|
||||
private NavigationBarFragment mNavigationBar;
|
||||
private final Set<AutoHideUiElement> mElements;
|
||||
|
||||
private int mDisplayId;
|
||||
|
||||
private boolean mAutoHideSuspended;
|
||||
|
||||
private static final long AUTO_HIDE_TIMEOUT_MS = 2250;
|
||||
|
||||
private final Runnable mAutoHide = () -> {
|
||||
if (isAnyTransientBarShown()) {
|
||||
hideTransientBars();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Injected constructor. See {@link StatusBarPhoneModule}.
|
||||
*/
|
||||
@Inject
|
||||
public AutoHideController(Context context, @Main Handler handler,
|
||||
NotificationRemoteInputManager notificationRemoteInputManager,
|
||||
IWindowManager iWindowManager) {
|
||||
mHandler = handler;
|
||||
mRemoteInputManager = notificationRemoteInputManager;
|
||||
mWindowManagerService = iWindowManager;
|
||||
mElements = new ArraySet<>();
|
||||
|
||||
mDisplayId = context.getDisplayId();
|
||||
}
|
||||
|
||||
void setStatusBar(StatusBar statusBar) {
|
||||
mStatusBar = statusBar;
|
||||
/**
|
||||
* Adds an {@link AutoHideUiElement} whose behavior should be controlled by the
|
||||
* {@link AutoHideController}.
|
||||
*/
|
||||
public void addAutoHideUiElement(AutoHideUiElement element) {
|
||||
if (element != null) {
|
||||
mElements.add(element);
|
||||
}
|
||||
}
|
||||
|
||||
void setNavigationBar(NavigationBarFragment navigationBar) {
|
||||
mNavigationBar = navigationBar;
|
||||
/**
|
||||
* Remove an {@link AutoHideUiElement} that was previously added.
|
||||
*/
|
||||
public void removeAutoHideUiElement(AutoHideUiElement element) {
|
||||
if (element != null) {
|
||||
mElements.remove(element);
|
||||
}
|
||||
}
|
||||
|
||||
private void hideTransientBars() {
|
||||
@@ -77,11 +85,9 @@ public class AutoHideController {
|
||||
} catch (RemoteException ex) {
|
||||
Log.w(TAG, "Cannot get WindowManager");
|
||||
}
|
||||
if (mStatusBar != null) {
|
||||
mStatusBar.clearTransient();
|
||||
}
|
||||
if (mNavigationBar != null) {
|
||||
mNavigationBar.clearTransient();
|
||||
|
||||
for (AutoHideUiElement element : mElements) {
|
||||
element.hide();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +110,8 @@ public class AutoHideController {
|
||||
mAutoHideSuspended = isAnyTransientBarShown();
|
||||
}
|
||||
|
||||
void touchAutoHide() {
|
||||
/** Schedules or cancels auto hide behavior based on current system bar state. */
|
||||
public void touchAutoHide() {
|
||||
// update transient bar auto hide
|
||||
if (isAnyTransientBarShown()) {
|
||||
scheduleAutoHide();
|
||||
@@ -114,13 +121,15 @@ public class AutoHideController {
|
||||
}
|
||||
|
||||
private Runnable getCheckBarModesRunnable() {
|
||||
if (mStatusBar != null) {
|
||||
return () -> mStatusBar.checkBarModes();
|
||||
} else if (mNavigationBar != null) {
|
||||
return () -> mNavigationBar.checkNavBarModes();
|
||||
} else {
|
||||
if (mElements.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return () -> {
|
||||
for (AutoHideUiElement element : mElements) {
|
||||
element.synchronizeState();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private void cancelAutoHide() {
|
||||
@@ -134,14 +143,15 @@ public class AutoHideController {
|
||||
}
|
||||
|
||||
void checkUserAutoHide(MotionEvent event) {
|
||||
boolean shouldAutoHide = isAnyTransientBarShown()
|
||||
boolean shouldHide = isAnyTransientBarShown()
|
||||
&& event.getAction() == MotionEvent.ACTION_OUTSIDE // touch outside the source bar.
|
||||
&& event.getX() == 0 && event.getY() == 0;
|
||||
if (mStatusBar != null) {
|
||||
// a touch outside both bars
|
||||
shouldAutoHide &= !mRemoteInputManager.getController().isRemoteInputActive();
|
||||
|
||||
for (AutoHideUiElement element : mElements) {
|
||||
shouldHide &= element.shouldHideOnTouch();
|
||||
}
|
||||
if (shouldAutoHide) {
|
||||
|
||||
if (shouldHide) {
|
||||
userAutoHide();
|
||||
}
|
||||
}
|
||||
@@ -152,7 +162,11 @@ public class AutoHideController {
|
||||
}
|
||||
|
||||
private boolean isAnyTransientBarShown() {
|
||||
return (mStatusBar != null && mStatusBar.isTransientShown())
|
||||
|| mNavigationBar != null && mNavigationBar.isTransientShown();
|
||||
for (AutoHideUiElement element : mElements) {
|
||||
if (element.isVisible()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,8 +105,10 @@ import com.android.systemui.recents.Recents;
|
||||
import com.android.systemui.shared.system.ActivityManagerWrapper;
|
||||
import com.android.systemui.shared.system.QuickStepContract;
|
||||
import com.android.systemui.stackdivider.Divider;
|
||||
import com.android.systemui.statusbar.AutoHideUiElement;
|
||||
import com.android.systemui.statusbar.CommandQueue;
|
||||
import com.android.systemui.statusbar.CommandQueue.Callbacks;
|
||||
import com.android.systemui.statusbar.NotificationRemoteInputManager;
|
||||
import com.android.systemui.statusbar.StatusBarState;
|
||||
import com.android.systemui.statusbar.notification.stack.StackStateAnimator;
|
||||
import com.android.systemui.statusbar.phone.ContextualButton.ContextButtonListener;
|
||||
@@ -166,6 +168,7 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
|
||||
private int mDisabledFlags2;
|
||||
private final Lazy<StatusBar> mStatusBarLazy;
|
||||
private final ShadeController mShadeController;
|
||||
private final NotificationRemoteInputManager mNotificationRemoteInputManager;
|
||||
private Recents mRecents;
|
||||
private StatusBar mStatusBar;
|
||||
private final Divider mDivider;
|
||||
@@ -291,6 +294,7 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
|
||||
CommandQueue commandQueue, Divider divider,
|
||||
Optional<Recents> recentsOptional, Lazy<StatusBar> statusBarLazy,
|
||||
ShadeController shadeController,
|
||||
NotificationRemoteInputManager notificationRemoteInputManager,
|
||||
@Main Handler mainHandler) {
|
||||
mAccessibilityManagerWrapper = accessibilityManagerWrapper;
|
||||
mDeviceProvisionedController = deviceProvisionedController;
|
||||
@@ -300,6 +304,7 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
|
||||
mSysUiFlagsContainer = sysUiFlagsContainer;
|
||||
mStatusBarLazy = statusBarLazy;
|
||||
mShadeController = shadeController;
|
||||
mNotificationRemoteInputManager = notificationRemoteInputManager;
|
||||
mAssistantAvailable = mAssistManager.getAssistInfoForUser(UserHandle.USER_CURRENT) != null;
|
||||
mOverviewProxyService = overviewProxyService;
|
||||
mNavigationModeController = navigationModeController;
|
||||
@@ -614,7 +619,7 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
|
||||
clearTransient();
|
||||
}
|
||||
|
||||
void clearTransient() {
|
||||
private void clearTransient() {
|
||||
if (mTransientShown) {
|
||||
mTransientShown = false;
|
||||
handleTransientChanged();
|
||||
@@ -1048,10 +1053,30 @@ public class NavigationBarFragment extends LifecycleFragment implements Callback
|
||||
/** Sets {@link AutoHideController} to the navigation bar. */
|
||||
public void setAutoHideController(AutoHideController autoHideController) {
|
||||
mAutoHideController = autoHideController;
|
||||
mAutoHideController.setNavigationBar(this);
|
||||
mAutoHideController.addAutoHideUiElement(new AutoHideUiElement() {
|
||||
@Override
|
||||
public void synchronizeState() {
|
||||
checkNavBarModes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldHideOnTouch() {
|
||||
return !mNotificationRemoteInputManager.getController().isRemoteInputActive();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return isTransientShown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hide() {
|
||||
clearTransient();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
boolean isTransientShown() {
|
||||
private boolean isTransientShown() {
|
||||
return mTransientShown;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,6 +163,7 @@ import com.android.systemui.recents.ScreenPinningRequest;
|
||||
import com.android.systemui.shared.plugins.PluginManager;
|
||||
import com.android.systemui.shared.system.WindowManagerWrapper;
|
||||
import com.android.systemui.stackdivider.Divider;
|
||||
import com.android.systemui.statusbar.AutoHideUiElement;
|
||||
import com.android.systemui.statusbar.BackDropView;
|
||||
import com.android.systemui.statusbar.CommandQueue;
|
||||
import com.android.systemui.statusbar.CrossFadeHelper;
|
||||
@@ -1074,7 +1075,27 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
}
|
||||
});
|
||||
|
||||
mAutoHideController.setStatusBar(this);
|
||||
mAutoHideController.addAutoHideUiElement(new AutoHideUiElement() {
|
||||
@Override
|
||||
public void synchronizeState() {
|
||||
checkBarModes();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldHideOnTouch() {
|
||||
return !mRemoteInputManager.getController().isRemoteInputActive();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
return isTransientShown();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hide() {
|
||||
clearTransient();
|
||||
}
|
||||
});
|
||||
|
||||
ScrimView scrimBehind = mNotificationShadeWindowView.findViewById(R.id.scrim_behind);
|
||||
ScrimView scrimInFront = mNotificationShadeWindowView.findViewById(R.id.scrim_in_front);
|
||||
@@ -2228,7 +2249,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
clearTransient();
|
||||
}
|
||||
|
||||
void clearTransient() {
|
||||
private void clearTransient() {
|
||||
if (mTransientShown) {
|
||||
mTransientShown = false;
|
||||
handleTransientChanged();
|
||||
@@ -4262,7 +4283,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
||||
return mGutsManager;
|
||||
}
|
||||
|
||||
boolean isTransientShown() {
|
||||
private boolean isTransientShown() {
|
||||
return mTransientShown;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,14 +16,7 @@
|
||||
|
||||
package com.android.systemui.statusbar.phone.dagger;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Handler;
|
||||
import android.view.IWindowManager;
|
||||
|
||||
import com.android.systemui.dagger.qualifiers.Main;
|
||||
import com.android.systemui.statusbar.NotificationRemoteInputManager;
|
||||
import com.android.systemui.statusbar.notification.row.RowContentBindStage;
|
||||
import com.android.systemui.statusbar.phone.AutoHideController;
|
||||
import com.android.systemui.statusbar.phone.NotificationGroupAlertTransferHelper;
|
||||
import com.android.systemui.statusbar.phone.StatusBar;
|
||||
|
||||
@@ -39,16 +32,6 @@ import dagger.Provides;
|
||||
*/
|
||||
@Module
|
||||
public interface StatusBarPhoneDependenciesModule {
|
||||
/** */
|
||||
@Singleton
|
||||
@Provides
|
||||
static AutoHideController newAutoHideController(Context context,
|
||||
@Main Handler handler,
|
||||
NotificationRemoteInputManager notificationRemoteInputManager,
|
||||
IWindowManager iWindowManager) {
|
||||
return new AutoHideController(context, handler, notificationRemoteInputManager,
|
||||
iWindowManager);
|
||||
}
|
||||
|
||||
/** */
|
||||
@Singleton
|
||||
|
||||
@@ -70,6 +70,7 @@ import com.android.systemui.recents.OverviewProxyService;
|
||||
import com.android.systemui.recents.Recents;
|
||||
import com.android.systemui.stackdivider.Divider;
|
||||
import com.android.systemui.statusbar.CommandQueue;
|
||||
import com.android.systemui.statusbar.NotificationRemoteInputManager;
|
||||
import com.android.systemui.statusbar.policy.AccessibilityManagerWrapper;
|
||||
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
|
||||
|
||||
@@ -255,6 +256,7 @@ public class NavigationBarFragmentTest extends SysuiBaseFragmentTest {
|
||||
Optional.of(mRecents),
|
||||
() -> mock(StatusBar.class),
|
||||
mock(ShadeController.class),
|
||||
mock(NotificationRemoteInputManager.class),
|
||||
mHandler);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user