resolve merge conflict

This commit is contained in:
Jami Cogswell
2022-09-28 16:42:52 -04:00
committed by Tony Torralba
parent 0a135a7f21
commit 66b3c4687d
5 changed files with 43 additions and 187 deletions

View File

@@ -18,5 +18,30 @@
android:exported="false">
</activity>
<activity
android:name=".TestStartActivityToGetIntent.SafeActivity"
android:exported="false">
</activity>
<service
android:name=".TestStartServiceToGetIntent.SomeService"
android:exported="false">
</service>
<service
android:name=".TestStartServiceToGetIntent.SafeService"
android:exported="false">
</service>
<receiver
android:name=".TestStartBroadcastReceiverToGetIntent.SomeBroadcastReceiver"
android:exported="false">
</receiver>
<receiver
android:name=".TestStartBroadcastReceiverToGetIntent.SafeBroadcastReceiver"
android:exported="false">
</receiver>
</application>
</manifest>

View File

@@ -2,30 +2,6 @@ import android.app.Activity;
import android.content.Context;
import android.content.Intent;
// ! Original - saving for reference
// public class TestStartActivityToGetIntent {
// static Object source() {
// return null;
// }
// static void sink(Object sink) {
// }
// public void test(Context ctx) {
// Intent intent = new Intent(null, SomeActivity.class);
// intent.putExtra("data", (String) source());
// ctx.startActivity(intent);
// }
// static class SomeActivity extends Activity {
// public void test() {
// sink(getIntent().getStringExtra("data")); // $ hasValueFlow
// }
// }
// }
public class TestStartActivityToGetIntent {
static Object source(String kind) {

View File

@@ -1,57 +0,0 @@
import android.app.Activity;
//import android.app.Service;
//import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class TestStartComponentToIntent {
static Object source() {
return null;
}
static void sink(Object sink) {
}
public void testActivity(Context ctx) {
Intent intent = new Intent(null, SomeActivity.class);
intent.putExtra("data", (String) source());
ctx.startActivity(intent);
}
static class SomeActivity extends Activity {
public void testActivity() {
sink(getIntent().getStringExtra("data")); // $ hasValueFlow
}
}
// ! WIP
public void testService(Context ctx) {
Intent intent = new Intent(null, SomeService.class);
intent.putExtra("data", (String) source());
ctx.startService(intent);
}
public void testBroadcastReceiver(Context ctx) {
Intent intent = new Intent(null, SomeBroadcastReceiver.class);
intent.putExtra("data", (String) source());
ctx.sendBroadcast(intent);
}
static class SomeService extends Service {
public void test() {
// ! WIP
sink(getIntent().getStringExtra("data")); // $ hasValueFlow
}
}
static class SomeBroadcastReceiver extends BroadcastReceiver {
public void test() {
// ! WIP
sink(getIntent().getStringExtra("data")); // $ hasValueFlow
}
}
}