fix: Add missing @Deprecated Java annotations

This commit is contained in:
Manuel Beck
2026-05-15 12:42:49 +02:00
parent 6b4addad66
commit fc9f8a20fb
@@ -32,6 +32,7 @@ package org.apache.cordova;
* @deprecated As of cordova-android 5.0.0, this class is no longer needed and will be removed in a future release. * @deprecated As of cordova-android 5.0.0, this class is no longer needed and will be removed in a future release.
* You can call directly into {@link CordovaInterface} methods instead with {@link CordovaPlugin#cordova}. * You can call directly into {@link CordovaInterface} methods instead with {@link CordovaPlugin#cordova}.
*/ */
@Deprecated
public class PermissionHelper { public class PermissionHelper {
/** /**
* Requests a "dangerous" permission for the application at runtime. This is a helper method * Requests a "dangerous" permission for the application at runtime. This is a helper method
@@ -44,6 +45,7 @@ public class PermissionHelper {
* @param permission The permission to be requested * @param permission The permission to be requested
* @deprecated As of cordova-android 5.0.0, use {@link CordovaInterface#requestPermission(CordovaPlugin, int, String)} instead. * @deprecated As of cordova-android 5.0.0, use {@link CordovaInterface#requestPermission(CordovaPlugin, int, String)} instead.
*/ */
@Deprecated
public static void requestPermission(CordovaPlugin plugin, int requestCode, String permission) { public static void requestPermission(CordovaPlugin plugin, int requestCode, String permission) {
PermissionHelper.requestPermissions(plugin, requestCode, new String[] {permission}); PermissionHelper.requestPermissions(plugin, requestCode, new String[] {permission});
} }
@@ -59,6 +61,7 @@ public class PermissionHelper {
* @param permissions The permissions to be requested * @param permissions The permissions to be requested
* @deprecated As of cordova-android 5.0.0, use {@link CordovaInterface#requestPermissions(CordovaPlugin, int, String[])} instead. * @deprecated As of cordova-android 5.0.0, use {@link CordovaInterface#requestPermissions(CordovaPlugin, int, String[])} instead.
*/ */
@Deprecated
public static void requestPermissions(CordovaPlugin plugin, int requestCode, String[] permissions) { public static void requestPermissions(CordovaPlugin plugin, int requestCode, String[] permissions) {
plugin.cordova.requestPermissions(plugin, requestCode, permissions); plugin.cordova.requestPermissions(plugin, requestCode, permissions);
} }
@@ -73,6 +76,7 @@ public class PermissionHelper {
* @return True if the permission has already been granted and false otherwise * @return True if the permission has already been granted and false otherwise
* @deprecated As of cordova-android 5.0.0, use {@link CordovaInterface#hasPermission(String)} instead. * @deprecated As of cordova-android 5.0.0, use {@link CordovaInterface#hasPermission(String)} instead.
*/ */
@Deprecated
public static boolean hasPermission(CordovaPlugin plugin, String permission) { public static boolean hasPermission(CordovaPlugin plugin, String permission) {
return plugin.cordova.hasPermission(permission); return plugin.cordova.hasPermission(permission);
} }