summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/data/MtpSource.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/gallery3d/data/MtpSource.java')
-rw-r--r--src/com/android/gallery3d/data/MtpSource.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/data/MtpSource.java b/src/com/android/gallery3d/data/MtpSource.java
index 683a40291..aaf50ad4c 100644
--- a/src/com/android/gallery3d/data/MtpSource.java
+++ b/src/com/android/gallery3d/data/MtpSource.java
@@ -18,7 +18,7 @@ package com.android.gallery3d.data;
import com.android.gallery3d.app.GalleryApp;
-class MtpSource extends MediaSource {
+public class MtpSource extends MediaSource {
private static final String TAG = "MtpSource";
private static final int MTP_DEVICESET = 0;
@@ -68,4 +68,8 @@ class MtpSource extends MediaSource {
public void resume() {
mMtpContext.resume();
}
+
+ public static boolean isMtpPath(String s) {
+ return s != null && Path.fromString(s).getPrefix().equals("mtp");
+ }
}