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

Commit 607710ad authored by Mike Lockwood's avatar Mike Lockwood
Browse files

UsbService: Don't require permissions for UsbManager.getCurrentAccessory()



Permission check should only happen in openAccessory()
Otherwise an application will not be able to check for the current accessory
and ask for permissions (if it is a suitable match for the application)

BUG: 4069037

Change-Id: If5b44ebda2e8077598d96629163cc74aa336589e
Signed-off-by: default avatarMike Lockwood <lockwood@android.com>
parent 980f0430
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -423,11 +423,8 @@ public class UsbService extends IUsbManager.Stub {

    /* returns the currently attached USB accessory (device mode) */
    public UsbAccessory getCurrentAccessory() {
        synchronized (mLock) {
            mDeviceManager.checkPermission(mCurrentAccessory);
        return mCurrentAccessory;
    }
    }

    /* opens the currently attached USB accessory (device mode) */
    public ParcelFileDescriptor openAccessory(UsbAccessory accessory) {