Commit 2218b479 authored by Schoumi's avatar Schoumi

Fix bug that don't allow simple selection on recent device

parent c033d1cc
......@@ -525,13 +525,16 @@ public class UploadActivity extends AppCompatActivity {
public void onActivityResult(int requestCode, int resultCode,Intent returnIntent) {
if(resultCode == RESULT_OK){
//retrieve uri from the request image activity and prepare
if(Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) {
ClipData clip = null;
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2)
clip = returnIntent.getClipData();
if(clip == null) {
Uri imageUri = returnIntent.getData();
uris.add(imageUri);
updateSpanCount();
adapter.addUri(this,imageUri);
} else {
ClipData clip = returnIntent.getClipData();
for(int i = 0; clip != null && i < clip.getItemCount(); i++) {
Uri imageUri = clip.getItemAt(i).getUri();
uris.add(imageUri);
......
......@@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.android.tools.build:gradle:2.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment