Skip to content

Commit 3275d18

Browse files
committed
Add javaDocs to AndroidTools.hasUsbAccessoryPermission
1 parent 2de8c9e commit 3275d18

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

android/sdl_android/src/main/java/com/smartdevicelink/util/AndroidTools.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,13 @@ public static void saveVehicleType(Context context, VehicleType vehicleType, Str
397397
}
398398
}
399399

400+
/**
401+
* A helper method is used to see if this app has permission for UsbAccessory.
402+
* We need UsbAccessory permission if we are plugged in via AOA and do not have BLUETOOTH_CONNECT
403+
* permission for our service to enter the foreground on Android UPSIDE_DOWN_CAKE and greater
404+
* @param context a context that will be used to check the permission.
405+
* @return true if connected via AOA and we have UsbAccessory permission
406+
*/
400407
public static boolean hasUsbAccessoryPermission(Context context) {
401408
if (context == null) {
402409
return false;

0 commit comments

Comments
 (0)