Skip to content

Commit

Permalink
reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
Praharsh Jain committed Feb 2, 2023
1 parent c305ac8 commit b697af7
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions app/src/main/java/com/praharsh/vudit/FileViewer.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public class FileViewer extends AppCompatActivity
SearchView.OnQueryTextListener {
private static final int REQUEST_ID_MULTIPLE_PERMISSIONS = 1, SDCARD_WRITE_PERMISSION_REQUEST_CODE = 100;
private static final String tempPath = Environment.getExternalStorageDirectory().getPath() + "/Vudit/temp/";
private static final String[] requiredpermissions = {
private static final String[] requiredPermissions = {
Manifest.permission.READ_EXTERNAL_STORAGE,
Manifest.permission.WRITE_EXTERNAL_STORAGE,
Manifest.permission.MANAGE_EXTERNAL_STORAGE,
Expand All @@ -106,15 +106,14 @@ private enum MediaFileType {
Image, Audio, Video, Document, Archive, Text, APK,
}

private static boolean mBusy = false, recentsView = false, favouritesView = false, homeView = true;
private static boolean isValid, mBusy = false, recentsView = false, favouritesView = false, homeView = true, sortDesc = false, listFoldersFirst = true, storeRecentItems = true, showHiddenFiles = true;
private static ViewHolder holder;
private Toolbar toolbar;
private DrawerLayout drawer;
private ListView lv;
private GridLayout homeViewLayout;
private File file;
private File[] files;
private File[] origFiles;
private File[] files, origFiles;
private RecentFilesStack recent;
private ArrayList<File> favourites;
private EfficientAdapter adap;
Expand All @@ -125,7 +124,6 @@ private enum MediaFileType {
private SeekBar seek;
private byte[] data;
private int sortCriterion = 0;
private boolean isValid, sortDesc = false, listFoldersFirst = true, storeRecentItems = true, showHiddenFiles = true;
//Comparators for sorting
private final Comparator<File> byName = (f1, f2) -> {
int res = String.CASE_INSENSITIVE_ORDER.compare(f1.getName(), f2.getName());
Expand Down Expand Up @@ -716,7 +714,6 @@ public boolean onContextItemSelected(MenuItem item) {

@Override
public void onScroll(AbsListView absListView, int i, int i1, int i2) {

}

public void onActivityResult(int requestCode, int resultCode, Intent resultData) {
Expand Down Expand Up @@ -1342,7 +1339,7 @@ public void onRequestPermissionsResult(int requestCode, String[] permissions, in
private List<String> getNeededPermissions() {
List<String> listPermissionsNeeded = new ArrayList<>();
if (SDK_INT >= Build.VERSION_CODES.M) {
for (String permission : requiredpermissions) {
for (String permission : requiredPermissions) {
if (ContextCompat.checkSelfPermission(getApplicationContext(), permission) != PackageManager.PERMISSION_GRANTED) {
listPermissionsNeeded.add(permission);
}
Expand Down

0 comments on commit b697af7

Please sign in to comment.