Skip to content

Commit

Permalink
pain
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishan09811 authored Apr 14, 2024
1 parent 70c710d commit 6bfd472
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,6 @@ protected void onCreate(Bundle savedInstanceState) {
}).start();
});

private void createDocument(@NonNull String mimeType, String fileName, String outputDirPath) {
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType(mimeType);
intent.putExtra(Intent.EXTRA_TITLE, fileName);
intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, Uri.fromFile(new File(outputDirPath)));
startActivityForResult(intent, 1);
}

if (game.getRomPath().startsWith("folder:")) {
findViewById(R.id.remove).setVisibility(View.GONE);
} else {
Expand All @@ -101,6 +92,15 @@ private void createDocument(@NonNull String mimeType, String fileName, String ou
}
}

private void createDocument(@NonNull String mimeType, String fileName, String outputDirPath) {
Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType(mimeType);
intent.putExtra(Intent.EXTRA_TITLE, fileName);
intent.putExtra(DocumentsContract.EXTRA_INITIAL_URI, Uri.fromFile(new File(outputDirPath)));
startActivityForResult(intent, 1);
}

// Make a shortcut for a specific game
private void makeShortcut() {
Context context = CompatUtils.findActivity(getContext());
Expand Down

0 comments on commit 6bfd472

Please sign in to comment.