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

Commit 25ab2105 authored by Nicolò Mazzucato's avatar Nicolò Mazzucato Committed by Android (Google) Code Review
Browse files

Merge "Fix sidefps on portrait large screens" into tm-qpr-dev

parents fb50080c ac82db46
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -40,4 +40,6 @@

    <bool name="config_use_large_screen_shade_header">true</bool>

    <!-- Whether to show the side fps hint while on bouncer -->
    <bool name="config_show_sidefps_hint_on_bouncer">true</bool>
</resources>
+3 −0
Original line number Diff line number Diff line
@@ -548,6 +548,9 @@
    <!-- Package name of the preferred system app to perform eSOS action -->
    <string name="config_preferredEmergencySosPackage" translatable="false"></string>

    <!-- Whether to show the side fps hint while on bouncer -->
    <bool name="config_show_sidefps_hint_on_bouncer">false</bool>

    <!-- Whether to use the split 2-column notification shade -->
    <bool name="config_use_split_notification_shade">false</bool>

+2 −1
Original line number Diff line number Diff line
@@ -343,7 +343,8 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard
        if (!mSidefpsController.isPresent()) {
            return;
        }
        if (mBouncerVisible && mView.isSidedSecurityMode()
        if (mBouncerVisible
                && getResources().getBoolean(R.bool.config_show_sidefps_hint_on_bouncer)
                && mUpdateMonitor.isFingerprintDetectionRunning()
                && !mUpdateMonitor.userNeedsStrongAuth()) {
            mSidefpsController.get().show();
+5 −4
Original line number Diff line number Diff line
@@ -318,7 +318,7 @@ public class KeyguardSecurityContainerControllerTest extends SysuiTestCase {
    @Test
    public void onBouncerVisibilityChanged_withoutSidedSecurity_sideFpsHintHidden() {
        setupConditionsToEnableSideFpsHint();
        setSidedSecurityMode(false);
        setSideFpsHintEnabledFromResources(false);
        reset(mSidefpsController);

        mKeyguardSecurityContainerController.onBouncerVisibilityChanged(View.VISIBLE);
@@ -383,7 +383,7 @@ public class KeyguardSecurityContainerControllerTest extends SysuiTestCase {

    private void setupConditionsToEnableSideFpsHint() {
        attachView();
        setSidedSecurityMode(true);
        setSideFpsHintEnabledFromResources(true);
        setFingerprintDetectionRunning(true);
        setNeedsStrongAuth(false);
    }
@@ -399,8 +399,9 @@ public class KeyguardSecurityContainerControllerTest extends SysuiTestCase {
                BiometricSourceType.FINGERPRINT);
    }

    private void setSidedSecurityMode(boolean sided) {
        when(mView.isSidedSecurityMode()).thenReturn(sided);
    private void setSideFpsHintEnabledFromResources(boolean enabled) {
        when(mResources.getBoolean(R.bool.config_show_sidefps_hint_on_bouncer)).thenReturn(
                enabled);
    }

    private void setNeedsStrongAuth(boolean needed) {