Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89a9fb58 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "VV2 and MCV2: Override onLayout of ViewGroup and remove MCV2.isShowing()"

parents e851d7c6 8589b7b3
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -170,13 +170,6 @@ public class MediaControlView2 extends ViewGroupHelper<MediaControlView2Provider
        mProvider.setController_impl(controller);
    }

    /**
     * Returns whether the control view is currently shown or hidden.
     */
    public boolean isShowing() {
        return mProvider.isShowing_impl();
    }

    /**
     * Changes the visibility state of an individual button. Default value is View.Visible.
     *
@@ -223,4 +216,9 @@ public class MediaControlView2 extends ViewGroupHelper<MediaControlView2Provider
    public long getTimeout() {
        return mProvider.getTimeout_impl();
    }

    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        mProvider.onLayout_impl(changed, l, t, r, b);
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -489,4 +489,9 @@ public class VideoView2 extends ViewGroupHelper<VideoView2Provider> {
         */
        void onCustomAction(String action, Bundle extras);
    }

    @Override
    protected void onLayout(boolean changed, int l, int t, int r, int b) {
        mProvider.onLayout_impl(changed, l, t, r, b);
    }
}
+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ public interface MediaControlView2Provider extends ViewGroupProvider {
    void initialize(AttributeSet attrs, int defStyleAttr, int defStyleRes);

    void setController_impl(MediaController controller);
    boolean isShowing_impl();
    void setButtonVisibility_impl(int button, int visibility);
    void requestPlayButtonFocus_impl();
    void setTimeout_impl(long timeout);
+4 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package android.media.update;

import android.annotation.SystemApi;
import android.media.AudioAttributes;
import android.media.MediaPlayerInterface;
import android.media.session.MediaController;
@@ -55,6 +56,9 @@ public interface VideoView2Provider extends ViewGroupProvider {
    void setSpeed_impl(float speed);
    void setAudioFocusRequest_impl(int focusGain);
    void setAudioAttributes_impl(AudioAttributes attributes);
    /**
     * @hide
     */
    void setRouteAttributes_impl(List<String> routeCategories, MediaPlayerInterface player);
    // TODO: remove setRouteAttributes_impl with MediaSession.Callback once MediaSession2 is ready.
    void setRouteAttributes_impl(List<String> routeCategories, MediaSession.Callback sessionPlayer);