From fc707349cc2b16c160b5a392d585d908c9b5405b Mon Sep 17 00:00:00 2001 From: Andy Stadler <> Date: Tue, 21 Apr 2009 11:48:53 -0700 Subject: [PATCH] AI 147162: Emphasize in the javadoc that the "pkg" parameters to 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 --- .../ApiDemos/tests/src/com/example/android/apis/ApiDemosTest.java | 6 ++++++ .../src/com/example/android/apis/view/Focus2ActivityTest.java | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/samples/ApiDemos/tests/src/com/example/android/apis/ApiDemosTest.java b/samples/ApiDemos/tests/src/com/example/android/apis/ApiDemosTest.java index 0103da87..bc174eaa 100644 --- a/samples/ApiDemos/tests/src/com/example/android/apis/ApiDemosTest.java +++ b/samples/ApiDemos/tests/src/com/example/android/apis/ApiDemosTest.java @@ -24,6 +24,12 @@ import android.test.ActivityInstrumentationTestCase; */ public class ApiDemosTest extends ActivityInstrumentationTestCase { + /** + * The first constructor parameter 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 of the class - in fact, in + * some cases it may not match at all. + */ public ApiDemosTest() { super("com.example.android.apis", ApiDemos.class); } diff --git a/samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2ActivityTest.java b/samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2ActivityTest.java index 91f712ff..5938209c 100644 --- a/samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2ActivityTest.java +++ b/samples/ApiDemos/tests/src/com/example/android/apis/view/Focus2ActivityTest.java @@ -48,7 +48,12 @@ public class Focus2ActivityTest extends ActivityInstrumentationTestCase private Button mCenterButton; private Button mRightButton; - + /** + * The first constructor parameter 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 of the class - in fact, in + * some cases it may not match at all. + */ public Focus2ActivityTest() { super("com.example.android.apis", Focus2.class); } -- 2.11.0