diff options
author | Chih-Chung Chang <chihchung@google.com> | 2012-07-03 19:33:46 +0800 |
---|---|---|
committer | Chih-Chung Chang <chihchung@google.com> | 2012-07-04 12:53:14 +0800 |
commit | 59b53e0547413da04cb4c7409f8331dc5d8481f2 (patch) | |
tree | 27e4fd0ced4a96c4ea8f297e3b5f08a9046461bc /src | |
parent | aadaaa8482521a1b468f6b3a65811aac8ac212f0 (diff) | |
download | android_packages_apps_Snap-59b53e0547413da04cb4c7409f8331dc5d8481f2.tar.gz android_packages_apps_Snap-59b53e0547413da04cb4c7409f8331dc5d8481f2.tar.bz2 android_packages_apps_Snap-59b53e0547413da04cb4c7409f8331dc5d8481f2.zip |
Use MTP only if the MTP API is available.
Change-Id: I5c747d0da2905eb344c56dfab6333034dd5eecc3
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/gallery3d/data/DataManager.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/data/DataManager.java b/src/com/android/gallery3d/data/DataManager.java index 85513279c..9ffdc0b50 100644 --- a/src/com/android/gallery3d/data/DataManager.java +++ b/src/com/android/gallery3d/data/DataManager.java @@ -23,6 +23,7 @@ import android.os.Handler; import android.support.v4.content.LocalBroadcastManager; import com.android.gallery3d.app.GalleryApp; +import com.android.gallery3d.common.ApiHelper; import com.android.gallery3d.common.Utils; import com.android.gallery3d.data.MediaSet.ItemConsumer; import com.android.gallery3d.data.MediaSource.PathId; @@ -115,7 +116,9 @@ public class DataManager { // the order matters, the UriSource must come last addSource(new LocalSource(mApplication)); addSource(new PicasaSource(mApplication)); - addSource(new MtpSource(mApplication)); + if (ApiHelper.HAS_MTP) { + addSource(new MtpSource(mApplication)); + } addSource(new ComboSource(mApplication)); addSource(new ClusterSource(mApplication)); addSource(new FilterSource(mApplication)); |