|
1 | 1 | package com.example.app;
|
2 | 2 |
|
3 | 3 | import android.app.Activity;
|
| 4 | +import android.content.ComponentName; |
4 | 5 | import android.content.Context;
|
5 | 6 | import android.content.Intent;
|
6 | 7 | import android.os.Bundle;
|
@@ -54,5 +55,86 @@ public void onCreate(Bundle savedInstanceState) {
|
54 | 55 | sendStickyOrderedBroadcast(intent, null, null, 0, null, null); // $ hasAndroidIntentRedirection
|
55 | 56 | sendStickyOrderedBroadcastAsUser(intent, null, null, null, 0, null, null); // $ hasAndroidIntentRedirection
|
56 | 57 | // @formatter:on
|
| 58 | + |
| 59 | + try { |
| 60 | + { |
| 61 | + Intent fwdIntent = new Intent(); |
| 62 | + fwdIntent.setClassName((Context) null, (String) intent.getExtra("className")); |
| 63 | + startActivity(fwdIntent); // $ hasAndroidIntentRedirection |
| 64 | + } |
| 65 | + { |
| 66 | + Intent fwdIntent = new Intent(); |
| 67 | + fwdIntent.setClassName((String) intent.getExtra("packageName"), null); |
| 68 | + startActivity(fwdIntent); // $ hasAndroidIntentRedirection |
| 69 | + } |
| 70 | + { |
| 71 | + Intent fwdIntent = new Intent(); |
| 72 | + fwdIntent.setClassName((String) intent.getExtra("packageName"), |
| 73 | + (String) intent.getExtra("className")); |
| 74 | + startActivity(fwdIntent); // $ hasAndroidIntentRedirection |
| 75 | + } |
| 76 | + { |
| 77 | + Intent fwdIntent = new Intent(); |
| 78 | + fwdIntent.setClass(null, Class.forName((String) intent.getExtra("className"))); |
| 79 | + // needs taint step for Class.forName |
| 80 | + startActivity(fwdIntent); // $ MISSING: $hasAndroidIntentRedirection |
| 81 | + } |
| 82 | + { |
| 83 | + Intent fwdIntent = new Intent(); |
| 84 | + fwdIntent.setPackage((String) intent.getExtra("packageName")); |
| 85 | + startActivity(fwdIntent); // $ hasAndroidIntentRedirection |
| 86 | + } |
| 87 | + { |
| 88 | + Intent fwdIntent = new Intent(); |
| 89 | + ComponentName component = |
| 90 | + new ComponentName((String) intent.getExtra("packageName"), null); |
| 91 | + fwdIntent.setComponent(component); |
| 92 | + startActivity(fwdIntent); // $ hasAndroidIntentRedirection |
| 93 | + } |
| 94 | + { |
| 95 | + Intent fwdIntent = new Intent(); |
| 96 | + ComponentName component = |
| 97 | + new ComponentName("", (String) intent.getExtra("className")); |
| 98 | + fwdIntent.setComponent(component); |
| 99 | + startActivity(fwdIntent); // $ hasAndroidIntentRedirection |
| 100 | + } |
| 101 | + { |
| 102 | + Intent fwdIntent = new Intent(); |
| 103 | + ComponentName component = |
| 104 | + new ComponentName((Context) null, (String) intent.getExtra("className")); |
| 105 | + fwdIntent.setComponent(component); |
| 106 | + startActivity(fwdIntent); // $ hasAndroidIntentRedirection |
| 107 | + } |
| 108 | + { |
| 109 | + Intent fwdIntent = new Intent(); |
| 110 | + ComponentName component = new ComponentName((Context) null, |
| 111 | + Class.forName((String) intent.getExtra("className"))); |
| 112 | + fwdIntent.setComponent(component); |
| 113 | + // needs taint step for Class.forName |
| 114 | + startActivity(fwdIntent); // $ MISSING: $hasAndroidIntentRedirection |
| 115 | + } |
| 116 | + { |
| 117 | + Intent fwdIntent = new Intent(); |
| 118 | + ComponentName component = |
| 119 | + ComponentName.createRelative("", (String) intent.getExtra("className")); |
| 120 | + fwdIntent.setComponent(component); |
| 121 | + startActivity(fwdIntent); // $ hasAndroidIntentRedirection |
| 122 | + } |
| 123 | + { |
| 124 | + Intent fwdIntent = new Intent(); |
| 125 | + ComponentName component = |
| 126 | + ComponentName.createRelative((String) intent.getExtra("packageName"), ""); |
| 127 | + fwdIntent.setComponent(component); |
| 128 | + startActivity(fwdIntent); // $ hasAndroidIntentRedirection |
| 129 | + } |
| 130 | + { |
| 131 | + Intent fwdIntent = new Intent(); |
| 132 | + ComponentName component = ComponentName.createRelative((Context) null, |
| 133 | + (String) intent.getExtra("className")); |
| 134 | + fwdIntent.setComponent(component); |
| 135 | + startActivity(fwdIntent); // $ hasAndroidIntentRedirection |
| 136 | + } |
| 137 | + } catch (Exception e) { |
| 138 | + } |
57 | 139 | }
|
58 | 140 | }
|
0 commit comments