Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74c5d050 authored by axfordjc's avatar axfordjc Committed by Jonathon Axford
Browse files

Landscape Bouncer cleanup

Making improvements consistent across landscape Pin, Pattern, and Password bouncers.

Bug: 293252410
Fixes: 293427037

Test: KeyguardPasswordViewControllerTest, PasswordBouncerFoldableUIScreenshotTest, PasswordBouncerLargeUIScreenshotTest, PasswordBouncerSmallUIScreenshotTest, PasswordBouncerFoldableScreen, PasswordBouncerLargeScreen, PasswordBouncerSmallScreen, KeyguardPinViewControllerTest, PinBouncerFoldableUIScreenshotTest, PinBouncerLargeUIScreenshotTest, PinBouncerSmallUIScreenshotTest, PinBouncerFoldableScreen, PinBouncerLargeScreen, PinBouncerSmallScreen, KeyguardPatternViewControllerTest, PatternBouncerFoldableUIScreenshotTest, PatternBouncerLargeUIScreenshotTest, PatternBouncerSmallUIScreenshotTest, PatternBouncerFoldableScreen, PatternBouncerLargeScreen, PatterndBouncerSmallScreen
Change-Id: I0eeaf60569e57d915c254d8d3ba891c5a4880caa
parent 3544524b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -26,7 +26,6 @@
    android:orientation="vertical"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_height="match_parent"
    androidprv:layout_maxWidth="@dimen/keyguard_security_width"
    android:layout_gravity="center_horizontal|bottom"
    android:layout_gravity="center_horizontal|bottom"
    android:gravity="bottom">
    android:gravity="bottom">


@@ -36,6 +35,7 @@
        android:id="@+id/password_container"
        android:id="@+id/password_container"
        android:layout_width="match_parent"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_height="match_parent"
        android:maxWidth="@dimen/keyguard_security_width"
        android:layout_gravity="center_horizontal"
        android:layout_gravity="center_horizontal"
        android:clipChildren="false"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:clipToPadding="false"
+1 −0
Original line number Original line Diff line number Diff line
@@ -34,6 +34,7 @@
        android:id="@+id/pin_container"
        android:id="@+id/pin_container"
        android:layout_width="match_parent"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_height="match_parent"
        android:maxWidth="@dimen/keyguard_security_width"
        android:clipChildren="false"
        android:clipChildren="false"
        android:clipToPadding="false"
        android:clipToPadding="false"
        android:layoutDirection="ltr"
        android:layoutDirection="ltr"
+3 −5
Original line number Original line Diff line number Diff line
@@ -26,12 +26,10 @@
        motion:constraintSetStart="@id/single_constraints"
        motion:constraintSetStart="@id/single_constraints"
        motion:constraintSetEnd="@+id/split_constraints"
        motion:constraintSetEnd="@+id/split_constraints"
        motion:duration="0"
        motion:duration="0"
        motion:autoTransition="none">
        motion:autoTransition="none"/>
    </Transition>


    <ConstraintSet android:id="@+id/single_constraints">
    <!-- No changes to default layout -->
    <!-- No changes to default layout -->
    </ConstraintSet>
    <ConstraintSet android:id="@+id/single_constraints"/>


    <ConstraintSet android:id="@+id/split_constraints">
    <ConstraintSet android:id="@+id/split_constraints">


+0 −4
Original line number Original line Diff line number Diff line
@@ -16,8 +16,6 @@


package com.android.keyguard;
package com.android.keyguard;


import static com.android.systemui.flags.Flags.LOCKSCREEN_ENABLE_LANDSCAPE;

import android.annotation.CallSuper;
import android.annotation.CallSuper;
import android.annotation.NonNull;
import android.annotation.NonNull;
import android.annotation.Nullable;
import android.annotation.Nullable;
@@ -259,8 +257,6 @@ public abstract class KeyguardInputViewController<T extends KeyguardInputView>
                        mFalsingCollector, mKeyguardViewController,
                        mFalsingCollector, mKeyguardViewController,
                        mDevicePostureController, mFeatureFlags);
                        mDevicePostureController, mFeatureFlags);
            } else if (keyguardInputView instanceof KeyguardPINView) {
            } else if (keyguardInputView instanceof KeyguardPINView) {
                ((KeyguardPINView) keyguardInputView).setIsLockScreenLandscapeEnabled(
                        mFeatureFlags.isEnabled(LOCKSCREEN_ENABLE_LANDSCAPE));
                return new KeyguardPinViewController((KeyguardPINView) keyguardInputView,
                return new KeyguardPinViewController((KeyguardPINView) keyguardInputView,
                        mKeyguardUpdateMonitor, securityMode, mLockPatternUtils,
                        mKeyguardUpdateMonitor, securityMode, mLockPatternUtils,
                        keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker,
                        keyguardSecurityCallback, mMessageAreaControllerFactory, mLatencyTracker,
+12 −11
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.keyguard;
package com.android.keyguard;


import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;
import static android.content.res.Configuration.ORIENTATION_LANDSCAPE;

import static com.android.internal.jank.InteractionJankMonitor.CUJ_LOCKSCREEN_PIN_APPEAR;
import static com.android.internal.jank.InteractionJankMonitor.CUJ_LOCKSCREEN_PIN_APPEAR;
import static com.android.internal.jank.InteractionJankMonitor.CUJ_LOCKSCREEN_PIN_DISAPPEAR;
import static com.android.internal.jank.InteractionJankMonitor.CUJ_LOCKSCREEN_PIN_DISAPPEAR;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_CLOSED;
import static com.android.systemui.statusbar.policy.DevicePostureController.DEVICE_POSTURE_CLOSED;
@@ -105,13 +106,14 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {
    }
    }


    void onDevicePostureChanged(@DevicePostureInt int posture) {
    void onDevicePostureChanged(@DevicePostureInt int posture) {
        if (mLastDevicePosture != posture) {
        if (mLastDevicePosture == posture) return;
        mLastDevicePosture = posture;
        mLastDevicePosture = posture;


        if (mIsLockScreenLandscapeEnabled) {
        if (mIsLockScreenLandscapeEnabled) {
            boolean useSplitBouncerAfterFold =
            boolean useSplitBouncerAfterFold =
                    mLastDevicePosture == DEVICE_POSTURE_CLOSED
                    mLastDevicePosture == DEVICE_POSTURE_CLOSED
                        &&  getResources().getConfiguration().orientation == ORIENTATION_LANDSCAPE;
                    && getResources().getConfiguration().orientation == ORIENTATION_LANDSCAPE
                    && getResources().getBoolean(R.bool.update_bouncer_constraints);


            if (mAlreadyUsingSplitBouncer != useSplitBouncerAfterFold) {
            if (mAlreadyUsingSplitBouncer != useSplitBouncerAfterFold) {
                updateConstraints(useSplitBouncerAfterFold);
                updateConstraints(useSplitBouncerAfterFold);
@@ -120,7 +122,6 @@ public class KeyguardPINView extends KeyguardPinBasedInputView {


        updateMargins();
        updateMargins();
    }
    }
    }


    @Override
    @Override
    protected void resetState() {
    protected void resetState() {
Loading