Add the Intent parameter of onActivityResult as a source

This commit is contained in:
Tony Torralba
2021-10-26 10:43:10 +02:00
parent 520d8f5ec5
commit 211cb9370f
12 changed files with 215 additions and 6 deletions

View File

@@ -0,0 +1,20 @@
package com.example.app;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
public class Safe2 extends Activity {
void sink(Object o) {}
public void onCreate(Bundle saved) {
// activityForResult not called
}
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
sink(requestCode); // safe
sink(resultCode); // safe
sink(data); // Safe
}
}