Skip to content

Commit e28d397

Browse files
committed
fix photo
1 parent 9767716 commit e28d397

52 files changed

Lines changed: 1506 additions & 298 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

PowerFileExplorer/build-ffmpeg-armv7a.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ ls -l ${NDK_PATH}/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86/bin/
3636
chmod 777 ./configure
3737
#mkdir ./android-libs/armeabi-v7a
3838
#obj/local/
39+
#NDK_PATH=/data/data/com.pdaxrom.cctools/root/cctools/home/android-ndk-aide
3940
ls -l .
4041
LAMEDIR=/data/data/com.pdaxrom.cctools/root/cctools/home/ffmpeg-3.3.7/libmp3lame
4142
ARMEABI=armeabi-v7a

PowerFileExplorer/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ dependencies{
132132
//compile 'com.android.support:support-dynamic-animation:27.1.1'
133133

134134

135+
136+
//compile 'com.newtronlabs.easypermissions:easypermissions:2.2.0'
135137
//compile 'org.apache.james:apache-mime4j-core:+'
136138
//compile 'org.apache.james:apache-mime4j-dom:+'
137139
//compile 'edu.stanford.nlp:stanford-parser:+'//3.9.1'
300 KB
Binary file not shown.

PowerFileExplorer/src/main/AndroidManifest.xml

Lines changed: 118 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,87 @@
8888
<category android:name="android.intent.category.LAUNCHER" />
8989
<category android:name="android.intent.category.MULTIWINDOW_LAUNCHER" />
9090
</intent-filter>
91-
92-
<intent-filter>
91+
<intent-filter>
92+
<action android:name="android.intent.action.VIEW" />
93+
<action android:name="android.intent.action.EDIT" />
94+
<action android:name="android.intent.action.PICK" />
95+
<action android:name="org.openintents.action.PICK_FILE"/>
96+
<action android:name="org.openintents.action.PICK_DIRECTORY"/>
97+
<action android:name="android.intent.action.SEND" />
98+
<action android:name="android.intent.action.SENDTO" />
99+
<action android:name="android.intent.action.SEND_MULTIPLE" />
100+
<action android:name="org.openintents.action.MULTI_SELECT"/>
101+
<action android:name="com.google.android.gm.action.AUTO_SEND" />
102+
<action android:name="android.intent.action.GET_CONTENT" />
103+
<action android:name="android.intent.action.OPEN_DOCUMENT_TREE" />
104+
<action android:name="android.intent.action.INSERT" />
105+
<category android:name="android.intent.category.DEFAULT" />
106+
<category android:name="android.intent.category.BROWSABLE" />
107+
<category android:name="android.intent.category.OPENABLE"/>
108+
<data android:mimeType="*/*" />
109+
</intent-filter>
110+
<intent-filter>
111+
<action android:name="android.intent.action.VIEW" />
112+
<action android:name="android.intent.action.EDIT" />
113+
<action android:name="android.intent.action.PICK" />
114+
<action android:name="org.openintents.action.PICK_FILE"/>
115+
<action android:name="org.openintents.action.PICK_DIRECTORY"/>
116+
<action android:name="android.intent.action.SEND" />
117+
<action android:name="android.intent.action.SENDTO" />
118+
<action android:name="android.intent.action.SEND_MULTIPLE" />
119+
<action android:name="org.openintents.action.MULTI_SELECT"/>
120+
<action android:name="com.google.android.gm.action.AUTO_SEND" />
121+
<action android:name="android.intent.action.GET_CONTENT" />
122+
<action android:name="android.intent.action.OPEN_DOCUMENT_TREE" />
123+
<action android:name="android.intent.action.INSERT" />
124+
<category android:name="android.intent.category.DEFAULT" />
125+
<category android:name="android.intent.category.BROWSABLE" />
126+
<category android:name="android.intent.category.OPENABLE"/>
127+
<data android:scheme="file"/>
128+
<data android:scheme="http" />
129+
<data android:scheme="https" />
130+
<data android:scheme="ftp" />
131+
<data android:scheme="ftps" />
132+
<data android:scheme="about" />
133+
<data android:scheme="javascript" />
134+
<data android:scheme="mailto" />
135+
<data android:scheme="sms" />
136+
<data android:scheme="smsto" />
137+
<data android:scheme="geo" />
138+
<data android:scheme="folder"/>
139+
<data android:scheme="directory"/>
140+
</intent-filter>
141+
<intent-filter>
142+
<action android:name="android.intent.action.VIEW" />
143+
<action android:name="android.intent.action.EDIT" />
144+
<action android:name="android.intent.action.PICK" />
145+
<action android:name="org.openintents.action.PICK_FILE"/>
146+
<action android:name="org.openintents.action.PICK_DIRECTORY"/>
147+
<action android:name="android.intent.action.SEND" />
148+
<action android:name="android.intent.action.SENDTO" />
149+
<action android:name="android.intent.action.SEND_MULTIPLE" />
150+
<action android:name="org.openintents.action.MULTI_SELECT"/>
151+
<action android:name="com.google.android.gm.action.AUTO_SEND" />
152+
<action android:name="android.intent.action.GET_CONTENT" />
153+
<action android:name="android.intent.action.OPEN_DOCUMENT_TREE" />
154+
<action android:name="android.intent.action.INSERT" />
155+
<action android:name="android.intent.action.SEARCH" />
156+
<action android:name="android.intent.action.WEB_SEARCH" />
157+
<action android:name="android.intent.action.ASSIST" />
158+
<action android:name="com.google.zxing.client.android.SCAN" />
159+
<action android:name="android.intent.action.SEARCH_LONG_PRESS"/>
160+
<category android:name="android.intent.category.DEFAULT" />
161+
<category android:name="android.intent.category.BROWSABLE" />
162+
<category android:name="android.intent.category.OPENABLE"/>
163+
</intent-filter>
164+
<intent-filter>
165+
<action android:name="android.intent.action.VIEW" />
166+
<category android:name="android.intent.category.DEFAULT" />
167+
<category android:name="android.intent.category.BROWSABLE" />
168+
<data android:scheme="zxing" android:host="scan" android:path="/" />
169+
</intent-filter>
170+
171+
<!--<intent-filter>
93172
<action android:name="android.intent.action.PICK"/>
94173
<category android:name="android.intent.category.DEFAULT" />
95174
</intent-filter>
@@ -146,10 +225,10 @@
146225
<action android:name="android.intent.action.GET_CONTENT"/>
147226
<category android:name="android.intent.category.DEFAULT"/>
148227
<category android:name="android.intent.category.OPENABLE"/>
149-
</intent-filter>
228+
</intent-filter>-->
150229

151230
<!-- Filter for multi select feature -->
152-
<intent-filter>
231+
<!--<intent-filter>
153232
<action android:name="org.openintents.action.MULTI_SELECT"/>
154233
<category android:name="android.intent.category.DEFAULT"/>
155234
</intent-filter>
@@ -188,42 +267,60 @@
188267
<category android:name="android.intent.category.OPENABLE"/>
189268
<data android:mimeType="*/*" android:scheme="content"/>
190269
</intent-filter>
191-
<intent-filter>
270+
<intent-filter>
192271
<action android:name="android.intent.action.VIEW"/>
193272
<category android:name="android.intent.category.DEFAULT" />
194273
<category android:name="android.intent.category.BROWSABLE" />
195274
<data android:mimeType="application/x-zip-compressed" />
196275
<data android:mimeType="application/zip" />
197276
<data android:pathPattern=".*\.zip" />
198-
</intent-filter>
199-
<intent-filter>
200-
<action android:name="android.intent.action.SEARCH_LONG_PRESS"/>
201-
<category android:name="android.intent.category.DEFAULT" />
202-
</intent-filter>
203-
277+
</intent-filter>-->
204278
<intent-filter>
205279
<action android:name="android.intent.action.VIEW"/>
206280
<action android:name="android.intent.action.OPEN_DOCUMENT_TREE" />
207281
<category android:name="android.intent.category.DEFAULT"/>
208282
<category android:name="android.intent.category.OPENABLE"/>
209283
<category android:name="android.intent.category.BROWSABLE"/>
284+
<data android:mimeType="application/zip"/>
285+
<data android:mimeType="application/rar"/>
286+
<data android:mimeType="application/octet-stream"/>
210287
<data android:mimeType="application/x-7z"/>
211288
<data android:mimeType="application/x-7z-compressed"/>
212289
<data android:mimeType="application/x-bzip2"/>
213290
<data android:mimeType="application/x-gzip"/>
214291
<data android:mimeType="application/x-xz"/>
215-
<data android:mimeType="application/x-compress"/>
292+
<data android:mimeType="application/x-zip-compressed" />
216293
<data android:mimeType="application/x-rar-compressed"/>
217294
<data android:mimeType="application/x-gtar"/>
218-
<data android:mimeType="application/zip"/>
219-
<data android:mimeType="application/rar"/>
220295
<data android:mimeType="application/x-zip"/>
221296
<data android:mimeType="application/x-compressed"/>
222-
<data android:mimeType="application/octet-stream"/>
223297
<data android:mimeType="application/x-tar"/>
224298
<data android:mimeType="application/x-zpaq"/>
225299
<data android:mimeType="application/x-lzh"/>
226300

301+
<data android:mimeType="application/pdf"/>
302+
<data android:mimeType="application/msword"/>
303+
<data android:mimeType="application/vnd.ms-excel"/>
304+
<data android:mimeType="application/vnd.ms-powerpoint"/>
305+
<data android:mimeType="application/vnd.ms-word"/>
306+
<data android:mimeType="application/vnd.oasis.opendocument.formula"/>
307+
<data android:mimeType="application/vnd.oasis.opendocument.presentation"/>
308+
<data android:mimeType="application/vnd.oasis.opendocument.spreadsheet"/>
309+
<data android:mimeType="application/vnd.oasis.opendocument.text"/>
310+
<data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>
311+
<data android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation"/>
312+
<data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document"/>
313+
<data android:mimeType="text/rtf"/>
314+
<data android:mimeType="text/x-csrc"/>
315+
<data android:mimeType="text/x-chdr"/>
316+
<data android:mimeType="text/x-c++src"/>
317+
<data android:mimeType="text/x-c++hdr"/>
318+
<data android:mimeType="text/html"/>
319+
<data android:mimeType="text/plain"/>
320+
321+
<data android:mimeType="text/*"/>
322+
<data android:mimeType="*/*"/>
323+
227324
<data android:pathPattern=".*\.zip"/>
228325
<data android:pathPattern=".*\.zip.001"/>
229326
<data android:pathPattern=".*\.rar"/>
@@ -242,31 +339,9 @@
242339
<data android:pathPattern=".*\.html"/>
243340
<data android:pathPattern=".*\.aze"/>
244341
<data android:pathPattern=".*\.zpaq"/>
245-
246-
<data android:mimeType="application/pdf"/>
247-
<data android:mimeType="application/vnd.ms-excel"/>
248-
<data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>
249-
<data android:mimeType="text/rtf"/>
250-
<data android:mimeType="text/x-csrc"/>
251-
<data android:mimeType="text/x-chdr"/>
252-
<data android:mimeType="text/x-c++src"/>
253-
<data android:mimeType="text/x-c++hdr"/>
254-
<data android:mimeType="application/msword"/>
255-
<data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document"/>
256-
<data android:mimeType="application/vnd.oasis.opendocument.formula"/>
257-
<data android:mimeType="application/vnd.oasis.opendocument.presentation"/>
258-
<data android:mimeType="application/vnd.oasis.opendocument.spreadsheet"/>
259-
<data android:mimeType="application/vnd.oasis.opendocument.text"/>
260-
<data android:mimeType="application/vnd.ms-powerpoint"/>
261-
<data android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation"/>
262-
<data android:mimeType="text/html"/>
263-
<data android:mimeType="text/plain"/>
264-
265-
<data android:mimeType="text/*"/>
266-
<data android:mimeType="*/*"/>
267342
</intent-filter>
268343

269-
<intent-filter>
344+
<!--<intent-filter>
270345
<action android:name="android.intent.action.SEND"/>
271346
<category android:name="android.intent.category.DEFAULT"/>
272347
<category android:name="android.intent.category.BROWSABLE"/>
@@ -292,7 +367,7 @@
292367
<data android:scheme="directory"/>
293368
<data android:mimeType="resource/folder" />
294369
<data android:mimeType="inode/directory" />
295-
</intent-filter>
370+
</intent-filter>-->
296371

297372
</activity>
298373

@@ -612,17 +687,17 @@
612687
android:name="com.amaze.filemanager.services.ftpservice.FTPReceiver"
613688
android:exported="true">
614689
<intent-filter>
615-
<action android:name="com.amaze.filemanager.services.ftpservice.FTPReceiver.ACTION_START_FTPSERVER" />
616-
<action android:name="com.amaze.filemanager.services.ftpservice.FTPReceiver.ACTION_STOP_FTPSERVER" />
690+
<action android:name="net.gnu.explorer.services.ftpservice.FTPReceiver.ACTION_START_FTPSERVER" />
691+
<action android:name="net.gnu.explorer.services.ftpservice.FTPReceiver.ACTION_STOP_FTPSERVER" />
617692
</intent-filter>
618693
</receiver>
619694

620695
<receiver
621696
android:name="com.amaze.filemanager.ui.notifications.FTPNotification"
622697
android:exported="true">
623698
<intent-filter>
624-
<action android:name="com.amaze.filemanager.services.ftpservice.FTPReceiver.FTPSERVER_STARTED" />
625-
<action android:name="com.amaze.filemanager.services.ftpservice.FTPReceiver.FTPSERVER_STOPPED" />
699+
<action android:name="net.gnu.explorer.services.ftpservice.FTPReceiver.FTPSERVER_STARTED" />
700+
<action android:name="net.gnu.explorer.services.ftpservice.FTPReceiver.FTPSERVER_STOPPED" />
626701
</intent-filter>
627702
</receiver>
628703

PowerFileExplorer/src/main/java/chm/cblink/nb/chmreader/lib/CHMFile.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import java.util.TreeMap;
3535
import java.util.Map.Entry;
3636
import java.util.logging.Logger;
37+
import android.util.Log;
3738

3839
/**
3940
* @author Rui Shen
@@ -599,15 +600,15 @@ public static void main(String[] argv) throws Exception {
599600
CHMFile chm = new CHMFile(argv[0]);
600601
if (argv.length == 1) {
601602
for (String file : chm.list()) {
602-
System.out.println(file);
603+
Log.d("CHMFile", file + "");
603604
}
604605
} else {
605606
byte[] buf = new byte[1024];
606607
for (int i = 1; i < argv.length; i++) {
607608
InputStream in = chm.getResourceAsStream(argv[i]);
608609
int c = 0;
609610
while ((c = in.read(buf)) >= 0) {
610-
System.out.print(new String(buf, 0, c));
611+
Log.d("CHMFile", new String(buf, 0, c));
611612
}
612613
}
613614
}

PowerFileExplorer/src/main/java/com/amaze/filemanager/services/ftpservice/FTPService.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353

5454
public class FTPService extends Service implements Runnable {
5555

56-
public static final int DEFAULT_PORT = 2211;
56+
public static final int DEFAULT_PORT = 2222;
5757
public static final String DEFAULT_USERNAME = "";
5858
public static final int DEFAULT_TIMEOUT = 600; // default timeout, in sec
5959
public static final boolean DEFAULT_SECURE = false;
@@ -69,16 +69,16 @@ public class FTPService extends Service implements Runnable {
6969

7070
private static final String TAG = FTPService.class.getSimpleName();
7171

72-
private static final String WIFI_AP_ADDRESS = "192.168.43.1";
72+
private static final String WIFI_AP_ADDRESS = "192.168.1.1";
7373

7474
// Service will (global) broadcast when server start/stop
75-
static public final String ACTION_STARTED = "com.amaze.filemanager.services.ftpservice.FTPReceiver.FTPSERVER_STARTED";
76-
static public final String ACTION_STOPPED = "com.amaze.filemanager.services.ftpservice.FTPReceiver.FTPSERVER_STOPPED";
77-
static public final String ACTION_FAILEDTOSTART = "com.amaze.filemanager.services.ftpservice.FTPReceiver.FTPSERVER_FAILEDTOSTART";
75+
static public final String ACTION_STARTED = "net.gnu.explorer.services.ftpservice.FTPReceiver.FTPSERVER_STARTED";
76+
static public final String ACTION_STOPPED = "net.gnu.explorer.services.ftpservice.FTPReceiver.FTPSERVER_STOPPED";
77+
static public final String ACTION_FAILEDTOSTART = "net.gnu.explorer.services.ftpservice.FTPReceiver.FTPSERVER_FAILEDTOSTART";
7878

7979
// RequestStartStopReceiver listens for these actions to start/stop this server
80-
static public final String ACTION_START_FTPSERVER = "com.amaze.filemanager.services.ftpservice.FTPReceiver.ACTION_START_FTPSERVER";
81-
static public final String ACTION_STOP_FTPSERVER = "com.amaze.filemanager.services.ftpservice.FTPReceiver.ACTION_STOP_FTPSERVER";
80+
static public final String ACTION_START_FTPSERVER = "net.gnu.explorer.services.ftpservice.FTPReceiver.ACTION_START_FTPSERVER";
81+
static public final String ACTION_STOP_FTPSERVER = "net.gnu.explorer.services.ftpservice.FTPReceiver.ACTION_STOP_FTPSERVER";
8282

8383
private String username, password;
8484
private boolean isPasswordProtected = false;
@@ -206,6 +206,7 @@ public void onDestroy() {
206206
try {
207207
serverThread.join(10000); // wait 10 sec for server thread to finish
208208
} catch (InterruptedException e) {
209+
e.printStackTrace();
209210
}
210211
if (serverThread.isAlive()) {
211212
Log.w(TAG, "Server thread failed to exit");
@@ -253,6 +254,7 @@ public static void sleepIgnoreInterupt(long millis) {
253254
try {
254255
Thread.sleep(millis);
255256
} catch (InterruptedException ignored) {
257+
ignored.printStackTrace();
256258
}
257259
}
258260

PowerFileExplorer/src/main/java/com/amaze/filemanager/utils/files/Futils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private static long getBaseFileSize(BaseFile baseFile, Context context) {
176176
}
177177

178178
public static void scanFile(String path, Context c) {
179-
System.out.println(path + " " + Build.VERSION.SDK_INT);
179+
Log.d(TAG, path + " " + Build.VERSION.SDK_INT);
180180
if (Build.VERSION.SDK_INT >= 19) {
181181
MediaScannerConnection.scanFile(c, new String[]{path}, null, new MediaScannerConnection.OnScanCompletedListener() {
182182

PowerFileExplorer/src/main/java/com/amaze/filemanager/utils/share/ShareTask.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import java.util.ArrayList;
1818
import java.util.List;
19+
import android.util.Log;
1920

2021
/**
2122
* Created by Arpit on 01-07-2015.
@@ -53,7 +54,7 @@ protected Void doInBackground(String... strings) {
5354
arrayList1.add(resInfo.loadLabel(packageManager).toString());
5455
if (packageName.contains("android.bluetooth")) bluetooth_present = true;
5556
Intent intent = new Intent();
56-
System.out.println(resInfo.activityInfo.packageName + "\t" + resInfo.activityInfo.name);
57+
//Log.d("ShareTask", resInfo.activityInfo.packageName + resInfo.activityInfo.name);
5758
intent.setComponent(new ComponentName(packageName, resInfo.activityInfo.name));
5859
intent.setAction(Intent.ACTION_SEND_MULTIPLE);
5960
intent.setType(mime);

PowerFileExplorer/src/main/java/com/ortiz/touch/TouchImageView.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ private static enum State { NONE, DRAG, ZOOM, FLING, ANIMATE_ZOOM };
9797
private GestureDetector.OnDoubleTapListener doubleTapListener = null;
9898
private OnTouchListener userTouchListener = null;
9999
private OnTouchImageViewListener touchImageViewListener = null;
100-
100+
private Runnable postScaleCallback = null;
101+
101102
public TouchImageView(Context context) {
102103
super(context);
103104
sharedConstructing(context);
@@ -149,6 +150,10 @@ public void setOnDoubleTapListener(GestureDetector.OnDoubleTapListener l) {
149150
doubleTapListener = l;
150151
}
151152

153+
public void setPostScaleCallback(Runnable postScaleCallback) {
154+
this.postScaleCallback = postScaleCallback;
155+
}
156+
152157
@Override
153158
public void setImageResource(int resId) {
154159
super.setImageResource(resId);
@@ -922,9 +927,12 @@ public void onScaleEnd(ScaleGestureDetector detector) {
922927
DoubleTapZoom doubleTap = new DoubleTapZoom(targetZoom, viewWidth / 2, viewHeight / 2, true);
923928
compatPostOnAnimation(doubleTap);
924929
}
930+
if (postScaleCallback != null) {
931+
postScaleCallback.run();
932+
}
925933
}
926934
}
927-
935+
928936
private void scaleImage(double deltaScale, float focusX, float focusY, boolean stretchImageToSuper) {
929937

930938
float lowerScale, upperScale;

0 commit comments

Comments
 (0)