Skip to content

Commit

Permalink
spotless apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Kafle committed Sep 4, 2023
1 parent 58be08e commit d2e52df
Showing 1 changed file with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ public static void openFile(
mainActivity.startActivity(intent);
} else {
try {
openFileDialogFragmentFor(f, mainActivity,useNewStack);
openFileDialogFragmentFor(f, mainActivity, useNewStack);
} catch (Exception e) {
Toast.makeText(
mainActivity, mainActivity.getString(R.string.no_app_found), Toast.LENGTH_LONG)
Expand All @@ -762,11 +762,14 @@ public static void openFile(
private static void openFileDialogFragmentFor(
@NonNull File file, @NonNull MainActivity mainActivity, @NonNull Boolean useNewStack) {
openFileDialogFragmentFor(
file, mainActivity, MimeTypes.getMimeType(file.getAbsolutePath(), false),useNewStack);
file, mainActivity, MimeTypes.getMimeType(file.getAbsolutePath(), false), useNewStack);
}

private static void openFileDialogFragmentFor(
@NonNull File file, @NonNull MainActivity mainActivity, @NonNull String mimeType, @NonNull Boolean useNewStack) {
@NonNull File file,
@NonNull MainActivity mainActivity,
@NonNull String mimeType,
@NonNull Boolean useNewStack) {
OpenFileDialogFragment.Companion.openFileOrShow(
FileProvider.getUriForFile(mainActivity, mainActivity.getPackageName(), file),
mimeType,
Expand All @@ -776,14 +779,23 @@ private static void openFileDialogFragmentFor(
}

private static void openFileDialogFragmentFor(
@NonNull DocumentFile file, @NonNull MainActivity mainActivity, @NonNull Boolean useNewStack) {
@NonNull DocumentFile file,
@NonNull MainActivity mainActivity,
@NonNull Boolean useNewStack) {
openFileDialogFragmentFor(
file.getUri(), mainActivity, MimeTypes.getMimeType(file.getUri().toString(), false), useNewStack);
file.getUri(),
mainActivity,
MimeTypes.getMimeType(file.getUri().toString(), false),
useNewStack);
}

private static void openFileDialogFragmentFor(
@NonNull Uri uri, @NonNull MainActivity mainActivity, @NonNull String mimeType, @NonNull Boolean useNewStack) {
OpenFileDialogFragment.Companion.openFileOrShow(uri, mimeType, useNewStack, mainActivity, false);
@NonNull Uri uri,
@NonNull MainActivity mainActivity,
@NonNull String mimeType,
@NonNull Boolean useNewStack) {
OpenFileDialogFragment.Companion.openFileOrShow(
uri, mimeType, useNewStack, mainActivity, false);
}

private static boolean isSelfDefault(File f, Context c) {
Expand Down

0 comments on commit d2e52df

Please sign in to comment.