Loading tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/NotificationTest.java +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import static android.app.NotificationManager.IMPORTANCE_HIGH; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assume.assumeFalse; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; Loading @@ -28,6 +30,7 @@ import android.app.RemoteInput; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.graphics.drawable.Icon; import android.platform.test.annotations.RootPermissionTest; import android.platform.test.rule.UnlockScreenRule; Loading Loading @@ -89,6 +92,9 @@ public final class NotificationTest { mContext = InstrumentationRegistry.getInstrumentation().getContext(); mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); mNotificationManager = mContext.getSystemService(NotificationManager.class); PackageManager pm = mContext.getPackageManager(); // Do not run on Automotive. assumeFalse(pm.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)); } @After Loading Loading
tests/InputMethodStressTest/src/com/android/inputmethod/stresstest/NotificationTest.java +6 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,8 @@ import static android.app.NotificationManager.IMPORTANCE_HIGH; import static com.google.common.truth.Truth.assertThat; import static org.junit.Assume.assumeFalse; import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; Loading @@ -28,6 +30,7 @@ import android.app.RemoteInput; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.graphics.drawable.Icon; import android.platform.test.annotations.RootPermissionTest; import android.platform.test.rule.UnlockScreenRule; Loading Loading @@ -89,6 +92,9 @@ public final class NotificationTest { mContext = InstrumentationRegistry.getInstrumentation().getContext(); mUiDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); mNotificationManager = mContext.getSystemService(NotificationManager.class); PackageManager pm = mContext.getPackageManager(); // Do not run on Automotive. assumeFalse(pm.hasSystemFeature(PackageManager.FEATURE_AUTOMOTIVE)); } @After Loading