summaryrefslogtreecommitdiffstats
path: root/src/com/android/gallery3d/data/MtpSource.java
diff options
context:
space:
mode:
authorChih-Chung Chang <chihchung@google.com>2012-06-07 20:09:13 +0800
committerChih-Chung Chang <chihchung@google.com>2012-06-18 17:59:58 +0800
commit4ddc93e1f61858195a62729e54450502628fe28a (patch)
tree6a3bb2cc609e01f488b2f1a484be082e0d859272 /src/com/android/gallery3d/data/MtpSource.java
parente2bd0fa7863f5912073bcdee88ebc281b8d125c6 (diff)
downloadandroid_packages_apps_Snap-4ddc93e1f61858195a62729e54450502628fe28a.tar.gz
android_packages_apps_Snap-4ddc93e1f61858195a62729e54450502628fe28a.tar.bz2
android_packages_apps_Snap-4ddc93e1f61858195a62729e54450502628fe28a.zip
Add swipe-to-delete gesture.
Change-Id: I992e59702f9dfff17da2f4464e48c9228d42b1b3
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");
+ }
}