Debian Codegraph @

core/java/android/window/IRemoteTransition.aidl

raw
1 /*
2 * Copyright (C) 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.window;
18
19 import android.view.SurfaceControl;
20 import android.window.IRemoteTransitionFinishedCallback;
21 import android.window.TransitionInfo;
22
23 /**
24 * Interface allowing remote processes to play transition animations.
25 * The usage flow is as follows:
26 * <p><ol>
27 * <li>The remote tags a lifecycle event with an IRemoteTransition (via a parameter in
28 * ActivityOptions#makeRemoteAnimation) or a transition matches a filter registered via
29 * Transitions#registerRemote.
30 * <li>Shell then associates the transition for the event with the IRemoteTransition
31 * <li>Shell receives onTransitionReady and delegates the animation to the IRemoteTransition
32 * via {@link #startAnimation}.
33 * <li>Once the IRemoteTransition is done animating, it will call the finishCallback.
34 * <li>Shell/Core finish-up the transition.
35 * </ul>
36 *
37 * {@hide}
38 */
39 oneway interface IRemoteTransition {
40 /**
41 * Starts a transition animation. Once complete, the implementation should call
42 * `finishCallback`.
43 *
44 * @param token An identifier for the transition that should be animated.
45 */
46 void startAnimation(in IBinder token, in TransitionInfo info, in SurfaceControl.Transaction t,
47 in IRemoteTransitionFinishedCallback finishCallback);
48
49 /**
50 * Attempts to merge a transition animation into the animation that is currently
51 * being played by this remote. If merge is not possible/supported, this should be a no-op.
52 * If it *is* merged, the implementation should call `finishCallback` immediately.
53 *
54 * @param transition An identifier for the transition that wants to be merged.
55 * @param mergeTarget The transition that is currently being animated by this remote.
56 * If it can be merged, call `finishCallback`; otherwise, do
57 * nothing.
58 */
59 void mergeAnimation(in IBinder transition, in TransitionInfo info,
60 in SurfaceControl.Transaction t, in IBinder mergeTarget,
61 in IRemoteTransitionFinishedCallback finishCallback);
62 }