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

Commit 5bc4afb9 authored by George Chan's avatar George Chan Committed by Android (Google) Code Review
Browse files

Merge "Updated StrongAuthTracker to use internal API with it's own disable reason." into main

parents 691e8f28 aad476af
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -34,9 +34,11 @@ import java.lang.annotation.RetentionPolicy;
public abstract class UsbManagerInternal {

  public static final int OS_USB_DISABLE_REASON_AAPM = 0;
  public static final int OS_USB_DISABLE_REASON_LOCKDOWN_MODE = 1;

  @Retention(RetentionPolicy.SOURCE)
  @IntDef(value = {OS_USB_DISABLE_REASON_AAPM})
  @IntDef(value = {OS_USB_DISABLE_REASON_AAPM,
    OS_USB_DISABLE_REASON_LOCKDOWN_MODE})
  public @interface OsUsbDisableReason {
  }

+5 −2
Original line number Diff line number Diff line
@@ -1527,8 +1527,11 @@ public class UsbService extends IUsbManager.Stub {
            }
            mLockdownModeStatus = lockDownTriggeredByUser;
            for (UsbPort port: mPortManager.getPorts()) {
                enableUsbData(port.getId(), !lockDownTriggeredByUser, STRONG_AUTH_OPERATION_ID,
                        new IUsbOperationInternal.Default());
                enableUsbDataInternal(port.getId(), !lockDownTriggeredByUser,
                    STRONG_AUTH_OPERATION_ID,
                    new IUsbOperationInternal.Default(),
                    UsbManagerInternal.OS_USB_DISABLE_REASON_LOCKDOWN_MODE,
                    true);
            }
        }
    }