Debian Codegraph @

core/java/android/window/StartingWindowRemovalInfo.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2021 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.annotation.NonNull;
20 import android.annotation.Nullable;
21 import android.graphics.Rect;
22 import android.os.Parcel;
23 import android.os.Parcelable;
24 import android.view.SurfaceControl;
25
26 /**
27 * Information when removing a starting window of a particular task.
28 * @hide
29 */
30 public final class StartingWindowRemovalInfo implements Parcelable {
31
32 /**
33 * The identifier of a task.
34 * @hide
35 */
36 public int taskId;
37
38 /**
39 * The animation container layer of the top activity.
40 * @hide
41 */
42 @Nullable
43 public SurfaceControl windowAnimationLeash;
44
45 /**
46 * The main window frame for the window of the top activity.
47 * @hide
48 */
49 @Nullable
50 public Rect mainFrame;
51
52 /**
53 * Whether need to play reveal animation.
54 * @hide
55 */
56 public boolean playRevealAnimation;
57
58 /**
59 * Whether need to defer removing the starting window for IME.
60 * @hide
61 */
62 public boolean deferRemoveForIme;
63
64 /**
65 * The rounded corner radius
66 * @hide
67 */
68 public float roundedCornerRadius;
69
70 public StartingWindowRemovalInfo() {
71
72 }
73
74 private StartingWindowRemovalInfo(@NonNull Parcel source) {
75 readFromParcel(source);
76 }
77
78 @Override
79 public int describeContents() {
80 return 0;
81 }
82
83 void readFromParcel(@NonNull Parcel source) {
84 taskId = source.readInt();
85 windowAnimationLeash = source.readTypedObject(SurfaceControl.CREATOR);
86 mainFrame = source.readTypedObject(Rect.CREATOR);
87 playRevealAnimation = source.readBoolean();
88 deferRemoveForIme = source.readBoolean();
89 roundedCornerRadius = source.readFloat();
90 }
91
92 @Override
93 public void writeToParcel(@NonNull Parcel dest, int flags) {
94 dest.writeInt(taskId);
95 dest.writeTypedObject(windowAnimationLeash, flags);
96 dest.writeTypedObject(mainFrame, flags);
97 dest.writeBoolean(playRevealAnimation);
98 dest.writeBoolean(deferRemoveForIme);
99 dest.writeFloat(roundedCornerRadius);
100 }
101
102 @Override
103 public String toString() {
104 return "StartingWindowRemovalInfo{taskId=" + taskId
105 + " frame=" + mainFrame
106 + " playRevealAnimation=" + playRevealAnimation
107 + " roundedCornerRadius=" + roundedCornerRadius
108 + " deferRemoveForIme=" + deferRemoveForIme + "}";
109 }
110
111 public static final @android.annotation.NonNull Creator<StartingWindowRemovalInfo> CREATOR =
112 new Creator<StartingWindowRemovalInfo>() {
113 public StartingWindowRemovalInfo createFromParcel(@NonNull Parcel source) {
114 return new StartingWindowRemovalInfo(source);
115 }
116 public StartingWindowRemovalInfo[] newArray(int size) {
117 return new StartingWindowRemovalInfo[size];
118 }
119 };
120 }