diff options
author | Owen Lin <owenlin@google.com> | 2012-07-05 17:06:56 +0800 |
---|---|---|
committer | Owen Lin <owenlin@google.com> | 2012-07-05 17:06:56 +0800 |
commit | b98ecd613b64dff8b025ba14fc017ed6ccb191ab (patch) | |
tree | 0aa78a8f87e9e9c6190f1d2861b3704a4fceae31 /src/com/android/gallery3d/util/GalleryUtils.java | |
parent | 4de3fa9d07bc7a8fdf8089a26badf38d8d2d8a3a (diff) | |
download | android_packages_apps_Snap-b98ecd613b64dff8b025ba14fc017ed6ccb191ab.tar.gz android_packages_apps_Snap-b98ecd613b64dff8b025ba14fc017ed6ccb191ab.tar.bz2 android_packages_apps_Snap-b98ecd613b64dff8b025ba14fc017ed6ccb191ab.zip |
Don't test the EXTRA_LOCAL_ONLY before HC.
Change-Id: Idebb2aba994e38cf7eead795f1834ff98eaec27d
Diffstat (limited to 'src/com/android/gallery3d/util/GalleryUtils.java')
-rw-r--r-- | src/com/android/gallery3d/util/GalleryUtils.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/gallery3d/util/GalleryUtils.java b/src/com/android/gallery3d/util/GalleryUtils.java index 1291ee9f7..05198f41b 100644 --- a/src/com/android/gallery3d/util/GalleryUtils.java +++ b/src/com/android/gallery3d/util/GalleryUtils.java @@ -16,6 +16,7 @@ package com.android.gallery3d.util; +import android.annotation.TargetApi; import android.content.ActivityNotFoundException; import android.content.ComponentName; import android.content.Context; @@ -35,6 +36,7 @@ import android.view.WindowManager; import com.android.gallery3d.R; import com.android.gallery3d.app.PackagesMonitor; +import com.android.gallery3d.common.ApiHelper; import com.android.gallery3d.data.DataManager; import com.android.gallery3d.data.MediaItem; import com.android.gallery3d.util.ThreadPool.CancelListener; @@ -288,6 +290,7 @@ public class GalleryUtils { return durationValue; } + @TargetApi(ApiHelper.VERSION_CODES.HONEYCOMB) public static int determineTypeBits(Context context, Intent intent) { int typeBits = 0; String type = intent.resolveType(context); @@ -304,8 +307,10 @@ public class GalleryUtils { typeBits = DataManager.INCLUDE_ALL; } - if (intent.getBooleanExtra(Intent.EXTRA_LOCAL_ONLY, false)) { - typeBits |= DataManager.INCLUDE_LOCAL_ONLY; + if (ApiHelper.HAS_INTENT_EXTRA_LOCAL_ONLY) { + if (intent.getBooleanExtra(Intent.EXTRA_LOCAL_ONLY, false)) { + typeBits |= DataManager.INCLUDE_LOCAL_ONLY; + } } return typeBits; |