File tree Expand file tree Collapse file tree
app/src/main/java/org/schabi/newpipe/player/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,8 +146,12 @@ public void setupAfterIntent() {
146146 }
147147 }
148148
149+ // `protected` matches the visibility declared in VideoPlayerUi.kt. The Kotlin parent used to
150+ // declare this as `internal`, which the Kotlin compiler mangles to a JVM-private name that
151+ // Java cannot see, so this class could not compile. Changing to `protected` gives the method
152+ // a stable, unmangled JVM name accessible from Java subclasses.
149153 @ Override
150- BasePlayerGestureListener buildGestureListener () {
154+ protected BasePlayerGestureListener buildGestureListener () {
151155 return new MainPlayerGestureListener (this );
152156 }
153157
Original file line number Diff line number Diff line change @@ -101,8 +101,11 @@ public void setupAfterIntent() {
101101 initPopupCloseOverlay ();
102102 }
103103
104+ // Same reason as MainPlayerUi: `protected` is required so this Java class can override the
105+ // method declared in the Kotlin parent (VideoPlayerUi). Using `internal` in Kotlin produces
106+ // a mangled JVM name that Java subclasses cannot reference.
104107 @ Override
105- BasePlayerGestureListener buildGestureListener () {
108+ protected BasePlayerGestureListener buildGestureListener () {
106109 return new PopupPlayerGestureListener (this );
107110 }
108111
You can’t perform that action at this time.
0 commit comments