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

Commit ce6167f4 authored by Jamie Garside's avatar Jamie Garside
Browse files

Renamed enableOneHandedBouncer to enableDynamicKeyguardPositioning.

One-handed mode is used elsewhere in Android for other stuff, so this
refactoring is to disambiguate the two.

Test: Tests pass
Bug: 170858298
Change-Id: Ief5a0d6a32ab9c016b6e365e58e63db2ed78c198
parent 1d14a338
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -4758,8 +4758,9 @@
    <!-- Whether to select voice/data/sms preference without user confirmation -->
    <bool name="config_voice_data_sms_auto_fallback">false</bool>

    <!-- Whether to enable the one-handed keyguard on the lock screen for wide-screen devices. -->
    <bool name="config_enableOneHandedKeyguard">false</bool>
    <!-- Whether to enable dynamic keyguard positioning for wide screen devices (e.g. only using
         half of the screen, to be accessible using only one hand). -->
    <bool name="config_enableDynamicKeyguardPositioning">false</bool>

    <!-- Whether to allow the caching of the SIM PIN for verification after unattended reboot -->
    <bool name="config_allow_pin_storage_for_unattended_reboot">true</bool>
+1 −1
Original line number Diff line number Diff line
@@ -4245,7 +4245,7 @@

  <java-symbol type="bool" name="config_voice_data_sms_auto_fallback" />

  <java-symbol type="bool" name="config_enableOneHandedKeyguard" />
  <java-symbol type="bool" name="config_enableDynamicKeyguardPositioning" />

  <java-symbol type="attr" name="colorAccentPrimary" />
  <java-symbol type="attr" name="colorAccentSecondary" />
+1 −1
Original line number Diff line number Diff line
@@ -481,7 +481,7 @@ public class KeyguardHostViewController extends ViewController<KeyguardHostView>

        if (resources.getBoolean(R.bool.can_use_one_handed_bouncer)
                && resources.getBoolean(
                com.android.internal.R.bool.config_enableOneHandedKeyguard)) {
                com.android.internal.R.bool.config_enableDynamicKeyguardPositioning)) {
            gravity = resources.getInteger(
                    R.integer.keyguard_host_view_one_handed_gravity);
        } else {
+1 −1
Original line number Diff line number Diff line
@@ -278,7 +278,7 @@ public class KeyguardSecurityContainer extends FrameLayout {
    private boolean canUseOneHandedBouncer() {
        // Is it enabled?
        if (!getResources().getBoolean(
                com.android.internal.R.bool.config_enableOneHandedKeyguard)) {
                com.android.internal.R.bool.config_enableDynamicKeyguardPositioning)) {
            return false;
        }

+3 −3
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ public class KeyguardHostViewControllerTest extends SysuiTestCase {
        mTestableResources.addOverride(
                R.bool.can_use_one_handed_bouncer, false);
        mTestableResources.addOverride(
                com.android.internal.R.bool.config_enableOneHandedKeyguard, false);
                com.android.internal.R.bool.config_enableDynamicKeyguardPositioning, false);

        when(mKeyguardSecurityContainerControllerFactory.create(any(
                KeyguardSecurityContainer.SecurityCallback.class)))
@@ -150,7 +150,7 @@ public class KeyguardHostViewControllerTest extends SysuiTestCase {
        mTestableResources.addOverride(
                R.bool.can_use_one_handed_bouncer, false);
        mTestableResources.addOverride(
                com.android.internal.R.bool.config_enableOneHandedKeyguard, false);
                com.android.internal.R.bool.config_enableDynamicKeyguardPositioning, false);

        mKeyguardHostViewController.init();
        assertEquals(
@@ -161,7 +161,7 @@ public class KeyguardHostViewControllerTest extends SysuiTestCase {
        mTestableResources.addOverride(
                R.bool.can_use_one_handed_bouncer, true);
        mTestableResources.addOverride(
                com.android.internal.R.bool.config_enableOneHandedKeyguard, true);
                com.android.internal.R.bool.config_enableDynamicKeyguardPositioning, true);

        mKeyguardHostViewController.updateResources();
        assertEquals(
Loading