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

Commit 4b558962 authored by jabashque's avatar jabashque
Browse files

fixup! Rewrite trust USB restriction handling

For our Trust preferences, if the `trust_restrict_usb` setting is
missing, we default to assuming a value of 0 (don't restrict USB
devices). However, here in fw/b, we're instead defaulting to assuming a
value of 1 (restruct USB devices when device is locked). As such, this
can cause confusion because the user is expecting that we aren't
restricting USB connections by default.

Let's update the fw/b side of things to also assume a value of 0 instead
to clear up the confusion.

Change-Id: Ifa45bfb05ad4e745266f3da11ee3f0f4a6a3384b
parent 33a0c1ca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1520,7 +1520,7 @@ public class UsbDeviceManager implements ActivityTaskManagerInternal.ScreenObser

        public void setTrustRestrictUsb() {
            final int restrictUsb = LineageSettings.Global.getInt(mContentResolver,
                    LineageSettings.Global.TRUST_RESTRICT_USB, 1);
                    LineageSettings.Global.TRUST_RESTRICT_USB, 0);
            // Effective immediately, ejects any connected USB devices.
            // If the restriction is set to "only when locked", only execute once USB is
            // disconnected and keyguard is showing, to avoid ejecting connected devices