1 /*
2  * Copyright 2020 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.view;
18 
19 import android.annotation.SuppressLint;
20 import android.graphics.Matrix;
21 import android.graphics.Outline;
22 import android.graphics.Paint;
23 import android.graphics.Rect;
24 
25 import androidx.annotation.NonNull;
26 import androidx.annotation.Nullable;
27 
28 /**
29  * Stubs for RenderNode on M-P devices.
30  */
31 public class RenderNode {
32     @SuppressWarnings("unused")
RenderNode(String name, View owningView)33     private RenderNode(String name, View owningView) {
34     }
35 
36     /** stub */
destroy()37     public void destroy() {
38     }
39 
40     /** stub */
create(@ullable String name, @Nullable View owningView)41     public static @NonNull RenderNode create(@Nullable String name, @Nullable View owningView) {
42         throw new UnsupportedOperationException();
43     }
44 
45     /** stub */
start(int width, int height)46     public @NonNull DisplayListCanvas start(int width, int height) {
47         throw new UnsupportedOperationException();
48     }
49 
50     /** stub */
end(@onNull DisplayListCanvas canvas)51     public void end(@NonNull DisplayListCanvas canvas) {
52     }
53 
54     /** stub */
discardDisplayList()55     public void discardDisplayList() {
56     }
57 
58     /**
59      * Same stub as discardDisplayList however it was named destroyDisplayListData in Android M
60      * and earlier
61      */
destroyDisplayListData()62     public void destroyDisplayListData() {
63     }
64 
65     /** stub */
isValid()66     public boolean isValid() {
67         throw new UnsupportedOperationException();
68     }
69 
70     /** stub */
hasIdentityMatrix()71     public boolean hasIdentityMatrix() {
72         throw new UnsupportedOperationException();
73     }
74 
75     /** stub */
getMatrix(@onNull Matrix outMatrix)76     public void getMatrix(@NonNull Matrix outMatrix) {
77     }
78 
79     /** stub */
getInverseMatrix(@onNull Matrix outMatrix)80     public void getInverseMatrix(@NonNull Matrix outMatrix) {
81     }
82 
83     /** stub */
setLayerType(int layerType)84     public boolean setLayerType(int layerType) {
85         throw new UnsupportedOperationException();
86     }
87 
88     /** stub */
setLayerPaint(@ullable Paint paint)89     public boolean setLayerPaint(@Nullable Paint paint) {
90         throw new UnsupportedOperationException();
91     }
92 
93     /** stub */
setClipBounds(@ullable Rect rect)94     public boolean setClipBounds(@Nullable Rect rect) {
95         throw new UnsupportedOperationException();
96     }
97 
98     /** stub */
setClipToBounds(boolean clipToBounds)99     public boolean setClipToBounds(boolean clipToBounds) {
100         throw new UnsupportedOperationException();
101     }
102 
103     /** stub */
setProjectBackwards(boolean shouldProject)104     public boolean setProjectBackwards(boolean shouldProject) {
105         throw new UnsupportedOperationException();
106     }
107 
108     /** stub */
setProjectionReceiver(boolean shouldReceive)109     public boolean setProjectionReceiver(boolean shouldReceive) {
110         throw new UnsupportedOperationException();
111     }
112 
113     /** stub */
setOutline(@ullable Outline outline)114     public boolean setOutline(@Nullable Outline outline) {
115         throw new UnsupportedOperationException();
116     }
117 
118     /** stub */
hasShadow()119     public boolean hasShadow() {
120         throw new UnsupportedOperationException();
121     }
122 
123     /** stub */
setClipToOutline(boolean clipToOutline)124     public boolean setClipToOutline(boolean clipToOutline) {
125         throw new UnsupportedOperationException();
126     }
127 
128     /** stub */
getClipToOutline()129     public boolean getClipToOutline() {
130         throw new UnsupportedOperationException();
131     }
132 
133     /** stub */
setRevealClip(boolean shouldClip, float x, float y, float radius)134     public boolean setRevealClip(boolean shouldClip,
135             float x, float y, float radius) {
136         throw new UnsupportedOperationException();
137     }
138 
139     /** stub */
setStaticMatrix(@onNull Matrix matrix)140     public boolean setStaticMatrix(@NonNull Matrix matrix) {
141         throw new UnsupportedOperationException();
142     }
143 
144     /** stub */
setAnimationMatrix(@onNull Matrix matrix)145     public boolean setAnimationMatrix(@NonNull Matrix matrix) {
146         throw new UnsupportedOperationException();
147     }
148 
149     /** stub */
setAlpha(float alpha)150     public boolean setAlpha(float alpha) {
151         throw new UnsupportedOperationException();
152     }
153 
154     /** stub */
getAlpha()155     public float getAlpha() {
156         throw new UnsupportedOperationException();
157     }
158 
159     /** stub */
setHasOverlappingRendering(boolean hasOverlappingRendering)160     public boolean setHasOverlappingRendering(boolean hasOverlappingRendering) {
161         throw new UnsupportedOperationException();
162     }
163 
164     /** stub */
165     @SuppressLint("KotlinPropertyAccess")
hasOverlappingRendering()166     public boolean hasOverlappingRendering() {
167         throw new UnsupportedOperationException();
168     }
169 
170     /** stub */
setElevation(float lift)171     public boolean setElevation(float lift) {
172         throw new UnsupportedOperationException();
173     }
174 
175     /** stub */
getElevation()176     public float getElevation() {
177         throw new UnsupportedOperationException();
178     }
179 
180     /** stub */
setAmbientShadowColor(int color)181     public boolean setAmbientShadowColor(int color) {
182         throw new UnsupportedOperationException();
183     }
184 
185     /** stub */
getAmbientShadowColor()186     public int getAmbientShadowColor() {
187         throw new UnsupportedOperationException();
188     }
189 
190     /** stub */
setSpotShadowColor(int color)191     public boolean setSpotShadowColor(int color) {
192         throw new UnsupportedOperationException();
193     }
194 
195     /** stub */
getSpotShadowColor()196     public int getSpotShadowColor() {
197         throw new UnsupportedOperationException();
198     }
199 
200     /** stub */
setTranslationX(float translationX)201     public boolean setTranslationX(float translationX) {
202         throw new UnsupportedOperationException();
203     }
204 
205     /** stub */
getTranslationX()206     public float getTranslationX() {
207         throw new UnsupportedOperationException();
208     }
209 
210     /** stub */
setTranslationY(float translationY)211     public boolean setTranslationY(float translationY) {
212         throw new UnsupportedOperationException();
213     }
214 
215     /** stub */
getTranslationY()216     public float getTranslationY() {
217         throw new UnsupportedOperationException();
218     }
219 
220     /** stub */
setTranslationZ(float translationZ)221     public boolean setTranslationZ(float translationZ) {
222         throw new UnsupportedOperationException();
223     }
224 
225     /** stub */
getTranslationZ()226     public float getTranslationZ() {
227         throw new UnsupportedOperationException();
228     }
229 
230     /** stub */
setRotation(float rotation)231     public boolean setRotation(float rotation) {
232         throw new UnsupportedOperationException();
233     }
234 
235     /** stub */
getRotation()236     public float getRotation() {
237         throw new UnsupportedOperationException();
238     }
239 
240     /** stub */
setRotationX(float rotationX)241     public boolean setRotationX(float rotationX) {
242         throw new UnsupportedOperationException();
243     }
244 
245     /** stub */
getRotationX()246     public float getRotationX() {
247         throw new UnsupportedOperationException();
248     }
249 
250     /** stub */
setRotationY(float rotationY)251     public boolean setRotationY(float rotationY) {
252         throw new UnsupportedOperationException();
253     }
254 
255     /** stub */
getRotationY()256     public float getRotationY() {
257         throw new UnsupportedOperationException();
258     }
259 
260     /** stub */
setScaleX(float scaleX)261     public boolean setScaleX(float scaleX) {
262         throw new UnsupportedOperationException();
263     }
264 
265     /** stub */
getScaleX()266     public float getScaleX() {
267         throw new UnsupportedOperationException();
268     }
269 
270     /** stub */
setScaleY(float scaleY)271     public boolean setScaleY(float scaleY) {
272         throw new UnsupportedOperationException();
273     }
274 
275     /** stub */
getScaleY()276     public float getScaleY() {
277         throw new UnsupportedOperationException();
278     }
279 
280     /** stub */
setPivotX(float pivotX)281     public boolean setPivotX(float pivotX) {
282         throw new UnsupportedOperationException();
283     }
284 
285     /** stub */
getPivotX()286     public float getPivotX() {
287         throw new UnsupportedOperationException();
288     }
289 
290     /** stub */
setPivotY(float pivotY)291     public boolean setPivotY(float pivotY) {
292         throw new UnsupportedOperationException();
293     }
294 
295     /** stub */
getPivotY()296     public float getPivotY() {
297         throw new UnsupportedOperationException();
298     }
299 
300     /** stub */
isPivotExplicitlySet()301     public boolean isPivotExplicitlySet() {
302         throw new UnsupportedOperationException();
303     }
304 
305     /** stub */
setCameraDistance(float distance)306     public boolean setCameraDistance(float distance) {
307         throw new UnsupportedOperationException();
308     }
309 
310     /** stub */
getCameraDistance()311     public float getCameraDistance() {
312         throw new UnsupportedOperationException();
313     }
314 
315     /** stub */
setLeft(int left)316     public boolean setLeft(int left) {
317         throw new UnsupportedOperationException();
318     }
319 
320     /** stub */
setTop(int top)321     public boolean setTop(int top) {
322         throw new UnsupportedOperationException();
323     }
324 
325     /** stub */
setRight(int right)326     public boolean setRight(int right) {
327         throw new UnsupportedOperationException();
328     }
329 
330     /** stub */
setBottom(int bottom)331     public boolean setBottom(int bottom) {
332         throw new UnsupportedOperationException();
333     }
334 
335     /** stub */
setLeftTopRightBottom(int left, int top, int right, int bottom)336     public boolean setLeftTopRightBottom(int left, int top, int right, int bottom) {
337         throw new UnsupportedOperationException();
338     }
339 
340     /** stub */
offsetLeftAndRight(int offset)341     public boolean offsetLeftAndRight(int offset) {
342         throw new UnsupportedOperationException();
343     }
344 
345     /** stub */
offsetTopAndBottom(int offset)346     public boolean offsetTopAndBottom(int offset) {
347         throw new UnsupportedOperationException();
348     }
349 
350     /** stub */
output()351     public void output() {
352     }
353 
354     /** stub */
isAttached()355     public boolean isAttached() {
356         throw new UnsupportedOperationException();
357     }
358 }
359