what-the-bank/sources/io/flutter/plugins/imagepicker/ImagePickerUtils.java

25 lines
823 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package io.flutter.plugins.imagepicker;
import android.content.Context;
import android.content.pm.PackageManager;
import java.util.Arrays;
/* loaded from: classes6.dex */
final class ImagePickerUtils {
ImagePickerUtils() {
}
private static boolean isPermissionPresentInManifest(Context context, String str) {
try {
return Arrays.asList(context.getPackageManager().getPackageInfo(context.getPackageName(), 4096).requestedPermissions).contains(str);
} catch (PackageManager.NameNotFoundException unused) {
return false;
}
}
/* JADX INFO: Access modifiers changed from: package-private */
public static boolean needRequestCameraPermission(Context context) {
return isPermissionPresentInManifest(context, "android.permission.CAMERA");
}
}