1 /* 2 * Copyright (C) 2022 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 com.android.server.pm.pkg.component; 18 19 import static android.content.pm.ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE; 20 import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE; 21 import static android.content.pm.ActivityInfo.RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION; 22 import static android.content.pm.ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; 23 import static android.view.WindowManager.LayoutParams.ROTATION_ANIMATION_UNSPECIFIED; 24 25 import static com.android.server.pm.pkg.parsing.ParsingPackageImpl.sForInternedString; 26 import static com.android.server.pm.pkg.parsing.ParsingPackageImpl.sForStringSet; 27 28 import android.annotation.NonNull; 29 import android.annotation.Nullable; 30 import android.app.ActivityTaskManager; 31 import android.content.ComponentName; 32 import android.content.pm.ActivityInfo; 33 import android.content.pm.PackageManager; 34 import android.os.Parcel; 35 import android.os.Parcelable; 36 import android.text.TextUtils; 37 import android.util.ArraySet; 38 39 import com.android.internal.annotations.VisibleForTesting; 40 import com.android.internal.util.DataClass; 41 import com.android.internal.util.Parcelling.BuiltIn.ForInternedString; 42 import com.android.server.pm.pkg.parsing.ParsingUtils; 43 44 import java.util.Collections; 45 import java.util.Locale; 46 import java.util.Set; 47 48 /** 49 * @hide 50 **/ 51 @DataClass(genGetters = true, genSetters = true, genBuilder = false, genParcelable = false) 52 @VisibleForTesting(visibility = VisibleForTesting.Visibility.PACKAGE) 53 public class ParsedActivityImpl extends ParsedMainComponentImpl implements ParsedActivity, 54 Parcelable { 55 56 private int theme; 57 private int uiOptions; 58 59 @Nullable 60 @DataClass.ParcelWith(ForInternedString.class) 61 private String targetActivity; 62 63 @Nullable 64 @DataClass.ParcelWith(ForInternedString.class) 65 private String parentActivityName; 66 @Nullable 67 private String taskAffinity; 68 private int privateFlags; 69 @Nullable 70 @DataClass.ParcelWith(ForInternedString.class) 71 private String permission; 72 @Nullable 73 private Set<String> mKnownActivityEmbeddingCerts; 74 75 private int launchMode; 76 private int documentLaunchMode; 77 private int maxRecents; 78 private int configChanges; 79 private int softInputMode; 80 private int persistableMode; 81 private int lockTaskLaunchMode; 82 83 private int screenOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; 84 private int resizeMode = ActivityInfo.RESIZE_MODE_RESIZEABLE; 85 86 private float maxAspectRatio = ParsingUtils.NOT_SET; 87 private float minAspectRatio = ParsingUtils.NOT_SET; 88 89 private boolean supportsSizeChanges; 90 91 @Nullable 92 private String requestedVrComponent; 93 private int rotationAnimation = -1; 94 private int colorMode; 95 96 @Nullable 97 private ActivityInfo.WindowLayout windowLayout; 98 ParsedActivityImpl(ParsedActivityImpl other)99 public ParsedActivityImpl(ParsedActivityImpl other) { 100 super(other); 101 this.theme = other.theme; 102 this.uiOptions = other.uiOptions; 103 this.targetActivity = other.targetActivity; 104 this.parentActivityName = other.parentActivityName; 105 this.taskAffinity = other.taskAffinity; 106 this.privateFlags = other.privateFlags; 107 this.permission = other.permission; 108 this.launchMode = other.launchMode; 109 this.documentLaunchMode = other.documentLaunchMode; 110 this.maxRecents = other.maxRecents; 111 this.configChanges = other.configChanges; 112 this.softInputMode = other.softInputMode; 113 this.persistableMode = other.persistableMode; 114 this.lockTaskLaunchMode = other.lockTaskLaunchMode; 115 this.screenOrientation = other.screenOrientation; 116 this.resizeMode = other.resizeMode; 117 this.maxAspectRatio = other.maxAspectRatio; 118 this.minAspectRatio = other.minAspectRatio; 119 this.supportsSizeChanges = other.supportsSizeChanges; 120 this.requestedVrComponent = other.requestedVrComponent; 121 this.rotationAnimation = other.rotationAnimation; 122 this.colorMode = other.colorMode; 123 this.windowLayout = other.windowLayout; 124 this.mKnownActivityEmbeddingCerts = other.mKnownActivityEmbeddingCerts; 125 } 126 127 /** 128 * Generate activity object that forwards user to App Details page automatically. This activity 129 * should be invisible to user and user should not know or see it. 130 */ 131 @NonNull makeAppDetailsActivity(String packageName, String processName, int uiOptions, String taskAffinity, boolean hardwareAccelerated)132 static ParsedActivityImpl makeAppDetailsActivity(String packageName, String processName, 133 int uiOptions, String taskAffinity, boolean hardwareAccelerated) { 134 ParsedActivityImpl activity = new ParsedActivityImpl(); 135 activity.setPackageName(packageName); 136 activity.theme = android.R.style.Theme_NoDisplay; 137 activity.setExported(true); 138 activity.setName(PackageManager.APP_DETAILS_ACTIVITY_CLASS_NAME); 139 activity.setProcessName(processName); 140 activity.uiOptions = uiOptions; 141 activity.taskAffinity = taskAffinity; 142 activity.launchMode = ActivityInfo.LAUNCH_MULTIPLE; 143 activity.documentLaunchMode = ActivityInfo.DOCUMENT_LAUNCH_NONE; 144 activity.maxRecents = ActivityTaskManager.getDefaultAppRecentsLimitStatic(); 145 activity.configChanges = ParsedActivityUtils.getActivityConfigChanges(0, 0); 146 activity.softInputMode = 0; 147 activity.persistableMode = ActivityInfo.PERSIST_NEVER; 148 activity.screenOrientation = SCREEN_ORIENTATION_UNSPECIFIED; 149 activity.resizeMode = RESIZE_MODE_FORCE_RESIZEABLE; 150 activity.lockTaskLaunchMode = 0; 151 activity.setDirectBootAware(false); 152 activity.rotationAnimation = ROTATION_ANIMATION_UNSPECIFIED; 153 activity.colorMode = ActivityInfo.COLOR_MODE_DEFAULT; 154 if (hardwareAccelerated) { 155 activity.setFlags(activity.getFlags() | ActivityInfo.FLAG_HARDWARE_ACCELERATED); 156 } 157 return activity; 158 } 159 160 @NonNull makeAlias(String targetActivityName, ParsedActivity target)161 static ParsedActivityImpl makeAlias(String targetActivityName, ParsedActivity target) { 162 ParsedActivityImpl alias = new ParsedActivityImpl(); 163 alias.setPackageName(target.getPackageName()); 164 alias.setTargetActivity(targetActivityName); 165 alias.configChanges = target.getConfigChanges(); 166 alias.setFlags(target.getFlags()); 167 alias.privateFlags = target.getPrivateFlags(); 168 alias.setIcon(target.getIcon()); 169 alias.setLogo(target.getLogo()); 170 alias.setBanner(target.getBanner()); 171 alias.setLabelRes(target.getLabelRes()); 172 alias.setNonLocalizedLabel(target.getNonLocalizedLabel()); 173 alias.launchMode = target.getLaunchMode(); 174 alias.lockTaskLaunchMode = target.getLockTaskLaunchMode(); 175 alias.documentLaunchMode = target.getDocumentLaunchMode(); 176 alias.setDescriptionRes(target.getDescriptionRes()); 177 alias.screenOrientation = target.getScreenOrientation(); 178 alias.taskAffinity = target.getTaskAffinity(); 179 alias.theme = target.getTheme(); 180 alias.softInputMode = target.getSoftInputMode(); 181 alias.uiOptions = target.getUiOptions(); 182 alias.parentActivityName = target.getParentActivityName(); 183 alias.maxRecents = target.getMaxRecents(); 184 alias.windowLayout = target.getWindowLayout(); 185 alias.resizeMode = target.getResizeMode(); 186 alias.maxAspectRatio = target.getMaxAspectRatio(); 187 alias.minAspectRatio = target.getMinAspectRatio(); 188 alias.supportsSizeChanges = target.isSupportsSizeChanges(); 189 alias.requestedVrComponent = target.getRequestedVrComponent(); 190 alias.setDirectBootAware(target.isDirectBootAware()); 191 alias.setProcessName(target.getProcessName()); 192 return alias; 193 194 // Not all attributes from the target ParsedActivity are copied to the alias. 195 // Careful when adding an attribute and determine whether or not it should be copied. 196 // alias.enabled = target.enabled; 197 // alias.exported = target.exported; 198 // alias.permission = target.permission; 199 // alias.splitName = target.splitName; 200 // alias.persistableMode = target.persistableMode; 201 // alias.rotationAnimation = target.rotationAnimation; 202 // alias.colorMode = target.colorMode; 203 // alias.intents.addAll(target.intents); 204 // alias.order = target.order; 205 // alias.metaData = target.metaData; 206 } 207 setMaxAspectRatio(int resizeMode, float maxAspectRatio)208 public ParsedActivityImpl setMaxAspectRatio(int resizeMode, float maxAspectRatio) { 209 if (resizeMode == ActivityInfo.RESIZE_MODE_RESIZEABLE 210 || resizeMode == ActivityInfo.RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION) { 211 // Resizeable activities can be put in any aspect ratio. 212 return this; 213 } 214 215 if (maxAspectRatio < 1.0f && maxAspectRatio != 0) { 216 // Ignore any value lesser than 1.0. 217 return this; 218 } 219 220 this.maxAspectRatio = maxAspectRatio; 221 return this; 222 } 223 setMinAspectRatio(int resizeMode, float minAspectRatio)224 public ParsedActivityImpl setMinAspectRatio(int resizeMode, float minAspectRatio) { 225 if (resizeMode == RESIZE_MODE_RESIZEABLE 226 || resizeMode == RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION) { 227 // Resizeable activities can be put in any aspect ratio. 228 return this; 229 } 230 231 if (minAspectRatio < 1.0f && minAspectRatio != 0) { 232 // Ignore any value lesser than 1.0. 233 return this; 234 } 235 236 this.minAspectRatio = minAspectRatio; 237 return this; 238 } 239 setTargetActivity(String targetActivity)240 public ParsedActivityImpl setTargetActivity(String targetActivity) { 241 this.targetActivity = TextUtils.safeIntern(targetActivity); 242 return this; 243 } 244 setPermission(String permission)245 public ParsedActivityImpl setPermission(String permission) { 246 // Empty string must be converted to null 247 this.permission = TextUtils.isEmpty(permission) ? null : permission.intern(); 248 return this; 249 } 250 251 @NonNull 252 @Override getKnownActivityEmbeddingCerts()253 public Set<String> getKnownActivityEmbeddingCerts() { 254 return mKnownActivityEmbeddingCerts == null ? Collections.emptySet() 255 : mKnownActivityEmbeddingCerts; 256 } 257 258 /** 259 * Sets the trusted host certificates of apps that are allowed to embed this activity. 260 */ setKnownActivityEmbeddingCerts(@onNull Set<String> knownActivityEmbeddingCerts)261 public void setKnownActivityEmbeddingCerts(@NonNull Set<String> knownActivityEmbeddingCerts) { 262 // Convert the provided digest to upper case for consistent Set membership 263 // checks when verifying the signing certificate digests of requesting apps. 264 this.mKnownActivityEmbeddingCerts = new ArraySet<>(); 265 for (String knownCert : knownActivityEmbeddingCerts) { 266 this.mKnownActivityEmbeddingCerts.add(knownCert.toUpperCase(Locale.US)); 267 } 268 } 269 toString()270 public String toString() { 271 StringBuilder sb = new StringBuilder(128); 272 sb.append("Activity{"); 273 sb.append(Integer.toHexString(System.identityHashCode(this))); 274 sb.append(' '); 275 ComponentName.appendShortString(sb, getPackageName(), getName()); 276 sb.append('}'); 277 return sb.toString(); 278 } 279 280 @Override describeContents()281 public int describeContents() { 282 return 0; 283 } 284 285 @Override writeToParcel(Parcel dest, int flags)286 public void writeToParcel(Parcel dest, int flags) { 287 super.writeToParcel(dest, flags); 288 dest.writeInt(this.theme); 289 dest.writeInt(this.uiOptions); 290 dest.writeString(this.targetActivity); 291 dest.writeString(this.parentActivityName); 292 dest.writeString(this.taskAffinity); 293 dest.writeInt(this.privateFlags); 294 sForInternedString.parcel(this.permission, dest, flags); 295 dest.writeInt(this.launchMode); 296 dest.writeInt(this.documentLaunchMode); 297 dest.writeInt(this.maxRecents); 298 dest.writeInt(this.configChanges); 299 dest.writeInt(this.softInputMode); 300 dest.writeInt(this.persistableMode); 301 dest.writeInt(this.lockTaskLaunchMode); 302 dest.writeInt(this.screenOrientation); 303 dest.writeInt(this.resizeMode); 304 dest.writeValue(this.maxAspectRatio); 305 dest.writeValue(this.minAspectRatio); 306 dest.writeBoolean(this.supportsSizeChanges); 307 dest.writeString(this.requestedVrComponent); 308 dest.writeInt(this.rotationAnimation); 309 dest.writeInt(this.colorMode); 310 dest.writeBundle(this.getMetaData()); 311 312 if (windowLayout != null) { 313 dest.writeInt(1); 314 windowLayout.writeToParcel(dest); 315 } else { 316 dest.writeBoolean(false); 317 } 318 sForStringSet.parcel(this.mKnownActivityEmbeddingCerts, dest, flags); 319 } 320 ParsedActivityImpl()321 public ParsedActivityImpl() { 322 } 323 ParsedActivityImpl(Parcel in)324 protected ParsedActivityImpl(Parcel in) { 325 super(in); 326 this.theme = in.readInt(); 327 this.uiOptions = in.readInt(); 328 this.targetActivity = in.readString(); 329 this.parentActivityName = in.readString(); 330 this.taskAffinity = in.readString(); 331 this.privateFlags = in.readInt(); 332 this.permission = sForInternedString.unparcel(in); 333 this.launchMode = in.readInt(); 334 this.documentLaunchMode = in.readInt(); 335 this.maxRecents = in.readInt(); 336 this.configChanges = in.readInt(); 337 this.softInputMode = in.readInt(); 338 this.persistableMode = in.readInt(); 339 this.lockTaskLaunchMode = in.readInt(); 340 this.screenOrientation = in.readInt(); 341 this.resizeMode = in.readInt(); 342 this.maxAspectRatio = (Float) in.readValue(Float.class.getClassLoader()); 343 this.minAspectRatio = (Float) in.readValue(Float.class.getClassLoader()); 344 this.supportsSizeChanges = in.readBoolean(); 345 this.requestedVrComponent = in.readString(); 346 this.rotationAnimation = in.readInt(); 347 this.colorMode = in.readInt(); 348 this.setMetaData(in.readBundle()); 349 if (in.readBoolean()) { 350 windowLayout = new ActivityInfo.WindowLayout(in); 351 } 352 this.mKnownActivityEmbeddingCerts = sForStringSet.unparcel(in); 353 } 354 355 @NonNull 356 public static final Parcelable.Creator<ParsedActivityImpl> CREATOR = 357 new Parcelable.Creator<ParsedActivityImpl>() { 358 @Override 359 public ParsedActivityImpl createFromParcel(Parcel source) { 360 return new ParsedActivityImpl(source); 361 } 362 363 @Override 364 public ParsedActivityImpl[] newArray(int size) { 365 return new ParsedActivityImpl[size]; 366 } 367 }; 368 369 370 371 // Code below generated by codegen v1.0.23. 372 // 373 // DO NOT MODIFY! 374 // CHECKSTYLE:OFF Generated code 375 // 376 // To regenerate run: 377 // $ codegen $ANDROID_BUILD_TOP/frameworks/base/services/core/java/com/android/server/pm/pkg/component/ParsedActivityImpl.java 378 // 379 // To exclude the generated code from IntelliJ auto-formatting enable (one-time): 380 // Settings > Editor > Code Style > Formatter Control 381 //@formatter:off 382 383 384 @DataClass.Generated.Member ParsedActivityImpl( int theme, int uiOptions, @Nullable String targetActivity, @Nullable String parentActivityName, @Nullable String taskAffinity, int privateFlags, @Nullable String permission, @Nullable Set<String> knownActivityEmbeddingCerts, int launchMode, int documentLaunchMode, int maxRecents, int configChanges, int softInputMode, int persistableMode, int lockTaskLaunchMode, int screenOrientation, int resizeMode, float maxAspectRatio, float minAspectRatio, boolean supportsSizeChanges, @Nullable String requestedVrComponent, int rotationAnimation, int colorMode, @Nullable ActivityInfo.WindowLayout windowLayout)385 public ParsedActivityImpl( 386 int theme, 387 int uiOptions, 388 @Nullable String targetActivity, 389 @Nullable String parentActivityName, 390 @Nullable String taskAffinity, 391 int privateFlags, 392 @Nullable String permission, 393 @Nullable Set<String> knownActivityEmbeddingCerts, 394 int launchMode, 395 int documentLaunchMode, 396 int maxRecents, 397 int configChanges, 398 int softInputMode, 399 int persistableMode, 400 int lockTaskLaunchMode, 401 int screenOrientation, 402 int resizeMode, 403 float maxAspectRatio, 404 float minAspectRatio, 405 boolean supportsSizeChanges, 406 @Nullable String requestedVrComponent, 407 int rotationAnimation, 408 int colorMode, 409 @Nullable ActivityInfo.WindowLayout windowLayout) { 410 this.theme = theme; 411 this.uiOptions = uiOptions; 412 this.targetActivity = targetActivity; 413 this.parentActivityName = parentActivityName; 414 this.taskAffinity = taskAffinity; 415 this.privateFlags = privateFlags; 416 this.permission = permission; 417 this.mKnownActivityEmbeddingCerts = knownActivityEmbeddingCerts; 418 this.launchMode = launchMode; 419 this.documentLaunchMode = documentLaunchMode; 420 this.maxRecents = maxRecents; 421 this.configChanges = configChanges; 422 this.softInputMode = softInputMode; 423 this.persistableMode = persistableMode; 424 this.lockTaskLaunchMode = lockTaskLaunchMode; 425 this.screenOrientation = screenOrientation; 426 this.resizeMode = resizeMode; 427 this.maxAspectRatio = maxAspectRatio; 428 this.minAspectRatio = minAspectRatio; 429 this.supportsSizeChanges = supportsSizeChanges; 430 this.requestedVrComponent = requestedVrComponent; 431 this.rotationAnimation = rotationAnimation; 432 this.colorMode = colorMode; 433 this.windowLayout = windowLayout; 434 435 // onConstructed(); // You can define this method to get a callback 436 } 437 438 @DataClass.Generated.Member getTheme()439 public int getTheme() { 440 return theme; 441 } 442 443 @DataClass.Generated.Member getUiOptions()444 public int getUiOptions() { 445 return uiOptions; 446 } 447 448 @DataClass.Generated.Member getTargetActivity()449 public @Nullable String getTargetActivity() { 450 return targetActivity; 451 } 452 453 @DataClass.Generated.Member getParentActivityName()454 public @Nullable String getParentActivityName() { 455 return parentActivityName; 456 } 457 458 @DataClass.Generated.Member getTaskAffinity()459 public @Nullable String getTaskAffinity() { 460 return taskAffinity; 461 } 462 463 @DataClass.Generated.Member getPrivateFlags()464 public int getPrivateFlags() { 465 return privateFlags; 466 } 467 468 @DataClass.Generated.Member getPermission()469 public @Nullable String getPermission() { 470 return permission; 471 } 472 473 @DataClass.Generated.Member getLaunchMode()474 public int getLaunchMode() { 475 return launchMode; 476 } 477 478 @DataClass.Generated.Member getDocumentLaunchMode()479 public int getDocumentLaunchMode() { 480 return documentLaunchMode; 481 } 482 483 @DataClass.Generated.Member getMaxRecents()484 public int getMaxRecents() { 485 return maxRecents; 486 } 487 488 @DataClass.Generated.Member getConfigChanges()489 public int getConfigChanges() { 490 return configChanges; 491 } 492 493 @DataClass.Generated.Member getSoftInputMode()494 public int getSoftInputMode() { 495 return softInputMode; 496 } 497 498 @DataClass.Generated.Member getPersistableMode()499 public int getPersistableMode() { 500 return persistableMode; 501 } 502 503 @DataClass.Generated.Member getLockTaskLaunchMode()504 public int getLockTaskLaunchMode() { 505 return lockTaskLaunchMode; 506 } 507 508 @DataClass.Generated.Member getScreenOrientation()509 public int getScreenOrientation() { 510 return screenOrientation; 511 } 512 513 @DataClass.Generated.Member getResizeMode()514 public int getResizeMode() { 515 return resizeMode; 516 } 517 518 @DataClass.Generated.Member getMaxAspectRatio()519 public float getMaxAspectRatio() { 520 return maxAspectRatio; 521 } 522 523 @DataClass.Generated.Member getMinAspectRatio()524 public float getMinAspectRatio() { 525 return minAspectRatio; 526 } 527 528 @DataClass.Generated.Member isSupportsSizeChanges()529 public boolean isSupportsSizeChanges() { 530 return supportsSizeChanges; 531 } 532 533 @DataClass.Generated.Member getRequestedVrComponent()534 public @Nullable String getRequestedVrComponent() { 535 return requestedVrComponent; 536 } 537 538 @DataClass.Generated.Member getRotationAnimation()539 public int getRotationAnimation() { 540 return rotationAnimation; 541 } 542 543 @DataClass.Generated.Member getColorMode()544 public int getColorMode() { 545 return colorMode; 546 } 547 548 @DataClass.Generated.Member getWindowLayout()549 public @Nullable ActivityInfo.WindowLayout getWindowLayout() { 550 return windowLayout; 551 } 552 553 @DataClass.Generated.Member setTheme( int value)554 public @NonNull ParsedActivityImpl setTheme( int value) { 555 theme = value; 556 return this; 557 } 558 559 @DataClass.Generated.Member setUiOptions( int value)560 public @NonNull ParsedActivityImpl setUiOptions( int value) { 561 uiOptions = value; 562 return this; 563 } 564 565 @DataClass.Generated.Member setParentActivityName(@onNull String value)566 public @NonNull ParsedActivityImpl setParentActivityName(@NonNull String value) { 567 parentActivityName = value; 568 return this; 569 } 570 571 @DataClass.Generated.Member setTaskAffinity(@onNull String value)572 public @NonNull ParsedActivityImpl setTaskAffinity(@NonNull String value) { 573 taskAffinity = value; 574 return this; 575 } 576 577 @DataClass.Generated.Member setPrivateFlags( int value)578 public @NonNull ParsedActivityImpl setPrivateFlags( int value) { 579 privateFlags = value; 580 return this; 581 } 582 583 @DataClass.Generated.Member setLaunchMode( int value)584 public @NonNull ParsedActivityImpl setLaunchMode( int value) { 585 launchMode = value; 586 return this; 587 } 588 589 @DataClass.Generated.Member setDocumentLaunchMode( int value)590 public @NonNull ParsedActivityImpl setDocumentLaunchMode( int value) { 591 documentLaunchMode = value; 592 return this; 593 } 594 595 @DataClass.Generated.Member setMaxRecents( int value)596 public @NonNull ParsedActivityImpl setMaxRecents( int value) { 597 maxRecents = value; 598 return this; 599 } 600 601 @DataClass.Generated.Member setConfigChanges( int value)602 public @NonNull ParsedActivityImpl setConfigChanges( int value) { 603 configChanges = value; 604 return this; 605 } 606 607 @DataClass.Generated.Member setSoftInputMode( int value)608 public @NonNull ParsedActivityImpl setSoftInputMode( int value) { 609 softInputMode = value; 610 return this; 611 } 612 613 @DataClass.Generated.Member setPersistableMode( int value)614 public @NonNull ParsedActivityImpl setPersistableMode( int value) { 615 persistableMode = value; 616 return this; 617 } 618 619 @DataClass.Generated.Member setLockTaskLaunchMode( int value)620 public @NonNull ParsedActivityImpl setLockTaskLaunchMode( int value) { 621 lockTaskLaunchMode = value; 622 return this; 623 } 624 625 @DataClass.Generated.Member setScreenOrientation( int value)626 public @NonNull ParsedActivityImpl setScreenOrientation( int value) { 627 screenOrientation = value; 628 return this; 629 } 630 631 @DataClass.Generated.Member setResizeMode( int value)632 public @NonNull ParsedActivityImpl setResizeMode( int value) { 633 resizeMode = value; 634 return this; 635 } 636 637 @DataClass.Generated.Member setMaxAspectRatio( float value)638 public @NonNull ParsedActivityImpl setMaxAspectRatio( float value) { 639 maxAspectRatio = value; 640 return this; 641 } 642 643 @DataClass.Generated.Member setMinAspectRatio( float value)644 public @NonNull ParsedActivityImpl setMinAspectRatio( float value) { 645 minAspectRatio = value; 646 return this; 647 } 648 649 @DataClass.Generated.Member setSupportsSizeChanges( boolean value)650 public @NonNull ParsedActivityImpl setSupportsSizeChanges( boolean value) { 651 supportsSizeChanges = value; 652 return this; 653 } 654 655 @DataClass.Generated.Member setRequestedVrComponent(@onNull String value)656 public @NonNull ParsedActivityImpl setRequestedVrComponent(@NonNull String value) { 657 requestedVrComponent = value; 658 return this; 659 } 660 661 @DataClass.Generated.Member setRotationAnimation( int value)662 public @NonNull ParsedActivityImpl setRotationAnimation( int value) { 663 rotationAnimation = value; 664 return this; 665 } 666 667 @DataClass.Generated.Member setColorMode( int value)668 public @NonNull ParsedActivityImpl setColorMode( int value) { 669 colorMode = value; 670 return this; 671 } 672 673 @DataClass.Generated.Member setWindowLayout(@onNull ActivityInfo.WindowLayout value)674 public @NonNull ParsedActivityImpl setWindowLayout(@NonNull ActivityInfo.WindowLayout value) { 675 windowLayout = value; 676 return this; 677 } 678 679 @DataClass.Generated( 680 time = 1644372875433L, 681 codegenVersion = "1.0.23", 682 sourceFile = "frameworks/base/services/core/java/com/android/server/pm/pkg/component/ParsedActivityImpl.java", 683 inputSignatures = "private int theme\nprivate int uiOptions\nprivate @android.annotation.Nullable @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForInternedString.class) java.lang.String targetActivity\nprivate @android.annotation.Nullable @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForInternedString.class) java.lang.String parentActivityName\nprivate @android.annotation.Nullable java.lang.String taskAffinity\nprivate int privateFlags\nprivate @android.annotation.Nullable @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForInternedString.class) java.lang.String permission\nprivate @android.annotation.Nullable java.util.Set<java.lang.String> mKnownActivityEmbeddingCerts\nprivate int launchMode\nprivate int documentLaunchMode\nprivate int maxRecents\nprivate int configChanges\nprivate int softInputMode\nprivate int persistableMode\nprivate int lockTaskLaunchMode\nprivate int screenOrientation\nprivate int resizeMode\nprivate float maxAspectRatio\nprivate float minAspectRatio\nprivate boolean supportsSizeChanges\nprivate @android.annotation.Nullable java.lang.String requestedVrComponent\nprivate int rotationAnimation\nprivate int colorMode\nprivate @android.annotation.Nullable android.content.pm.ActivityInfo.WindowLayout windowLayout\npublic static final @android.annotation.NonNull android.os.Parcelable.Creator<com.android.server.pm.pkg.component.ParsedActivityImpl> CREATOR\nstatic @android.annotation.NonNull com.android.server.pm.pkg.component.ParsedActivityImpl makeAppDetailsActivity(java.lang.String,java.lang.String,int,java.lang.String,boolean)\nstatic @android.annotation.NonNull com.android.server.pm.pkg.component.ParsedActivityImpl makeAlias(java.lang.String,com.android.server.pm.pkg.component.ParsedActivity)\npublic com.android.server.pm.pkg.component.ParsedActivityImpl setMaxAspectRatio(int,float)\npublic com.android.server.pm.pkg.component.ParsedActivityImpl setMinAspectRatio(int,float)\npublic com.android.server.pm.pkg.component.ParsedActivityImpl setTargetActivity(java.lang.String)\npublic com.android.server.pm.pkg.component.ParsedActivityImpl setPermission(java.lang.String)\npublic @android.annotation.NonNull @java.lang.Override java.util.Set<java.lang.String> getKnownActivityEmbeddingCerts()\npublic void setKnownActivityEmbeddingCerts(java.util.Set<java.lang.String>)\npublic java.lang.String toString()\npublic @java.lang.Override int describeContents()\npublic @java.lang.Override void writeToParcel(android.os.Parcel,int)\nclass ParsedActivityImpl extends com.android.server.pm.pkg.component.ParsedMainComponentImpl implements [com.android.server.pm.pkg.component.ParsedActivity, android.os.Parcelable]\n@com.android.internal.util.DataClass(genGetters=true, genSetters=true, genBuilder=false, genParcelable=false)") 684 @Deprecated __metadata()685 private void __metadata() {} 686 687 688 //@formatter:on 689 // End of generated code 690 691 } 692