Added more sinks

This commit is contained in:
Tony Torralba
2021-10-08 18:00:54 +02:00
parent 1e3e48132c
commit 9e3594fcf1
3 changed files with 35 additions and 3 deletions

View File

@@ -148,6 +148,20 @@ public class ImplicitPendingIntentsTest {
}
}
public static void testPendingIntentWrappedInAnotherPendingIntent(Context ctx,
PendingIntent other) throws PendingIntent.CanceledException {
{
Intent baseIntent = new Intent();
PendingIntent pi = PendingIntent.getActivity(ctx, 0, baseIntent, 0);
Intent fwdIntent = new Intent();
fwdIntent.putExtra("fwdIntent", pi);
other.send(ctx, 0, fwdIntent); // $hasTaintFlow
other.send(ctx, 0, fwdIntent, null, null); // $hasTaintFlow
other.send(ctx, 0, fwdIntent, null, null, null); // $hasTaintFlow
other.send(ctx, 0, fwdIntent, null, null, null, null); // $hasTaintFlow
}
}
public static void testPendingIntentInANotification(Context ctx)
throws PendingIntent.CanceledException {
@@ -194,6 +208,17 @@ public class ImplicitPendingIntentsTest {
}
static class TestActivity extends Activity {
@Override
public void onCreate(Bundle bundle) {
Intent baseIntent = new Intent();
PendingIntent pi = PendingIntent.getActivity(null, 0, baseIntent, 0);
Intent fwdIntent = new Intent();
fwdIntent.putExtra("fwdIntent", pi);
setResult(0, fwdIntent); // $hasTaintFlow
}
}
static class TestSliceProvider extends SliceProvider {
private PendingIntent mPendingIntent;