mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Suppress not-applicable lint warning
PiperOrigin-RevId: 688948857
(cherry picked from commit dfb7636138)
This commit is contained in:
parent
fbbe48cd47
commit
bc7c901969
2 changed files with 8 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ import static com.google.common.truth.Truth.assertThat;
|
|||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
|
@ -157,6 +158,9 @@ public class MediaControllerTest {
|
|||
}
|
||||
}
|
||||
|
||||
// Ignore warning about getCreatorPackage as this is just used as a test assertion to see if the
|
||||
// correct activity has been received by the controller.
|
||||
@SuppressLint("PendingIntentCreator")
|
||||
@Test
|
||||
public void getSessionActivity() throws Exception {
|
||||
RemoteMediaSession session = createRemoteMediaSession(TEST_GET_SESSION_ACTIVITY, null);
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ import static com.google.common.truth.Truth.assertThat;
|
|||
import static java.util.concurrent.TimeUnit.MILLISECONDS;
|
||||
import static java.util.concurrent.TimeUnit.SECONDS;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
|
@ -361,6 +362,9 @@ public class MediaControllerWithMediaSessionCompatTest {
|
|||
assertThat(controller.getConnectedToken().getSessionVersion()).isLessThan(1_000_000);
|
||||
}
|
||||
|
||||
// Ignore warning about getCreatorPackage as this is just used as a test assertion to see if the
|
||||
// correct activity has been received by the controller.
|
||||
@SuppressLint("PendingIntentCreator")
|
||||
@Test
|
||||
public void getSessionActivity() throws Exception {
|
||||
Intent sessionActivity = new Intent(context, MockActivity.class);
|
||||
|
|
|
|||
Loading…
Reference in a new issue