mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Suppress not-applicable lint warning
PiperOrigin-RevId: 688948857 (cherry picked from commit dfb7636138039180b9849a8939ab8ec518999d03)
This commit is contained in:
parent
fbbe48cd47
commit
bc7c901969
@ -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…
x
Reference in New Issue
Block a user