rename intent data to resultdata
This commit is contained in:
parent
8ccb0385ca
commit
eb218f6fa6
2 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue