From a410e4371c1b688641480ebab9c75dc514daca96 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 20 Feb 2016 16:42:13 +0100 Subject: [PATCH] rename some variables --- .../simplemobiletools/com/MainActivity.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/gallery/simplemobiletools/com/MainActivity.java b/app/src/main/java/gallery/simplemobiletools/com/MainActivity.java index 370629873..aa5b62975 100644 --- a/app/src/main/java/gallery/simplemobiletools/com/MainActivity.java +++ b/app/src/main/java/gallery/simplemobiletools/com/MainActivity.java @@ -27,9 +27,9 @@ public class MainActivity extends AppCompatActivity { for (Map.Entry dir : directories.entrySet()) { final String path = dir.getKey(); - final String name = path.substring(path.lastIndexOf("/") + 1); + final String dirName = path.substring(path.lastIndexOf("/") + 1); final String cnt = String.valueOf(dir.getValue()); - dirs.add(new Directory(path, name, cnt)); + dirs.add(new Directory(path, dirName, cnt)); } final GridView gridView = (GridView) findViewById(R.id.photo_grid); @@ -38,7 +38,7 @@ public class MainActivity extends AppCompatActivity { } private Map getImages() { - final Map dirs = new TreeMap<>(); + final Map directories = new TreeMap<>(); final Uri uri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; final Cursor cursor = getContentResolver().query(uri, null, null, null, null); @@ -47,15 +47,15 @@ public class MainActivity extends AppCompatActivity { do { final File file = new File(cursor.getString(pathIndex)); final String path = file.getParent().toLowerCase(); - if (dirs.containsKey(path)) { - dirs.put(path, dirs.get(path) + 1); + if (directories.containsKey(path)) { + directories.put(path, directories.get(path) + 1); } else { - dirs.put(path, 1); + directories.put(path, 1); } } while (cursor.moveToNext()); cursor.close(); } - return dirs; + return directories; } }