summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorLikai Ding <likaid@codeaurora.org>2016-06-03 12:08:07 +0800
committerLikai Ding <likaid@codeaurora.org>2016-06-06 09:09:25 +0800
commitb4a82b335c3d133f76f457102fde3f4726e0e023 (patch)
tree9aae6175a161028445c57bb639c239efe61c124e /src/com
parentdca8afa5e689dbb96649884bfb0deab9b89055f0 (diff)
downloadandroid_packages_apps_Gallery2-b4a82b335c3d133f76f457102fde3f4726e0e023.tar.gz
android_packages_apps_Gallery2-b4a82b335c3d133f76f457102fde3f4726e0e023.tar.bz2
android_packages_apps_Gallery2-b4a82b335c3d133f76f457102fde3f4726e0e023.zip
Gallery: don't check permission on pre-M devices
CRs-Fixed: 1024516 Change-Id: I6b9be95ce2e063ed50b910c1d28cf9ce648a37af
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/gallery3d/app/GalleryActivity.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/com/android/gallery3d/app/GalleryActivity.java b/src/com/android/gallery3d/app/GalleryActivity.java
index b86b8f75e..2237fc9c7 100644
--- a/src/com/android/gallery3d/app/GalleryActivity.java
+++ b/src/com/android/gallery3d/app/GalleryActivity.java
@@ -32,6 +32,7 @@ import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
+import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
@@ -47,7 +48,6 @@ import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
-import android.view.Window;
import android.view.WindowManager;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
@@ -157,6 +157,8 @@ public final class GalleryActivity extends AbstractGalleryActivity implements On
}
private boolean needRequestStoragePermission() {
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) return false;
+
boolean needRequest = false;
String[] permissions = {
Manifest.permission.WRITE_EXTERNAL_STORAGE,