1 /* 2 * Copyright 2017 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.media.update; 18 19 import android.media.SessionToken2; 20 import android.media.session.MediaController; 21 import android.util.AttributeSet; 22 import android.widget.MediaControlView2; 23 24 /** 25 * Interface for connecting the public API to an updatable implementation. 26 * 27 * Each instance object is connected to one corresponding updatable object which implements the 28 * runtime behavior of that class. There should a corresponding provider method for all public 29 * methods. 30 * 31 * All methods behave as per their namesake in the public API. 32 * 33 * @see android.widget.MediaControlView2 34 * 35 * @hide 36 */ 37 // TODO: @SystemApi 38 public interface MediaControlView2Provider extends ViewGroupProvider { initialize(AttributeSet attrs, int defStyleAttr, int defStyleRes)39 void initialize(AttributeSet attrs, int defStyleAttr, int defStyleRes); 40 setMediaSessionToken_impl(SessionToken2 token)41 void setMediaSessionToken_impl(SessionToken2 token); setOnFullScreenListener_impl(MediaControlView2.OnFullScreenListener l)42 void setOnFullScreenListener_impl(MediaControlView2.OnFullScreenListener l); 43 /** 44 * @hide TODO: remove 45 */ setController_impl(MediaController controller)46 void setController_impl(MediaController controller); 47 /** 48 * @hide 49 */ setButtonVisibility_impl(int button, int visibility)50 void setButtonVisibility_impl(int button, int visibility); requestPlayButtonFocus_impl()51 void requestPlayButtonFocus_impl(); 52 } 53