From eb218f6fa6167d19b2a9cdb93c369bef60a56611 Mon Sep 17 00:00:00 2001 From: tibbi Date: Sat, 12 Nov 2016 23:45:40 +0100 Subject: [PATCH] rename intent data to resultdata --- .../gallery/activities/MainActivity.java | 8 ++++---- .../gallery/activities/SetWallpaperActivity.kt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java index b046948da..4e4e14100 100644 --- a/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java +++ b/app/src/main/java/com/simplemobiletools/gallery/activities/MainActivity.java @@ -406,11 +406,11 @@ public class MainActivity extends SimpleActivity } @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { + protected void onActivityResult(int requestCode, int resultCode, Intent resultData) { if (resultCode == RESULT_OK) { - if (requestCode == PICK_MEDIA && data != null) { + if (requestCode == PICK_MEDIA && resultData != null) { final Intent result = new Intent(); - final String path = data.getData().getPath(); + final String path = resultData.getData().getPath(); final Uri uri = Uri.fromFile(new File(path)); if (mIsGetImageContentIntent || mIsGetVideoContentIntent || mIsGetAnyContentIntent) { final String type = Utils.Companion.getMimeType(path); @@ -428,7 +428,7 @@ public class MainActivity extends SimpleActivity finish(); } } - super.onActivityResult(requestCode, resultCode, data); + super.onActivityResult(requestCode, resultCode, resultData); } @Override diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt index 7aefbd99c..172c6126f 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/SetWallpaperActivity.kt @@ -87,14 +87,14 @@ class SetWallpaperActivity : SimpleActivity(), CropImageView.OnCropImageComplete } } - override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { + override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) { if (requestCode == PICK_IMAGE) { - if (resultCode == Activity.RESULT_OK && data != null) { - handleImage(data) + if (resultCode == Activity.RESULT_OK && resultData != null) { + handleImage(resultData) } else { finish() } } - super.onActivityResult(requestCode, resultCode, data) + super.onActivityResult(requestCode, resultCode, resultData) } }