Merge "Fixing shade expanded after unfolding and unlocking with fingerprint" into tm-qpr-dev am: 7c09300459
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19457218 Change-Id: I15ab1db0d08155a39a10d44160adb8a39c2a3f48 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -1105,7 +1105,6 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
isFolded, willGoToSleep, isShadeOpen, leaveOpen));
|
isFolded, willGoToSleep, isShadeOpen, leaveOpen));
|
||||||
}
|
}
|
||||||
if (leaveOpen) {
|
if (leaveOpen) {
|
||||||
mStatusBarStateController.setLeaveOpenOnKeyguardHide(true);
|
|
||||||
if (mKeyguardStateController.isShowing()) {
|
if (mKeyguardStateController.isShowing()) {
|
||||||
// When device state changes on keyguard we don't want to keep the state of
|
// When device state changes on keyguard we don't want to keep the state of
|
||||||
// the shade and instead we open clean state of keyguard with shade closed.
|
// the shade and instead we open clean state of keyguard with shade closed.
|
||||||
@@ -1114,6 +1113,9 @@ public class CentralSurfacesImpl extends CoreStartable implements
|
|||||||
// expanded. To prevent that we can close QS which resets QS and some parts of
|
// expanded. To prevent that we can close QS which resets QS and some parts of
|
||||||
// the shade to its default state. Read more in b/201537421
|
// the shade to its default state. Read more in b/201537421
|
||||||
mCloseQsBeforeScreenOff = true;
|
mCloseQsBeforeScreenOff = true;
|
||||||
|
} else {
|
||||||
|
// below makes shade stay open when going from folded to unfolded
|
||||||
|
mStatusBarStateController.setLeaveOpenOnKeyguardHide(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -965,6 +965,7 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void deviceStateChange_unfolded_shadeOpen_setsLeaveOpenOnKeyguardHide() {
|
public void deviceStateChange_unfolded_shadeOpen_setsLeaveOpenOnKeyguardHide() {
|
||||||
|
when(mKeyguardStateController.isShowing()).thenReturn(false);
|
||||||
setFoldedStates(FOLD_STATE_FOLDED);
|
setFoldedStates(FOLD_STATE_FOLDED);
|
||||||
setGoToSleepStates(FOLD_STATE_FOLDED);
|
setGoToSleepStates(FOLD_STATE_FOLDED);
|
||||||
when(mNotificationPanelViewController.isFullyExpanded()).thenReturn(true);
|
when(mNotificationPanelViewController.isFullyExpanded()).thenReturn(true);
|
||||||
@@ -974,6 +975,19 @@ public class CentralSurfacesImplTest extends SysuiTestCase {
|
|||||||
verify(mStatusBarStateController).setLeaveOpenOnKeyguardHide(true);
|
verify(mStatusBarStateController).setLeaveOpenOnKeyguardHide(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void deviceStateChange_unfolded_shadeOpen_onKeyguard_doesNotSetLeaveOpenOnKeyguardHide() {
|
||||||
|
when(mKeyguardStateController.isShowing()).thenReturn(true);
|
||||||
|
setFoldedStates(FOLD_STATE_FOLDED);
|
||||||
|
setGoToSleepStates(FOLD_STATE_FOLDED);
|
||||||
|
when(mNotificationPanelViewController.isFullyExpanded()).thenReturn(true);
|
||||||
|
|
||||||
|
setDeviceState(FOLD_STATE_UNFOLDED);
|
||||||
|
|
||||||
|
verify(mStatusBarStateController, never()).setLeaveOpenOnKeyguardHide(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void deviceStateChange_unfolded_shadeClose_doesNotSetLeaveOpenOnKeyguardHide() {
|
public void deviceStateChange_unfolded_shadeClose_doesNotSetLeaveOpenOnKeyguardHide() {
|
||||||
setFoldedStates(FOLD_STATE_FOLDED);
|
setFoldedStates(FOLD_STATE_FOLDED);
|
||||||
|
|||||||
Reference in New Issue
Block a user