"android.graphics.SurfaceTexture", "setDefaultBufferSize",
int.class, int.class);
+ public static final boolean HAS_MTP =
+ Build.VERSION.SDK_INT >= VERSION_CODES.HONEYCOMB_MR1;
+
private static boolean hasField(Class<?> klass, String fieldName) {
try {
klass.getDeclaredField(fieldName);
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;
// 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));