Skip to content

Commit 5a3ff07

Browse files
committed
Add JavaDocs to AndroidTools.checkPermission
1 parent 3275d18 commit 5a3ff07

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ public static void saveVehicleType(Context context, VehicleType vehicleType, Str
402402
* We need UsbAccessory permission if we are plugged in via AOA and do not have BLUETOOTH_CONNECT
403403
* permission for our service to enter the foreground on Android UPSIDE_DOWN_CAKE and greater
404404
* @param context a context that will be used to check the permission.
405-
* @return true if connected via AOA and we have UsbAccessory permission
405+
* @return true if connected via AOA and we have UsbAccessory permission.
406406
*/
407407
public static boolean hasUsbAccessoryPermission(Context context) {
408408
if (context == null) {
@@ -420,6 +420,12 @@ public static boolean hasUsbAccessoryPermission(Context context) {
420420
return false;
421421
}
422422

423+
/**
424+
* Helper method used to check permission passed in.
425+
* @param applicationContext Context used to check permission
426+
* @param permission String representing permission that is being checked.
427+
* @return true if app has permission.
428+
*/
423429
public static boolean checkPermission(Context applicationContext, String permission) {
424430
if (applicationContext == null) {
425431
return false;

0 commit comments

Comments
 (0)