Home | History | Annotate | Download | only in cts

Lines Matching defs:ComponentName

19 import android.content.ComponentName;
25 * Test {@link ComponentName}.
29 // new the ComponentName instance
30 new ComponentName("com.android.app", "com.android.app.InstrumentationTestActivity");
34 new ComponentName((String) null, (String) null);
35 fail("ComponentName's constructor (String, Stirng) can not accept null input values.");
40 // new the ComponentName instance: test real Context , real class name string
41 new ComponentName(mContext, "ActivityTestCase");
45 new ComponentName((Context) null, "ActivityTestCase");
53 new ComponentName(mContext, (String) null);
59 // new the ComponentName instance: real Context, real class input, return shouldn't be null
60 new ComponentName(mContext, this.getClass());
62 // new the ComponentName instance: real Context, null class input, return shouldn't be null
64 new ComponentName(mContext, (Class<?>) null);
70 // new the ComponentName instance, Test null Parcel
72 new ComponentName((Parcel) null);
78 // new the ComponentName instance, Test null Parcel
81 final ComponentName componentName = getComponentName();
82 componentName.writeToParcel(parcel, 0);
84 new ComponentName(parcel);
98 ComponentName componentName = new ComponentName("com.android.view",
100 final String className = componentName.getClassName();
103 actual = componentName.getShortClassName();
109 ComponentName expected = getComponentName();
113 ComponentName actual = ComponentName.readFromParcel(parcel1);
118 expected = ComponentName.readFromParcel(parcel2);
128 final ComponentName componentName = getComponentName();
131 ComponentName actual = ComponentName.unflattenFromString(flattenString);
132 assertEquals(componentName, actual);
141 final ComponentName componentName = new ComponentName("com.android.view",
143 final String falttenString = componentName.flattenToString();
146 actual = componentName.flattenToShortString();
152 // new the ComponentName instances, both are the same.
153 final ComponentName componentName1 = getComponentName();
154 ComponentName componentName2 = new ComponentName(componentName1.getPackageName(),
158 // new the ComponentName instances, are not the same.
159 componentName2 = new ComponentName(componentName1.getPackageName(),
181 final ComponentName componentName = getComponentName();
183 final int hashCode1 = componentName.hashCode();
186 final ComponentName componentName2 = new ComponentName(componentName.getPackageName(),
187 componentName.getClassName());
194 final ComponentName componentName = getComponentName();
196 ComponentName.writeToParcel(componentName, parcel);
204 ComponentName.writeToParcel(null, parcel);
212 private ComponentName getComponentName() {
213 final ComponentName componentName = new ComponentName(mContext, this.getClass());
214 return componentName;