1 /* 2 * Copyright 2018 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.annotation.SystemApi; 20 import android.util.AttributeSet; 21 import android.view.MotionEvent; 22 import android.view.View; 23 import android.view.ViewGroup.LayoutParams; 24 25 /** 26 * Interface for connecting the public API to an updatable implementation. 27 * 28 * Each instance object is connected to one corresponding updatable object which implements the 29 * runtime behavior of that class. There should a corresponding provider method for all public 30 * methods. 31 * 32 * All methods behave as per their namesake in the public API. 33 * 34 * @see android.view.View 35 * 36 * @hide 37 */ 38 // TODO @SystemApi 39 public interface ViewGroupProvider { 40 // View methods onAttachedToWindow_impl()41 void onAttachedToWindow_impl(); onDetachedFromWindow_impl()42 void onDetachedFromWindow_impl(); getAccessibilityClassName_impl()43 CharSequence getAccessibilityClassName_impl(); onTouchEvent_impl(MotionEvent ev)44 boolean onTouchEvent_impl(MotionEvent ev); onTrackballEvent_impl(MotionEvent ev)45 boolean onTrackballEvent_impl(MotionEvent ev); onFinishInflate_impl()46 void onFinishInflate_impl(); setEnabled_impl(boolean enabled)47 void setEnabled_impl(boolean enabled); onVisibilityAggregated_impl(boolean isVisible)48 void onVisibilityAggregated_impl(boolean isVisible); onLayout_impl(boolean changed, int left, int top, int right, int bottom)49 void onLayout_impl(boolean changed, int left, int top, int right, int bottom); onMeasure_impl(int widthMeasureSpec, int heightMeasureSpec)50 void onMeasure_impl(int widthMeasureSpec, int heightMeasureSpec); getSuggestedMinimumWidth_impl()51 int getSuggestedMinimumWidth_impl(); getSuggestedMinimumHeight_impl()52 int getSuggestedMinimumHeight_impl(); setMeasuredDimension_impl(int measuredWidth, int measuredHeight)53 void setMeasuredDimension_impl(int measuredWidth, int measuredHeight); dispatchTouchEvent_impl(MotionEvent ev)54 boolean dispatchTouchEvent_impl(MotionEvent ev); 55 56 // ViewGroup methods checkLayoutParams_impl(LayoutParams p)57 boolean checkLayoutParams_impl(LayoutParams p); generateDefaultLayoutParams_impl()58 LayoutParams generateDefaultLayoutParams_impl(); generateLayoutParams_impl(AttributeSet attrs)59 LayoutParams generateLayoutParams_impl(AttributeSet attrs); generateLayoutParams_impl(LayoutParams lp)60 LayoutParams generateLayoutParams_impl(LayoutParams lp); shouldDelayChildPressedState_impl()61 boolean shouldDelayChildPressedState_impl(); measureChildWithMargins_impl(View child, int parentWidthMeasureSpec, int widthUsed, int parentHeightMeasureSpec, int heightUsed)62 void measureChildWithMargins_impl(View child, int parentWidthMeasureSpec, int widthUsed, 63 int parentHeightMeasureSpec, int heightUsed); 64 65 // ViewManager methods 66 // ViewParent methods 67 } 68