1616import java .util .List ;
1717
1818import androidx .annotation .NonNull ;
19+ import androidx .annotation .Nullable ;
1920import androidx .test .platform .app .InstrumentationRegistry ;
2021import androidx .test .uiautomator .By ;
2122import androidx .test .uiautomator .Direction ;
3435import static org .hamcrest .core .IsNull .notNullValue ;
3536
3637/**
37- * Application Test Suite
38+ * Test- Suite
3839 *
3940 * @author Martin Zeitler
4041 */
@@ -52,10 +53,11 @@ public class TestSuite {
5253 UiDevice mDevice ;
5354
5455 /**
55- * uses package manager to find the package name of the device launcher.
56+ * Uses package manager to find the package name of the device launcher.
5657 * usually this package is "com.android.launcher" but can be different at times.
5758 * this is a generic solution which works on all platforms.`
5859 **/
60+ @ Nullable
5961 private String getLauncherPackageName () {
6062
6163 /* create a launcher Intent */
@@ -147,6 +149,7 @@ void grantPermission() {
147149 }
148150 }
149151
152+ /** @noinspection SameParameterValue */
150153 void flingUp (UiObject2 view , int speed , int pause ) {
151154 assertThat (view , not (equalTo (null )));
152155 try {
@@ -161,7 +164,7 @@ void sleep(int ms){
161164 try {
162165 Thread .sleep (ms );
163166 } catch (InterruptedException e ) {
164- e . printStackTrace ( );
167+ Log . e ( "" , e . getMessage (), e );
165168 }
166169 }
167- }
170+ }
0 commit comments