Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public InputStream openResource(Uri uri) {
}

private static int getFieldId(Context context, String assetType, String assetName)
throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException {
throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException
{
Class<?> d = context.getClassLoader().loadClass(context.getPackageName() + ".R$" + assetType);
java.lang.reflect.Field field = d.getField(assetName);
return field.getInt(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ public Plugin loadInstance(Plugin plugin) {
* @throws InvalidPluginMethodException if no method was found on that plugin
*/
public void invoke(String methodName, PluginCall call)
throws PluginLoadException, InvalidPluginMethodException, InvocationTargetException, IllegalAccessException {
throws PluginLoadException, InvalidPluginMethodException, InvocationTargetException, IllegalAccessException
{
if (this.instance == null) {
// Can throw PluginLoadException
this.load();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ public HttpURLConnectionBuilder setUrlParams(JSObject params) throws MalformedUR
}

public HttpURLConnectionBuilder setUrlParams(JSObject params, boolean shouldEncode)
throws URISyntaxException, MalformedURLException {
throws URISyntaxException, MalformedURLException
{
String initialQuery = url.getQuery();
String initialQueryBuilderStr = initialQuery == null ? "" : initialQuery;

Expand Down Expand Up @@ -212,7 +213,8 @@ public static JSObject buildResponse(CapacitorHttpUrlConnection connection) thro
* @throws JSONException Thrown if the JSON is unable to be parsed
*/
public static JSObject buildResponse(CapacitorHttpUrlConnection connection, ResponseType responseType)
throws IOException, JSONException {
throws IOException, JSONException
{
int statusCode = connection.getResponseCode();

JSObject output = new JSObject();
Expand Down Expand Up @@ -383,7 +385,8 @@ public static String readStreamAsString(InputStream in) throws IOException {
* @throws JSONException thrown when the incoming JSON is malformed
*/
public static JSObject request(PluginCall call, String httpMethod, Bridge bridge)
throws IOException, URISyntaxException, JSONException {
throws IOException, URISyntaxException, JSONException
{
String urlString = call.getString("url", "");
JSObject headers = call.getObject("headers", new JSObject());
JSObject params = call.getObject("params", new JSObject());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ public static PackageInfo getPackageInfo(PackageManager pm, String packageName)
return InternalUtils.getPackageInfo(pm, packageName, 0);
}

public static PackageInfo getPackageInfo(PackageManager pm, String packageName, long flags)
throws PackageManager.NameNotFoundException {
public static PackageInfo getPackageInfo(
PackageManager pm,
String packageName,
long flags
) throws PackageManager.NameNotFoundException {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
return pm.getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(flags));
} else {
Expand All @@ -20,8 +23,11 @@ public static PackageInfo getPackageInfo(PackageManager pm, String packageName,
}

@SuppressWarnings("deprecation")
private static PackageInfo getPackageInfoLegacy(PackageManager pm, String packageName, long flags)
throws PackageManager.NameNotFoundException {
private static PackageInfo getPackageInfoLegacy(
PackageManager pm,
String packageName,
long flags
) throws PackageManager.NameNotFoundException {
return pm.getPackageInfo(packageName, (int) flags);
}
}
Loading