Skip to content

Commit 8e9299a

Browse files
committed
Rename applicaitonContext to context, fix JavaDocs
1 parent 92905fa commit 8e9299a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -447,22 +447,22 @@ public static boolean hasUsbAccessoryPermission(Context context) {
447447

448448
/**
449449
* Helper method used to check permission passed in.
450-
* @param applicationContext Context used to check permission
450+
* @param context Context used to check permission
451451
* @param permission String representing permission that is being checked.
452452
* @return true if app has permission.
453453
*/
454-
public static boolean checkPermission(Context applicationContext, String permission) {
455-
if (applicationContext == null) {
454+
public static boolean checkPermission(Context context, String permission) {
455+
if (context == null) {
456456
return false;
457457
}
458-
return PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(applicationContext, permission);
458+
return PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(context, permission);
459459
}
460460

461461
/**
462462
* A helper method used for Android 14 or greater to check if app has necessary permissions
463-
* to enter the foreground.
463+
* to have a service enter the foreground.
464464
* @param context context used to check permissions.
465-
* @return true if app has permission to enter foreground or if Android version < 14
465+
* @return true if app has permission to have a service enter foreground or if Android version < 14
466466
*/
467467
public static boolean hasForegroundServiceTypePermission(Context context) {
468468
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {

0 commit comments

Comments
 (0)