Skip to content

Commit

Permalink
v2.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
DF1E committed Dec 30, 2015
1 parent a24a7c9 commit bbddedc
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 25 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
Simple Explorer
===========

Simple Explorer is a open source file explorer. You can help to translate this app at [Crowdin](https://crowdin.com/project/simpleexplorer).

[![Crowdin](https://d322cqt584bo4o.cloudfront.net/simpleexplorer/localized.png)](https://crowdin.com/project/simpleexplorer)
Simple Explorer is a open source file explorer.

####License
````
Expand Down Expand Up @@ -62,7 +60,6 @@ More info under: https://www.gnu.org/licenses/gpl-3.0
+ turkish - adamslast
+ ukrainian - DMDP
+ vietnamese - hoangnguyen
+ [More translators](https://crowdin.com/project/simpleexplorer/settings#members)

####Discussion Thread
http://forum.xda-developers.com/showthread.php?t=2330864
4 changes: 2 additions & 2 deletions explorer/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 16
targetSdkVersion 23
versionCode 66
versionName "2.3"
versionCode 67
versionName "2.3.1"
}

lintOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import android.widget.Toast;

import com.dnielfe.manager.R;
import com.dnielfe.manager.utils.MediaStoreUtils;
import com.dnielfe.manager.utils.SimpleUtils;
import com.dnielfe.manager.utils.ZipUtils;

Expand Down Expand Up @@ -60,7 +61,10 @@ protected List<String> doInBackground(File... files) {
failed.add(Arrays.toString(files));
}

SimpleUtils.requestMediaScanner(activity, files[1].listFiles());
if (files[1].canRead()) {
for (File file : files[1].listFiles())
MediaStoreUtils.addFileToMediaStore(file.getPath(), activity);
}
return failed;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import com.dnielfe.manager.R;
import com.dnielfe.manager.utils.ClipBoard;
import com.dnielfe.manager.utils.MediaStoreUtils;
import com.dnielfe.manager.utils.SimpleUtils;

import java.io.File;
Expand Down Expand Up @@ -73,8 +74,10 @@ protected List<String> doInBackground(String... content) {
}
}

if (location.canRead())
SimpleUtils.requestMediaScanner(activity, location.listFiles());
if (location.canRead()) {
for (File file : location.listFiles())
MediaStoreUtils.addFileToMediaStore(file.getPath(), activity);
}
return failed;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static Uri getUriFromFile(final String path, Context context) {
}
}

public static final void addFileToMediaStore(final String path, Context context) {
public static void addFileToMediaStore(final String path, Context context) {
Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
File file = new File(path);
Uri contentUri = Uri.fromFile(file);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.BitmapDrawable;
import android.media.MediaScannerConnection;
import android.net.Uri;
import android.os.Build;
import android.support.v4.provider.DocumentFile;
Expand Down Expand Up @@ -36,17 +35,6 @@ public class SimpleUtils {
private static final BigInteger GB_BI = KB_BI.multiply(MB_BI);
private static final BigInteger TB_BI = KB_BI.multiply(GB_BI);

// scan file after move/copy
public static void requestMediaScanner(final Context context, final File... files) {
final String[] paths = new String[files.length];
int i = 0;
for (final File file : files) {
paths[i] = file.getPath();
i++;
}
MediaScannerConnection.scanFile(context, paths, null, null);
}

// TODO: fix search with root
private static void search_file(String dir, String fileName, ArrayList<String> n) {
File root_dir = new File(dir);
Expand Down Expand Up @@ -118,7 +106,7 @@ public static void moveToDirectory(File old_file, File target, Context c) {
}
}

// TODO: fix copy file to sdcard root
// TODO: fix copy to sdcard root
public static boolean copyFile(final File source, final File target, Context context) {
FileInputStream inStream = null;
OutputStream outStream = null;
Expand Down
2 changes: 1 addition & 1 deletion explorer/src/main/res/layout/item_bookmark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:layout_toLeftOf="@+id/imageButton_remove"
android:orientation="vertical"
android:paddingBottom="5dp"
android:paddingLeft="6dp"
android:paddingLeft="9dp"
android:paddingTop="4dp">

<TextView
Expand Down
3 changes: 2 additions & 1 deletion explorer/src/main/res/layout/item_drawermenu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
android:gravity="center_vertical"
android:padding="7dp"
android:textSize="18sp"
android:textAppearance="?android:attr/textAppearance" />
android:textAppearance="?android:attr/textAppearance"
android:paddingLeft="10dp" />

0 comments on commit bbddedc

Please sign in to comment.