Fix bug that don't allow simple selection on recent device
This commit is contained in:
parent
c033d1cc19
commit
2218b47975
2 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue