Merge changes I901908d9,Iac9835ad into oc-dr1-dev am: 47aac56746
am: 7f5805d0aa
Change-Id: Iba30c1811f16ed01194755cd59b8c78af156eb9c
This commit is contained in:
@@ -187,8 +187,12 @@ public class FingerprintUnlockController extends KeyguardUpdateMonitorCallback {
|
|||||||
Trace.endSection();
|
Trace.endSection();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
startWakeAndUnlock(calculateMode());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startWakeAndUnlock(int mode) {
|
||||||
boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive();
|
boolean wasDeviceInteractive = mUpdateMonitor.isDeviceInteractive();
|
||||||
mMode = calculateMode();
|
mMode = mode;
|
||||||
mHasScreenTurnedOnSinceAuthenticating = false;
|
mHasScreenTurnedOnSinceAuthenticating = false;
|
||||||
if (mMode == MODE_WAKE_AND_UNLOCK_PULSING && pulsingOrAod()) {
|
if (mMode == MODE_WAKE_AND_UNLOCK_PULSING && pulsingOrAod()) {
|
||||||
// If we are waking the device up while we are pulsing the clock and the
|
// If we are waking the device up while we are pulsing the clock and the
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ import android.widget.RemoteViews;
|
|||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import com.android.internal.annotations.VisibleForTesting;
|
||||||
import com.android.internal.colorextraction.ColorExtractor;
|
import com.android.internal.colorextraction.ColorExtractor;
|
||||||
import com.android.internal.graphics.ColorUtils;
|
import com.android.internal.graphics.ColorUtils;
|
||||||
import com.android.internal.logging.MetricsLogger;
|
import com.android.internal.logging.MetricsLogger;
|
||||||
@@ -749,7 +750,7 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
private SysuiColorExtractor mColorExtractor;
|
private SysuiColorExtractor mColorExtractor;
|
||||||
private ForegroundServiceController mForegroundServiceController;
|
private ForegroundServiceController mForegroundServiceController;
|
||||||
private ScreenLifecycle mScreenLifecycle;
|
private ScreenLifecycle mScreenLifecycle;
|
||||||
private WakefulnessLifecycle mWakefulnessLifecycle;
|
@VisibleForTesting WakefulnessLifecycle mWakefulnessLifecycle;
|
||||||
|
|
||||||
private void recycleAllVisibilityObjects(ArraySet<NotificationVisibility> array) {
|
private void recycleAllVisibilityObjects(ArraySet<NotificationVisibility> array) {
|
||||||
final int N = array.size();
|
final int N = array.size();
|
||||||
@@ -3787,6 +3788,15 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
|
|
||||||
private void dismissKeyguardThenExecute(OnDismissAction action, Runnable cancelAction,
|
private void dismissKeyguardThenExecute(OnDismissAction action, Runnable cancelAction,
|
||||||
boolean afterKeyguardGone) {
|
boolean afterKeyguardGone) {
|
||||||
|
if (mWakefulnessLifecycle.getWakefulness() == WAKEFULNESS_ASLEEP
|
||||||
|
&& mUnlockMethodCache.canSkipBouncer()
|
||||||
|
&& !mLeaveOpenOnKeyguardHide
|
||||||
|
&& isPulsing()) {
|
||||||
|
// Reuse the fingerprint wake-and-unlock transition if we dismiss keyguard from a pulse.
|
||||||
|
// TODO: Factor this transition out of FingerprintUnlockController.
|
||||||
|
mFingerprintUnlockController.startWakeAndUnlock(
|
||||||
|
FingerprintUnlockController.MODE_WAKE_AND_UNLOCK_PULSING);
|
||||||
|
}
|
||||||
if (mStatusBarKeyguardViewManager.isShowing()) {
|
if (mStatusBarKeyguardViewManager.isShowing()) {
|
||||||
mStatusBarKeyguardViewManager.dismissWithAction(action, cancelAction,
|
mStatusBarKeyguardViewManager.dismissWithAction(action, cancelAction,
|
||||||
afterKeyguardGone);
|
afterKeyguardGone);
|
||||||
@@ -4223,6 +4233,8 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
|
|
||||||
public void showKeyguard() {
|
public void showKeyguard() {
|
||||||
mKeyguardRequested = true;
|
mKeyguardRequested = true;
|
||||||
|
mLeaveOpenOnKeyguardHide = false;
|
||||||
|
mPendingRemoteInputView = null;
|
||||||
updateIsKeyguard();
|
updateIsKeyguard();
|
||||||
mAssistManager.onLockscreenShown();
|
mAssistManager.onLockscreenShown();
|
||||||
}
|
}
|
||||||
@@ -4273,13 +4285,11 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
}
|
}
|
||||||
updateKeyguardState(false /* goingToFullShade */, false /* fromShadeLocked */);
|
updateKeyguardState(false /* goingToFullShade */, false /* fromShadeLocked */);
|
||||||
updatePanelExpansionForKeyguard();
|
updatePanelExpansionForKeyguard();
|
||||||
mLeaveOpenOnKeyguardHide = false;
|
|
||||||
if (mDraggedDownRow != null) {
|
if (mDraggedDownRow != null) {
|
||||||
mDraggedDownRow.setUserLocked(false);
|
mDraggedDownRow.setUserLocked(false);
|
||||||
mDraggedDownRow.notifyHeightChanged(false /* needsAnimation */);
|
mDraggedDownRow.notifyHeightChanged(false /* needsAnimation */);
|
||||||
mDraggedDownRow = null;
|
mDraggedDownRow = null;
|
||||||
}
|
}
|
||||||
mPendingRemoteInputView = null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updatePanelExpansionForKeyguard() {
|
private void updatePanelExpansionForKeyguard() {
|
||||||
@@ -4419,15 +4429,19 @@ public class StatusBar extends SystemUI implements DemoMode,
|
|||||||
setBarState(StatusBarState.SHADE);
|
setBarState(StatusBarState.SHADE);
|
||||||
View viewToClick = null;
|
View viewToClick = null;
|
||||||
if (mLeaveOpenOnKeyguardHide) {
|
if (mLeaveOpenOnKeyguardHide) {
|
||||||
mLeaveOpenOnKeyguardHide = false;
|
if (!mKeyguardRequested) {
|
||||||
|
mLeaveOpenOnKeyguardHide = false;
|
||||||
|
}
|
||||||
long delay = calculateGoingToFullShadeDelay();
|
long delay = calculateGoingToFullShadeDelay();
|
||||||
mNotificationPanel.animateToFullShade(delay);
|
mNotificationPanel.animateToFullShade(delay);
|
||||||
if (mDraggedDownRow != null) {
|
if (mDraggedDownRow != null) {
|
||||||
mDraggedDownRow.setUserLocked(false);
|
mDraggedDownRow.setUserLocked(false);
|
||||||
mDraggedDownRow = null;
|
mDraggedDownRow = null;
|
||||||
}
|
}
|
||||||
viewToClick = mPendingRemoteInputView;
|
if (!mKeyguardRequested) {
|
||||||
mPendingRemoteInputView = null;
|
viewToClick = mPendingRemoteInputView;
|
||||||
|
mPendingRemoteInputView = null;
|
||||||
|
}
|
||||||
|
|
||||||
// Disable layout transitions in navbar for this transition because the load is just
|
// Disable layout transitions in navbar for this transition because the load is just
|
||||||
// too heavy for the CPU and GPU on any device.
|
// too heavy for the CPU and GPU on any device.
|
||||||
|
|||||||
@@ -156,7 +156,6 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
*/
|
*/
|
||||||
protected void showBouncerOrKeyguard(boolean hideBouncerWhenShowing) {
|
protected void showBouncerOrKeyguard(boolean hideBouncerWhenShowing) {
|
||||||
if (mBouncer.needsFullscreenBouncer() && !mDozing) {
|
if (mBouncer.needsFullscreenBouncer() && !mDozing) {
|
||||||
|
|
||||||
// The keyguard might be showing (already). So we need to hide it.
|
// The keyguard might be showing (already). So we need to hide it.
|
||||||
mStatusBar.hideKeyguard();
|
mStatusBar.hideKeyguard();
|
||||||
mBouncer.show(true /* resetSecuritySelection */);
|
mBouncer.show(true /* resetSecuritySelection */);
|
||||||
@@ -167,6 +166,7 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
mBouncer.prepare();
|
mBouncer.prepare();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
updateStates();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showBouncer() {
|
private void showBouncer() {
|
||||||
@@ -250,7 +250,9 @@ public class StatusBarKeyguardViewManager implements RemoteInputController.Callb
|
|||||||
public void setDozing(boolean dozing) {
|
public void setDozing(boolean dozing) {
|
||||||
if (mDozing != dozing) {
|
if (mDozing != dozing) {
|
||||||
mDozing = dozing;
|
mDozing = dozing;
|
||||||
reset(dozing /* hideBouncerWhenShowing */);
|
if (dozing || mBouncer.needsFullscreenBouncer() || mOccluded) {
|
||||||
|
reset(dozing /* hideBouncerWhenShowing */);
|
||||||
|
}
|
||||||
updateStates();
|
updateStates();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ import com.android.internal.logging.testing.FakeMetricsLogger;
|
|||||||
import com.android.internal.statusbar.IStatusBarService;
|
import com.android.internal.statusbar.IStatusBarService;
|
||||||
import com.android.keyguard.KeyguardHostView.OnDismissAction;
|
import com.android.keyguard.KeyguardHostView.OnDismissAction;
|
||||||
import com.android.systemui.SysuiTestCase;
|
import com.android.systemui.SysuiTestCase;
|
||||||
|
import com.android.systemui.keyguard.WakefulnessLifecycle;
|
||||||
import com.android.systemui.recents.misc.SystemServicesProxy;
|
import com.android.systemui.recents.misc.SystemServicesProxy;
|
||||||
import com.android.systemui.statusbar.ActivatableNotificationView;
|
import com.android.systemui.statusbar.ActivatableNotificationView;
|
||||||
import com.android.systemui.statusbar.CommandQueue;
|
import com.android.systemui.statusbar.CommandQueue;
|
||||||
@@ -500,6 +501,14 @@ public class StatusBarTest extends SysuiTestCase {
|
|||||||
mSystemServicesProxy = ssp;
|
mSystemServicesProxy = ssp;
|
||||||
mNotificationPanel = panelView;
|
mNotificationPanel = panelView;
|
||||||
mBarService = barService;
|
mBarService = barService;
|
||||||
|
mWakefulnessLifecycle = createAwakeWakefulnessLifecycle();
|
||||||
|
}
|
||||||
|
|
||||||
|
private WakefulnessLifecycle createAwakeWakefulnessLifecycle() {
|
||||||
|
WakefulnessLifecycle wakefulnessLifecycle = new WakefulnessLifecycle();
|
||||||
|
wakefulnessLifecycle.dispatchStartedWakingUp();
|
||||||
|
wakefulnessLifecycle.dispatchFinishedWakingUp();
|
||||||
|
return wakefulnessLifecycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBarStateForTest(int state) {
|
public void setBarStateForTest(int state) {
|
||||||
|
|||||||
Reference in New Issue
Block a user