From 599f912e4e3611ca5d537b6780c026bcf44e8395 Mon Sep 17 00:00:00 2001 From: Robert Carr Date: Wed, 5 May 2021 13:22:57 -0700 Subject: AttachedSurfaceControl: Respond to API feedback. "Root" is eliminated from the interface name as it is a property of the object and not the interface, but remains highlighted in the getters to express the relationship between the called and returned object. Bug: 185365821 Test: Existing tests pass Change-Id: I163fc23f2c37c984ef3ffeb7514c4d8c1c1a3f90 --- core/java/android/view/ViewRoot.java | 53 ------------------------------------ 1 file changed, 53 deletions(-) delete mode 100644 core/java/android/view/ViewRoot.java (limited to 'core/java/android/view/ViewRoot.java') diff --git a/core/java/android/view/ViewRoot.java b/core/java/android/view/ViewRoot.java deleted file mode 100644 index 3c755981a440..000000000000 --- a/core/java/android/view/ViewRoot.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (C) 2021 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package android.view; - -import android.annotation.NonNull; -import android.annotation.Nullable; -import android.annotation.UiThread; - -/** - * Provides an interface to the root-Surface of a View Hierarchy or Window. This - * is used in combination with the {@link android.view.SurfaceControl} API to enable - * attaching app created SurfaceControl to the ViewRoot's surface hierarchy, and enable - * SurfaceTransactions to be performed in sync with the ViewRoot drawing. This object - * is obtained from {@link android.view.View#getViewRoot} and - * {@link android.view.Window#getViewRoot}. It must be used from the UI thread of - * the object it was obtained from. - */ -@UiThread -public interface ViewRoot { - /** - * Create a transaction which will reparent {@param child} to the ViewRoot. See - * {@link SurfaceControl.Transaction#reparent}. This transacton must be applied - * or merged in to another transaction by the caller, otherwise it will have - * no effect. - * - * @param child The SurfaceControl to reparent. - * @return A new transaction which performs the reparent operation when applied. - */ - @Nullable SurfaceControl.Transaction buildReparentTransaction(@NonNull SurfaceControl child); - - /** - * Consume the passed in transaction, and request the ViewRoot to apply it with the - * next draw. This transaction will be merged with the buffer transaction from the ViewRoot - * and they will show up on-screen atomically synced. - * - * This will not cause a draw to be scheduled, and if there are no other changes - * to the View hierarchy you may need to call {@link android.view.View#invalidate} - */ - boolean applyTransactionOnDraw(@NonNull SurfaceControl.Transaction t); -} -- cgit v1.2.3