Merge changes I2516e8d2,I6c4f5c93 into sc-v2-dev am: af816a74d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16017765 Change-Id: I5b788fa5a5bac5912d82342be103ae6f4fd78f4e
This commit is contained in:
@@ -385,11 +385,16 @@ public abstract class PanelViewController {
|
||||
|
||||
final boolean expand;
|
||||
if (event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel) {
|
||||
// If we get a cancel, put the shade back to the state it was in when the gesture
|
||||
// started
|
||||
if (onKeyguard) {
|
||||
// If the keyguard is fading away, don't expand it again. This can happen if you're
|
||||
// swiping to unlock, the app below the keyguard is in landscape, and the screen
|
||||
// rotates while your finger is still down after the swipe to unlock.
|
||||
if (mKeyguardStateController.isKeyguardFadingAway()) {
|
||||
expand = false;
|
||||
} else if (onKeyguard) {
|
||||
expand = true;
|
||||
} else {
|
||||
// If we get a cancel, put the shade back to the state it was in when the
|
||||
// gesture started
|
||||
expand = !mPanelClosedOnDown;
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -4,10 +4,10 @@ import android.animation.Animator
|
||||
import android.animation.AnimatorListenerAdapter
|
||||
import android.animation.ValueAnimator
|
||||
import android.content.Context
|
||||
import android.content.res.Configuration
|
||||
import android.database.ContentObserver
|
||||
import android.os.Handler
|
||||
import android.provider.Settings
|
||||
import android.view.Surface
|
||||
import android.view.View
|
||||
import com.android.systemui.animation.Interpolators
|
||||
import com.android.systemui.dagger.SysUISingleton
|
||||
@@ -239,10 +239,11 @@ class UnlockedScreenOffAnimationController @Inject constructor(
|
||||
return false
|
||||
}
|
||||
|
||||
// If we're not allowed to rotate the keyguard, then only do the screen off animation if
|
||||
// we're in portrait. Otherwise, AOD will animate in sideways, which looks weird.
|
||||
// If we're not allowed to rotate the keyguard, it can only be displayed in zero-degree
|
||||
// portrait. If we're in another orientation, disable the screen off animation so we don't
|
||||
// animate in the keyguard AOD UI sideways or upside down.
|
||||
if (!keyguardStateController.isKeyguardScreenRotationAllowed &&
|
||||
context.resources.configuration.orientation != Configuration.ORIENTATION_PORTRAIT) {
|
||||
context.display.rotation != Surface.ROTATION_0) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user