Merge "Enable a user to collapse QS directly from the home handle" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
199596b110
@@ -101,6 +101,7 @@ import com.android.systemui.fragments.FragmentService;
|
|||||||
import com.android.systemui.media.KeyguardMediaController;
|
import com.android.systemui.media.KeyguardMediaController;
|
||||||
import com.android.systemui.media.MediaDataManager;
|
import com.android.systemui.media.MediaDataManager;
|
||||||
import com.android.systemui.media.MediaHierarchyManager;
|
import com.android.systemui.media.MediaHierarchyManager;
|
||||||
|
import com.android.systemui.navigationbar.NavigationModeController;
|
||||||
import com.android.systemui.plugins.FalsingManager;
|
import com.android.systemui.plugins.FalsingManager;
|
||||||
import com.android.systemui.plugins.FalsingManager.FalsingTapListener;
|
import com.android.systemui.plugins.FalsingManager.FalsingTapListener;
|
||||||
import com.android.systemui.plugins.qs.DetailAdapter;
|
import com.android.systemui.plugins.qs.DetailAdapter;
|
||||||
@@ -108,6 +109,7 @@ import com.android.systemui.plugins.qs.QS;
|
|||||||
import com.android.systemui.plugins.statusbar.StatusBarStateController;
|
import com.android.systemui.plugins.statusbar.StatusBarStateController;
|
||||||
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
|
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
|
||||||
import com.android.systemui.qs.QSDetailDisplayer;
|
import com.android.systemui.qs.QSDetailDisplayer;
|
||||||
|
import com.android.systemui.shared.system.QuickStepContract;
|
||||||
import com.android.systemui.statusbar.CommandQueue;
|
import com.android.systemui.statusbar.CommandQueue;
|
||||||
import com.android.systemui.statusbar.FeatureFlags;
|
import com.android.systemui.statusbar.FeatureFlags;
|
||||||
import com.android.systemui.statusbar.GestureRecorder;
|
import com.android.systemui.statusbar.GestureRecorder;
|
||||||
@@ -581,6 +583,11 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
* The alpha of the views which only show on the keyguard but not in shade / shade locked
|
* The alpha of the views which only show on the keyguard but not in shade / shade locked
|
||||||
*/
|
*/
|
||||||
private float mKeyguardOnlyContentAlpha = 1.0f;
|
private float mKeyguardOnlyContentAlpha = 1.0f;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Are we currently in gesture navigation
|
||||||
|
*/
|
||||||
|
private boolean mIsGestureNavigation;
|
||||||
private int mOldLayoutDirection;
|
private int mOldLayoutDirection;
|
||||||
private NotificationShelfController mNotificationShelfController;
|
private NotificationShelfController mNotificationShelfController;
|
||||||
private int mScrimCornerRadius;
|
private int mScrimCornerRadius;
|
||||||
@@ -669,6 +676,7 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
KeyguardMediaController keyguardMediaController,
|
KeyguardMediaController keyguardMediaController,
|
||||||
PrivacyDotViewController privacyDotViewController,
|
PrivacyDotViewController privacyDotViewController,
|
||||||
TapAgainViewController tapAgainViewController,
|
TapAgainViewController tapAgainViewController,
|
||||||
|
NavigationModeController navigationModeController,
|
||||||
FragmentService fragmentService,
|
FragmentService fragmentService,
|
||||||
QuickAccessWalletController quickAccessWalletController,
|
QuickAccessWalletController quickAccessWalletController,
|
||||||
@Main Executor uiExecutor,
|
@Main Executor uiExecutor,
|
||||||
@@ -769,6 +777,9 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
mAuthController = authController;
|
mAuthController = authController;
|
||||||
mLockIconViewController = lockIconViewController;
|
mLockIconViewController = lockIconViewController;
|
||||||
mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController;
|
mUnlockedScreenOffAnimationController = unlockedScreenOffAnimationController;
|
||||||
|
int currentMode = navigationModeController.addListener(
|
||||||
|
mode -> mIsGestureNavigation = QuickStepContract.isGesturalMode(mode));
|
||||||
|
mIsGestureNavigation = QuickStepContract.isGesturalMode(currentMode);
|
||||||
|
|
||||||
mView.setBackgroundColor(Color.TRANSPARENT);
|
mView.setBackgroundColor(Color.TRANSPARENT);
|
||||||
OnAttachStateChangeListener onAttachStateChangeListener = new OnAttachStateChangeListener();
|
OnAttachStateChangeListener onAttachStateChangeListener = new OnAttachStateChangeListener();
|
||||||
@@ -1808,9 +1819,15 @@ public class NotificationPanelViewController extends PanelViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean isInQsArea(float x, float y) {
|
private boolean isInQsArea(float x, float y) {
|
||||||
return (x >= mQsFrame.getX() && x <= mQsFrame.getX() + mQsFrame.getWidth()) && (
|
if (x < mQsFrame.getX() || x > mQsFrame.getX() + mQsFrame.getWidth()) {
|
||||||
y <= mNotificationStackScrollLayoutController.getBottomMostNotificationBottom()
|
return false;
|
||||||
|| y <= mQs.getView().getY() + mQs.getView().getHeight());
|
}
|
||||||
|
// Let's reject anything at the very bottom around the home handle in gesture nav
|
||||||
|
if (mIsGestureNavigation && y > mView.getHeight() - mNavigationBarBottomHeight) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return y <= mNotificationStackScrollLayoutController.getBottomMostNotificationBottom()
|
||||||
|
|| y <= mQs.getView().getY() + mQs.getView().getHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isOpenQsEvent(MotionEvent event) {
|
private boolean isOpenQsEvent(MotionEvent event) {
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ import com.android.systemui.fragments.FragmentService;
|
|||||||
import com.android.systemui.media.KeyguardMediaController;
|
import com.android.systemui.media.KeyguardMediaController;
|
||||||
import com.android.systemui.media.MediaDataManager;
|
import com.android.systemui.media.MediaDataManager;
|
||||||
import com.android.systemui.media.MediaHierarchyManager;
|
import com.android.systemui.media.MediaHierarchyManager;
|
||||||
|
import com.android.systemui.navigationbar.NavigationModeController;
|
||||||
import com.android.systemui.plugins.FalsingManager;
|
import com.android.systemui.plugins.FalsingManager;
|
||||||
import com.android.systemui.plugins.qs.QS;
|
import com.android.systemui.plugins.qs.QS;
|
||||||
import com.android.systemui.qs.QSDetailDisplayer;
|
import com.android.systemui.qs.QSDetailDisplayer;
|
||||||
@@ -261,6 +262,8 @@ public class NotificationPanelViewTest extends SysuiTestCase {
|
|||||||
@Mock
|
@Mock
|
||||||
private PrivacyDotViewController mPrivacyDotViewController;
|
private PrivacyDotViewController mPrivacyDotViewController;
|
||||||
@Mock
|
@Mock
|
||||||
|
private NavigationModeController mNavigationModeController;
|
||||||
|
@Mock
|
||||||
private SecureSettings mSecureSettings;
|
private SecureSettings mSecureSettings;
|
||||||
@Mock
|
@Mock
|
||||||
private TapAgainViewController mTapAgainViewController;
|
private TapAgainViewController mTapAgainViewController;
|
||||||
@@ -391,6 +394,7 @@ public class NotificationPanelViewTest extends SysuiTestCase {
|
|||||||
mKeyguardMediaController,
|
mKeyguardMediaController,
|
||||||
mPrivacyDotViewController,
|
mPrivacyDotViewController,
|
||||||
mTapAgainViewController,
|
mTapAgainViewController,
|
||||||
|
mNavigationModeController,
|
||||||
mFragmentService,
|
mFragmentService,
|
||||||
mQuickAccessWalletController,
|
mQuickAccessWalletController,
|
||||||
new FakeExecutor(new FakeSystemClock()),
|
new FakeExecutor(new FakeSystemClock()),
|
||||||
|
|||||||
Reference in New Issue
Block a user