OSDN Git Service

AI 147162: Emphasize in the javadoc that the "pkg" parameters to
authorAndy Stadler <>
Tue, 21 Apr 2009 18:48:54 +0000 (11:48 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Tue, 21 Apr 2009 18:48:54 +0000 (11:48 -0700)
  InstrumentationTestCase and its descendants should be the
  package manager package name (not the java package name, and
  not the test package) of the package holding the Activity
  under test.
  Added similar notations to the ApiDemos call sites.
  JAVADOC ONLY - should be safe change for cupcake sdk.
  BUG=1783981

Automated import of CL 147162

core/java/android/test/InstrumentationTestCase.java
test-runner/android/test/ActivityInstrumentationTestCase.java
test-runner/android/test/ActivityInstrumentationTestCase2.java
test-runner/android/test/SingleLaunchActivityTestCase.java

index 82f2ef9..470ab0d 100644 (file)
@@ -62,6 +62,10 @@ public class InstrumentationTestCase extends TestCase {
      *  action = {@link Intent#ACTION_MAIN}
      *  extras = null, unless a custom bundle is provided here
      * All other fields are null or empty.
+     * 
+     * <p><b>NOTE:</b> The parameter <i>pkg</i> must refer to the package identifier of the
+     * package hosting the activity to be launched, which is specified in the AndroidManifest.xml
+     * file.  This is not necessarily the same as the java package name.
      *
      * @param pkg The package hosting the activity to be launched.
      * @param activityCls The activity class to launch.
@@ -82,6 +86,11 @@ public class InstrumentationTestCase extends TestCase {
 
     /**
      * Utility method for launching an activity with a specific Intent.
+     * 
+     * <p><b>NOTE:</b> The parameter <i>pkg</i> must refer to the package identifier of the
+     * package hosting the activity to be launched, which is specified in the AndroidManifest.xml
+     * file.  This is not necessarily the same as the java package name.
+     *
      * @param pkg The package hosting the activity to be launched.
      * @param activityCls The activity class to launch.
      * @param intent The intent to launch with
index e5a9991..f6b31ad 100644 (file)
@@ -40,7 +40,11 @@ public abstract class ActivityInstrumentationTestCase<T extends Activity>
     boolean mInitialTouchMode = false;
 
     /**
-     * @param pkg The package of the instrumentation.
+     * <b>NOTE:</b> The parameter <i>pkg</i> must refer to the package identifier of the
+     * package hosting the activity to be launched, which is specified in the AndroidManifest.xml
+     * file.  This is not necessarily the same as the java package name.
+     * 
+     * @param pkg The package hosting the activity to be launched.
      * @param activityClass The activity to test.
      */
     public ActivityInstrumentationTestCase(String pkg, Class<T> activityClass) {
@@ -48,7 +52,11 @@ public abstract class ActivityInstrumentationTestCase<T extends Activity>
     }
 
     /**
-     * @param pkg The package of the instrumentation.
+     * <b>NOTE:</b> The parameter <i>pkg</i> must refer to the package identifier of the
+     * package hosting the activity to be launched, which is specified in the AndroidManifest.xml
+     * file.  This is not necessarily the same as the java package name.
+     * 
+     * @param pkg The package hosting the activity to be launched.
      * @param activityClass The activity to test.
      * @param initialTouchMode true = in touch mode
      */
index 7a84eca..679f634 100644 (file)
@@ -46,7 +46,11 @@ public abstract class ActivityInstrumentationTestCase2<T extends Activity>
     Intent mActivityIntent = null;
 
     /**
-     * @param pkg The package of the instrumentation.
+     * <b>NOTE:</b> The parameter <i>pkg</i> must refer to the package identifier of the
+     * package hosting the activity to be launched, which is specified in the AndroidManifest.xml
+     * file.  This is not necessarily the same as the java package name.
+     * 
+     * @param pkg The package hosting the activity to be launched.
      * @param activityClass The activity to test.
      */
     public ActivityInstrumentationTestCase2(String pkg, Class<T> activityClass) {
index 8d43b73..b63b3ce 100644 (file)
@@ -37,7 +37,11 @@ public abstract class SingleLaunchActivityTestCase<T extends Activity>
     private static boolean sActivityLaunchedFlag = false;
 
     /**
-     * @param pkg The package of the instrumentation.
+     * <b>NOTE:</b> The parameter <i>pkg</i> must refer to the package identifier of the
+     * package hosting the activity to be launched, which is specified in the AndroidManifest.xml
+     * file.  This is not necessarily the same as the java package name.
+     *
+     * @param pkg The package hosting the activity to be launched.
      * @param activityClass The activity to test.
      */
     public SingleLaunchActivityTestCase(String pkg, Class<T> activityClass) {