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

Commit 79ba5298 authored by Avinash Vadlamudi's avatar Avinash Vadlamudi
Browse files

Remove the dependency on user setting to enable / disable the lockscreen button support

- Previously, capability to control lockscreen support is provided by a
  setting entrypoint in QR scanner, however now that support is
  deprecated.

Bug: 376247980
Fixes: 376247980
Test: atest QRCodeScannerControllerTest
Flag: EXEMPT bugfix
Change-Id: I35c6066c6a010df9da8464e453e16e0dc3ec9935
parent a9c33352
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ public class QRCodeScannerControllerTest extends SysuiTestCase {
        mSecureSettings.putStringForUser(LOCK_SCREEN_SHOW_QR_CODE_SCANNER, "0",
                UserHandle.USER_CURRENT);
        verifyActivityDetails("abc/.def");
        assertThat(mController.isEnabledForLockScreenButton()).isFalse();
        assertThat(mController.isEnabledForLockScreenButton()).isTrue();
        assertThat(mController.isAllowedOnLockScreen()).isTrue();
        assertThat(mController.isAbleToLaunchScannerActivity()).isTrue();

+1 −1
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ public class QRCodeScannerController implements
     * Returns true if lock screen entry point for QR Code Scanner is to be enabled.
     */
    public boolean isEnabledForLockScreenButton() {
        return mQRCodeScannerEnabled && isAbleToLaunchScannerActivity() && isAllowedOnLockScreen();
        return isAbleToLaunchScannerActivity() && isAllowedOnLockScreen();
    }

    /** Returns whether the QR scanner button is allowed on lockscreen. */