From 2c70383d38a50482df57f6558b55b2057cbe56c7 Mon Sep 17 00:00:00 2001 From: rohks Date: Wed, 24 Aug 2022 16:40:39 +0000 Subject: [PATCH] Fix missing id error PiperOrigin-RevId: 469750922 --- .../com/google/android/exoplayer2/gldemo/MainActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java b/demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java index c1fc42becf..42c6cd9728 100644 --- a/demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java +++ b/demos/gl/src/main/java/com/google/android/exoplayer2/gldemo/MainActivity.java @@ -15,6 +15,8 @@ */ package com.google.android.exoplayer2.gldemo; +import static com.google.android.exoplayer2.util.Assertions.checkNotNull; + import android.app.Activity; import android.content.Context; import android.content.Intent; @@ -83,7 +85,8 @@ public final class MainActivity extends Activity { VideoProcessingGLSurfaceView videoProcessingGLSurfaceView = new VideoProcessingGLSurfaceView( context, requestSecureSurface, new BitmapOverlayVideoProcessor(context)); - FrameLayout contentFrame = findViewById(R.id.exo_content_frame); + checkNotNull(playerView); + FrameLayout contentFrame = playerView.findViewById(R.id.exo_content_frame); contentFrame.addView(videoProcessingGLSurfaceView); this.videoProcessingGLSurfaceView = videoProcessingGLSurfaceView; }