| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.window; |
| 18 |
|
| 19 |
import static android.view.WindowManager.transitTypeToString; |
| 20 |
|
| 21 |
import android.annotation.Nullable; |
| 22 |
import android.app.ActivityManager; |
| 23 |
import android.app.WindowConfiguration; |
| 24 |
import android.graphics.Rect; |
| 25 |
import android.os.Parcelable; |
| 26 |
import android.view.WindowManager; |
| 27 |
|
| 28 |
import com.android.internal.util.DataClass; |
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
@DataClass(genToString = true, genSetters = true, genAidl = true) |
| 35 |
public final class TransitionRequestInfo implements Parcelable { |
| 36 |
|
| 37 |
|
| 38 |
private final @WindowManager.TransitionType int mType; |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
private @Nullable ActivityManager.RunningTaskInfo mTriggerTask; |
| 45 |
|
| 46 |
|
| 47 |
private @Nullable RemoteTransition mRemoteTransition; |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
private @Nullable DisplayChange mDisplayChange; |
| 55 |
|
| 56 |
|
| 57 |
public TransitionRequestInfo( |
| 58 |
@WindowManager.TransitionType int type, |
| 59 |
@Nullable ActivityManager.RunningTaskInfo triggerTask, |
| 60 |
@Nullable RemoteTransition remoteTransition) { |
| 61 |
this(type, triggerTask, remoteTransition, null ); |
| 62 |
} |
| 63 |
|
| 64 |
|
| 65 |
@DataClass(genToString = true, genSetters = true, genBuilder = false, genConstructor = false) |
| 66 |
public static class DisplayChange implements Parcelable { |
| 67 |
private final int mDisplayId; |
| 68 |
@Nullable private Rect mStartAbsBounds = null; |
| 69 |
@Nullable private Rect mEndAbsBounds = null; |
| 70 |
private int mStartRotation = WindowConfiguration.ROTATION_UNDEFINED; |
| 71 |
private int mEndRotation = WindowConfiguration.ROTATION_UNDEFINED; |
| 72 |
private boolean mPhysicalDisplayChanged = false; |
| 73 |
|
| 74 |
|
| 75 |
public DisplayChange(int displayId) { |
| 76 |
mDisplayId = displayId; |
| 77 |
} |
| 78 |
|
| 79 |
|
| 80 |
public DisplayChange(int displayId, int startRotation, int endRotation) { |
| 81 |
mDisplayId = displayId; |
| 82 |
mStartRotation = startRotation; |
| 83 |
mEndRotation = endRotation; |
| 84 |
} |
| 85 |
|
| 86 |
|
| 87 |
|
| 88 |
|
| 89 |
|
| 90 |
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
@DataClass.Generated.Member |
| 102 |
public int getDisplayId() { |
| 103 |
return mDisplayId; |
| 104 |
} |
| 105 |
|
| 106 |
@DataClass.Generated.Member |
| 107 |
public @Nullable Rect getStartAbsBounds() { |
| 108 |
return mStartAbsBounds; |
| 109 |
} |
| 110 |
|
| 111 |
@DataClass.Generated.Member |
| 112 |
public @Nullable Rect getEndAbsBounds() { |
| 113 |
return mEndAbsBounds; |
| 114 |
} |
| 115 |
|
| 116 |
@DataClass.Generated.Member |
| 117 |
public int getStartRotation() { |
| 118 |
return mStartRotation; |
| 119 |
} |
| 120 |
|
| 121 |
@DataClass.Generated.Member |
| 122 |
public int getEndRotation() { |
| 123 |
return mEndRotation; |
| 124 |
} |
| 125 |
|
| 126 |
@DataClass.Generated.Member |
| 127 |
public boolean isPhysicalDisplayChanged() { |
| 128 |
return mPhysicalDisplayChanged; |
| 129 |
} |
| 130 |
|
| 131 |
@DataClass.Generated.Member |
| 132 |
public @android.annotation.NonNull DisplayChange setStartAbsBounds(@android.annotation.NonNull Rect value) { |
| 133 |
mStartAbsBounds = value; |
| 134 |
return this; |
| 135 |
} |
| 136 |
|
| 137 |
@DataClass.Generated.Member |
| 138 |
public @android.annotation.NonNull DisplayChange setEndAbsBounds(@android.annotation.NonNull Rect value) { |
| 139 |
mEndAbsBounds = value; |
| 140 |
return this; |
| 141 |
} |
| 142 |
|
| 143 |
@DataClass.Generated.Member |
| 144 |
public @android.annotation.NonNull DisplayChange setStartRotation( int value) { |
| 145 |
mStartRotation = value; |
| 146 |
return this; |
| 147 |
} |
| 148 |
|
| 149 |
@DataClass.Generated.Member |
| 150 |
public @android.annotation.NonNull DisplayChange setEndRotation( int value) { |
| 151 |
mEndRotation = value; |
| 152 |
return this; |
| 153 |
} |
| 154 |
|
| 155 |
@DataClass.Generated.Member |
| 156 |
public @android.annotation.NonNull DisplayChange setPhysicalDisplayChanged( boolean value) { |
| 157 |
mPhysicalDisplayChanged = value; |
| 158 |
return this; |
| 159 |
} |
| 160 |
|
| 161 |
@Override |
| 162 |
@DataClass.Generated.Member |
| 163 |
public String toString() { |
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
return "DisplayChange { " + |
| 168 |
"displayId = " + mDisplayId + ", " + |
| 169 |
"startAbsBounds = " + mStartAbsBounds + ", " + |
| 170 |
"endAbsBounds = " + mEndAbsBounds + ", " + |
| 171 |
"startRotation = " + mStartRotation + ", " + |
| 172 |
"endRotation = " + mEndRotation + ", " + |
| 173 |
"physicalDisplayChanged = " + mPhysicalDisplayChanged + |
| 174 |
" }"; |
| 175 |
} |
| 176 |
|
| 177 |
@Override |
| 178 |
@DataClass.Generated.Member |
| 179 |
public void writeToParcel(@android.annotation.NonNull android.os.Parcel dest, int flags) { |
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
byte flg = 0; |
| 184 |
if (mPhysicalDisplayChanged) flg |= 0x20; |
| 185 |
if (mStartAbsBounds != null) flg |= 0x2; |
| 186 |
if (mEndAbsBounds != null) flg |= 0x4; |
| 187 |
dest.writeByte(flg); |
| 188 |
dest.writeInt(mDisplayId); |
| 189 |
if (mStartAbsBounds != null) dest.writeTypedObject(mStartAbsBounds, flags); |
| 190 |
if (mEndAbsBounds != null) dest.writeTypedObject(mEndAbsBounds, flags); |
| 191 |
dest.writeInt(mStartRotation); |
| 192 |
dest.writeInt(mEndRotation); |
| 193 |
} |
| 194 |
|
| 195 |
@Override |
| 196 |
@DataClass.Generated.Member |
| 197 |
public int describeContents() { return 0; } |
| 198 |
|
| 199 |
|
| 200 |
@SuppressWarnings({"unchecked", "RedundantCast"}) |
| 201 |
@DataClass.Generated.Member |
| 202 |
protected DisplayChange(@android.annotation.NonNull android.os.Parcel in) { |
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
byte flg = in.readByte(); |
| 207 |
boolean physicalDisplayChanged = (flg & 0x20) != 0; |
| 208 |
int displayId = in.readInt(); |
| 209 |
Rect startAbsBounds = (flg & 0x2) == 0 ? null : (Rect) in.readTypedObject(Rect.CREATOR); |
| 210 |
Rect endAbsBounds = (flg & 0x4) == 0 ? null : (Rect) in.readTypedObject(Rect.CREATOR); |
| 211 |
int startRotation = in.readInt(); |
| 212 |
int endRotation = in.readInt(); |
| 213 |
|
| 214 |
this.mDisplayId = displayId; |
| 215 |
this.mStartAbsBounds = startAbsBounds; |
| 216 |
this.mEndAbsBounds = endAbsBounds; |
| 217 |
this.mStartRotation = startRotation; |
| 218 |
this.mEndRotation = endRotation; |
| 219 |
this.mPhysicalDisplayChanged = physicalDisplayChanged; |
| 220 |
|
| 221 |
|
| 222 |
} |
| 223 |
|
| 224 |
@DataClass.Generated.Member |
| 225 |
public static final @android.annotation.NonNull Parcelable.Creator<DisplayChange> CREATOR |
| 226 |
= new Parcelable.Creator<DisplayChange>() { |
| 227 |
@Override |
| 228 |
public DisplayChange[] newArray(int size) { |
| 229 |
return new DisplayChange[size]; |
| 230 |
} |
| 231 |
|
| 232 |
@Override |
| 233 |
public DisplayChange createFromParcel(@android.annotation.NonNull android.os.Parcel in) { |
| 234 |
return new DisplayChange(in); |
| 235 |
} |
| 236 |
}; |
| 237 |
|
| 238 |
@DataClass.Generated( |
| 239 |
time = 1648141181315L, |
| 240 |
codegenVersion = "1.0.23", |
| 241 |
sourceFile = "frameworks/base/core/java/android/window/TransitionRequestInfo.java", |
| 242 |
inputSignatures = "private final int mDisplayId\nprivate @android.annotation.Nullable android.graphics.Rect mStartAbsBounds\nprivate @android.annotation.Nullable android.graphics.Rect mEndAbsBounds\nprivate int mStartRotation\nprivate int mEndRotation\nprivate boolean mPhysicalDisplayChanged\nclass DisplayChange extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true, genSetters=true, genBuilder=false, genConstructor=false)") |
| 243 |
@Deprecated |
| 244 |
private void __metadata() {} |
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
|
| 249 |
|
| 250 |
} |
| 251 |
|
| 252 |
|
| 253 |
|
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
|
| 269 |
|
| 270 |
|
| 271 |
|
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
@DataClass.Generated.Member |
| 284 |
public TransitionRequestInfo( |
| 285 |
@WindowManager.TransitionType int type, |
| 286 |
@Nullable ActivityManager.RunningTaskInfo triggerTask, |
| 287 |
@Nullable RemoteTransition remoteTransition, |
| 288 |
@Nullable DisplayChange displayChange) { |
| 289 |
this.mType = type; |
| 290 |
com.android.internal.util.AnnotationValidations.validate( |
| 291 |
WindowManager.TransitionType.class, null, mType); |
| 292 |
this.mTriggerTask = triggerTask; |
| 293 |
this.mRemoteTransition = remoteTransition; |
| 294 |
this.mDisplayChange = displayChange; |
| 295 |
|
| 296 |
|
| 297 |
} |
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
@DataClass.Generated.Member |
| 303 |
public @WindowManager.TransitionType int getType() { |
| 304 |
return mType; |
| 305 |
} |
| 306 |
|
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
@DataClass.Generated.Member |
| 312 |
public @Nullable ActivityManager.RunningTaskInfo getTriggerTask() { |
| 313 |
return mTriggerTask; |
| 314 |
} |
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
@DataClass.Generated.Member |
| 320 |
public @Nullable RemoteTransition getRemoteTransition() { |
| 321 |
return mRemoteTransition; |
| 322 |
} |
| 323 |
|
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
@DataClass.Generated.Member |
| 330 |
public @Nullable DisplayChange getDisplayChange() { |
| 331 |
return mDisplayChange; |
| 332 |
} |
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
|
| 337 |
|
| 338 |
@DataClass.Generated.Member |
| 339 |
public @android.annotation.NonNull TransitionRequestInfo setTriggerTask(@android.annotation.NonNull ActivityManager.RunningTaskInfo value) { |
| 340 |
mTriggerTask = value; |
| 341 |
return this; |
| 342 |
} |
| 343 |
|
| 344 |
|
| 345 |
|
| 346 |
|
| 347 |
@DataClass.Generated.Member |
| 348 |
public @android.annotation.NonNull TransitionRequestInfo setRemoteTransition(@android.annotation.NonNull RemoteTransition value) { |
| 349 |
mRemoteTransition = value; |
| 350 |
return this; |
| 351 |
} |
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
@DataClass.Generated.Member |
| 359 |
public @android.annotation.NonNull TransitionRequestInfo setDisplayChange(@android.annotation.NonNull DisplayChange value) { |
| 360 |
mDisplayChange = value; |
| 361 |
return this; |
| 362 |
} |
| 363 |
|
| 364 |
@Override |
| 365 |
@DataClass.Generated.Member |
| 366 |
public String toString() { |
| 367 |
|
| 368 |
|
| 369 |
|
| 370 |
return "TransitionRequestInfo { " + |
| 371 |
"type = " + transitTypeToString(mType) + ", " + |
| 372 |
"triggerTask = " + mTriggerTask + ", " + |
| 373 |
"remoteTransition = " + mRemoteTransition + ", " + |
| 374 |
"displayChange = " + mDisplayChange + |
| 375 |
" }"; |
| 376 |
} |
| 377 |
|
| 378 |
@Override |
| 379 |
@DataClass.Generated.Member |
| 380 |
public void writeToParcel(@android.annotation.NonNull android.os.Parcel dest, int flags) { |
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
byte flg = 0; |
| 385 |
if (mTriggerTask != null) flg |= 0x2; |
| 386 |
if (mRemoteTransition != null) flg |= 0x4; |
| 387 |
if (mDisplayChange != null) flg |= 0x8; |
| 388 |
dest.writeByte(flg); |
| 389 |
dest.writeInt(mType); |
| 390 |
if (mTriggerTask != null) dest.writeTypedObject(mTriggerTask, flags); |
| 391 |
if (mRemoteTransition != null) dest.writeTypedObject(mRemoteTransition, flags); |
| 392 |
if (mDisplayChange != null) dest.writeTypedObject(mDisplayChange, flags); |
| 393 |
} |
| 394 |
|
| 395 |
@Override |
| 396 |
@DataClass.Generated.Member |
| 397 |
public int describeContents() { return 0; } |
| 398 |
|
| 399 |
|
| 400 |
@SuppressWarnings({"unchecked", "RedundantCast"}) |
| 401 |
@DataClass.Generated.Member |
| 402 |
TransitionRequestInfo(@android.annotation.NonNull android.os.Parcel in) { |
| 403 |
|
| 404 |
|
| 405 |
|
| 406 |
byte flg = in.readByte(); |
| 407 |
int type = in.readInt(); |
| 408 |
ActivityManager.RunningTaskInfo triggerTask = (flg & 0x2) == 0 ? null : (ActivityManager.RunningTaskInfo) in.readTypedObject(ActivityManager.RunningTaskInfo.CREATOR); |
| 409 |
RemoteTransition remoteTransition = (flg & 0x4) == 0 ? null : (RemoteTransition) in.readTypedObject(RemoteTransition.CREATOR); |
| 410 |
DisplayChange displayChange = (flg & 0x8) == 0 ? null : (DisplayChange) in.readTypedObject(DisplayChange.CREATOR); |
| 411 |
|
| 412 |
this.mType = type; |
| 413 |
com.android.internal.util.AnnotationValidations.validate( |
| 414 |
WindowManager.TransitionType.class, null, mType); |
| 415 |
this.mTriggerTask = triggerTask; |
| 416 |
this.mRemoteTransition = remoteTransition; |
| 417 |
this.mDisplayChange = displayChange; |
| 418 |
|
| 419 |
|
| 420 |
} |
| 421 |
|
| 422 |
@DataClass.Generated.Member |
| 423 |
public static final @android.annotation.NonNull Parcelable.Creator<TransitionRequestInfo> CREATOR |
| 424 |
= new Parcelable.Creator<TransitionRequestInfo>() { |
| 425 |
@Override |
| 426 |
public TransitionRequestInfo[] newArray(int size) { |
| 427 |
return new TransitionRequestInfo[size]; |
| 428 |
} |
| 429 |
|
| 430 |
@Override |
| 431 |
public TransitionRequestInfo createFromParcel(@android.annotation.NonNull android.os.Parcel in) { |
| 432 |
return new TransitionRequestInfo(in); |
| 433 |
} |
| 434 |
}; |
| 435 |
|
| 436 |
@DataClass.Generated( |
| 437 |
time = 1639445520938L, |
| 438 |
codegenVersion = "1.0.23", |
| 439 |
sourceFile = "frameworks/base/core/java/android/window/TransitionRequestInfo.java", |
| 440 |
inputSignatures = "private final @android.view.WindowManager.TransitionType int mType\nprivate @android.annotation.Nullable android.app.ActivityManager.RunningTaskInfo mTriggerTask\nprivate @android.annotation.Nullable android.window.RemoteTransition mRemoteTransition\nprivate @android.annotation.Nullable android.window.TransitionRequestInfo.DisplayChange mDisplayChange\nclass TransitionRequestInfo extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genToString=true, genSetters=true, genAidl=true)") |
| 441 |
@Deprecated |
| 442 |
private void __metadata() {} |
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
} |