Skip to content

Commit bc7c901

Browse files
toniheiivanbuper
authored andcommitted
Suppress not-applicable lint warning
PiperOrigin-RevId: 688948857 (cherry picked from commit dfb7636)
1 parent fbbe48c commit bc7c901

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

libraries/test_session_current/src/androidTest/java/androidx/media3/session/MediaControllerTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import static com.google.common.truth.Truth.assertWithMessage;
3434
import static java.util.concurrent.TimeUnit.MILLISECONDS;
3535

36+
import android.annotation.SuppressLint;
3637
import android.app.PendingIntent;
3738
import android.content.Context;
3839
import android.os.Bundle;
@@ -157,6 +158,9 @@ public void builder() throws Exception {
157158
}
158159
}
159160

161+
// Ignore warning about getCreatorPackage as this is just used as a test assertion to see if the
162+
// correct activity has been received by the controller.
163+
@SuppressLint("PendingIntentCreator")
160164
@Test
161165
public void getSessionActivity() throws Exception {
162166
RemoteMediaSession session = createRemoteMediaSession(TEST_GET_SESSION_ACTIVITY, null);

libraries/test_session_current/src/androidTest/java/androidx/media3/session/MediaControllerWithMediaSessionCompatTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import static java.util.concurrent.TimeUnit.MILLISECONDS;
4444
import static java.util.concurrent.TimeUnit.SECONDS;
4545

46+
import android.annotation.SuppressLint;
4647
import android.app.PendingIntent;
4748
import android.content.Context;
4849
import android.content.Intent;
@@ -361,6 +362,9 @@ public void getSessionVersion() throws Exception {
361362
assertThat(controller.getConnectedToken().getSessionVersion()).isLessThan(1_000_000);
362363
}
363364

365+
// Ignore warning about getCreatorPackage as this is just used as a test assertion to see if the
366+
// correct activity has been received by the controller.
367+
@SuppressLint("PendingIntentCreator")
364368
@Test
365369
public void getSessionActivity() throws Exception {
366370
Intent sessionActivity = new Intent(context, MockActivity.class);

0 commit comments

Comments
 (0)