Skip to content

Commit 06e459e

Browse files
icbakermarcbaechinger
authored andcommitted
Remove overrides for nonTransitiveRClass and nonFinalResIds
And fix the violations of `nonTransitiveRClass` Tested with `./gradlew clean lint testReleaseUnitTest` Follow-up to Issue: #2883 PiperOrigin-RevId: 832250353 (cherry picked from commit b770edf)
1 parent 081699e commit 06e459e

File tree

8 files changed

+16
-11
lines changed

8 files changed

+16
-11
lines changed

demos/gl/src/main/java/androidx/media3/demo/gl/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
9393
new VideoProcessingGLSurfaceView(
9494
context, requestSecureSurface, new BitmapOverlayVideoProcessor(context));
9595
checkNotNull(playerView);
96-
FrameLayout contentFrame = playerView.findViewById(R.id.exo_content_frame);
96+
FrameLayout contentFrame = playerView.findViewById(androidx.media3.ui.R.id.exo_content_frame);
9797
contentFrame.addView(videoProcessingGLSurfaceView);
9898
this.videoProcessingGLSurfaceView = videoProcessingGLSurfaceView;
9999
}

demos/main/src/main/java/androidx/media3/demo/main/DemoDownloadService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public DemoDownloadService() {
4444
FOREGROUND_NOTIFICATION_ID,
4545
DEFAULT_FOREGROUND_NOTIFICATION_UPDATE_INTERVAL,
4646
DOWNLOAD_NOTIFICATION_CHANNEL_ID,
47-
R.string.exo_download_notification_channel_name,
47+
androidx.media3.exoplayer.R.string.exo_download_notification_channel_name,
4848
/* channelDescriptionResourceId= */ 0);
4949
}
5050

demos/main/src/main/java/androidx/media3/demo/main/DownloadTracker.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ private void onDownloadPrepared(DownloadHelper helper) {
326326
}
327327
trackSelectionDialog =
328328
TrackSelectionDialog.createForTracksAndParameters(
329-
/* titleId= */ R.string.exo_download_description,
329+
/* titleId= */ androidx.media3.exoplayer.R.string.exo_download_description,
330330
tracks,
331331
DownloadHelper.DEFAULT_TRACK_SELECTOR_PARAMETERS,
332332
/* allowAdaptiveSelections= */ false,

demos/main/src/main/java/androidx/media3/demo/main/TrackSelectionDialog.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,11 @@ public View onCreateView(
341341
@Nullable Bundle savedInstanceState) {
342342
View rootView =
343343
inflater.inflate(
344-
R.layout.exo_track_selection_dialog, container, /* attachToRoot= */ false);
345-
TrackSelectionView trackSelectionView = rootView.findViewById(R.id.exo_track_selection_view);
344+
androidx.media3.ui.R.layout.exo_track_selection_dialog,
345+
container,
346+
/* attachToRoot= */ false);
347+
TrackSelectionView trackSelectionView =
348+
rootView.findViewById(androidx.media3.ui.R.id.exo_track_selection_view);
346349
trackSelectionView.setShowDisableOption(true);
347350
trackSelectionView.setAllowMultipleOverrides(allowMultipleOverrides);
348351
trackSelectionView.setAllowAdaptiveSelections(allowAdaptiveSelections);

demos/session_service/src/main/java/androidx/media3/demo/session/DemoMediaLibrarySessionCallback.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,15 @@ open class DemoMediaLibrarySessionCallback(val service: DemoPlaybackService) :
5454
private val commandButtons: List<CommandButton> =
5555
listOf(
5656
CommandButton.Builder(CommandButton.ICON_SHUFFLE_OFF)
57-
.setDisplayName(service.getString(R.string.exo_controls_shuffle_on_description))
57+
.setDisplayName(
58+
service.getString(androidx.media3.ui.R.string.exo_controls_shuffle_on_description)
59+
)
5860
.setSessionCommand(SessionCommand(CUSTOM_COMMAND_TOGGLE_SHUFFLE_MODE_ON, Bundle.EMPTY))
5961
.build(),
6062
CommandButton.Builder(CommandButton.ICON_SHUFFLE_ON)
61-
.setDisplayName(service.getString(R.string.exo_controls_shuffle_off_description))
63+
.setDisplayName(
64+
service.getString(androidx.media3.ui.R.string.exo_controls_shuffle_off_description)
65+
)
6266
.setSessionCommand(SessionCommand(CUSTOM_COMMAND_TOGGLE_SHUFFLE_MODE_OFF, Bundle.EMPTY))
6367
.build(),
6468
)

demos/session_service/src/main/java/androidx/media3/demo/session/DemoPlaybackService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ open class DemoPlaybackService : MediaLibraryService() {
224224
ensureNotificationChannel(notificationManagerCompat)
225225
val builder =
226226
NotificationCompat.Builder(this@DemoPlaybackService, CHANNEL_ID)
227-
.setSmallIcon(R.drawable.media3_notification_small_icon)
227+
.setSmallIcon(androidx.media3.session.R.drawable.media3_notification_small_icon)
228228
.setContentTitle(getString(R.string.notification_content_title))
229229
.setStyle(
230230
NotificationCompat.BigTextStyle().bigText(getString(R.string.notification_content_text))

demos/transformer/src/main/java/androidx/media3/demo/transformer/TransformerActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ public int onStartCommand(Intent intent, int flags, int startId) {
971971
Notification notification =
972972
new NotificationCompat.Builder(context, CHANNEL_ID)
973973
.setOngoing(true)
974-
.setSmallIcon(R.drawable.exo_icon_play)
974+
.setSmallIcon(androidx.media3.ui.R.drawable.exo_icon_play)
975975
.build();
976976
if (SDK_INT >= 26) {
977977
NotificationChannel channel =

gradle.properties

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,3 @@
22
android.useAndroidX=true
33
buildDir=buildout
44
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m
5-
android.nonTransitiveRClass=false
6-
android.nonFinalResIds=false

0 commit comments

Comments
 (0)