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.content.pm.parsing; 18 19 import android.annotation.NonNull; 20 import android.annotation.Nullable; 21 import android.content.pm.ApplicationInfo; 22 import android.content.pm.ArchivedPackageParcel; 23 import android.content.pm.PackageInfo; 24 import android.content.pm.PackageManager; 25 import android.content.pm.SharedLibraryInfo; 26 import android.content.pm.SigningDetails; 27 import android.content.pm.VerifierInfo; 28 29 import com.android.internal.util.CollectionUtils; 30 import com.android.internal.util.DataClass; 31 32 import java.util.Collections; 33 import java.util.List; 34 import java.util.Set; 35 36 /** 37 * Lightweight parsed details about a single APK file. 38 * 39 * @hide 40 */ 41 @DataClass(genConstructor = false, genConstDefs = false) 42 public class ApkLite { 43 /** Name of the package as used to identify it in the system */ 44 private final @NonNull String mPackageName; 45 /** Path where this APK file was found on disk */ 46 private final @NonNull String mPath; 47 /** Split name of this APK */ 48 private final @Nullable String mSplitName; 49 /** Dependencies of the split APK */ 50 /** Name of the split APK that this APK depends on */ 51 private final @Nullable String mUsesSplitName; 52 /** Name of the split APK that this APK is a configuration for */ 53 private final @Nullable String mConfigForSplit; 54 /** Indicate the types of the required split are necessary for this package to run */ 55 private final @Nullable Set<String> mRequiredSplitTypes; 56 /** Split types of this APK */ 57 private final @Nullable Set<String> mSplitTypes; 58 59 /** Major version number of this package */ 60 private final int mVersionCodeMajor; 61 /** Minor version number of this package */ 62 private final int mVersionCode; 63 /** Revision code of this APK */ 64 private final int mRevisionCode; 65 /** 66 * Indicate the install location of this package 67 * 68 * @see {@link PackageInfo#INSTALL_LOCATION_AUTO} 69 * @see {@link PackageInfo#INSTALL_LOCATION_INTERNAL_ONLY} 70 * @see {@link PackageInfo#INSTALL_LOCATION_PREFER_EXTERNAL} 71 */ 72 private final int mInstallLocation; 73 /** Indicate the minimum SDK version number that the app requires */ 74 private final int mMinSdkVersion; 75 /** Indicate the SDK version number that the application is targeting */ 76 private final int mTargetSdkVersion; 77 /** Information about a package verifiers as used during package verification */ 78 private final @NonNull VerifierInfo[] mVerifiers; 79 /** Signing-related data of an application package */ 80 private final @NonNull SigningDetails mSigningDetails; 81 82 /** Indicate whether this APK is a 'feature' split */ 83 private final boolean mFeatureSplit; 84 /** Indicate whether each split should be load into their own Context objects */ 85 private final boolean mIsolatedSplits; 86 /** 87 * Indicate whether this package requires at least one split (either feature or resource) 88 * to be present in order to function 89 */ 90 private final boolean mSplitRequired; 91 /** Indicate whether this app is coreApp */ 92 private final boolean mCoreApp; 93 /** Indicate whether this app can be debugged */ 94 private final boolean mDebuggable; 95 /** Indicate whether this app is profileable by Shell */ 96 private final boolean mProfileableByShell; 97 /** Indicate whether this app needs to be loaded into other applications' processes */ 98 private final boolean mMultiArch; 99 /** Indicate whether the 32 bit version of the ABI should be used */ 100 private final boolean mUse32bitAbi; 101 /** Indicate whether installer extracts native libraries */ 102 private final boolean mExtractNativeLibs; 103 /** 104 * Indicate whether this package wants to run the dex within its APK but not extracted 105 * or locally compiled variants. 106 */ 107 private final boolean mUseEmbeddedDex; 108 109 /** Name of the overlay-able set of elements package */ 110 private final @Nullable String mTargetPackageName; 111 /** Indicate whether the overlay is static */ 112 private final boolean mOverlayIsStatic; 113 /** Indicate the priority of this overlay package */ 114 private final int mOverlayPriority; 115 /** 116 * A comma separated list of system property names to control whether the overlay should be 117 * excluded based on the system property condition. 118 */ 119 private final @Nullable String mRequiredSystemPropertyName; 120 /** 121 * A comma separated list of system property values to control whether the overlay should be 122 * excluded based on the system property condition. 123 */ 124 private final @Nullable String mRequiredSystemPropertyValue; 125 126 /** 127 * Indicate the policy to deal with user data when rollback is committed 128 * 129 * @see {@link PackageManager#ROLLBACK_DATA_POLICY_RESTORE} 130 * @see {@link PackageManager#ROLLBACK_DATA_POLICY_WIPE} 131 * @see {@link PackageManager#ROLLBACK_DATA_POLICY_RETAIN} 132 */ 133 private final int mRollbackDataPolicy; 134 135 /** 136 * Indicates if this app contains a {@link android.app.admin.DeviceAdminReceiver}. 137 */ 138 private final boolean mHasDeviceAdminReceiver; 139 140 /** 141 * Indicates if this apk is a sdk. 142 */ 143 private final boolean mIsSdkLibrary; 144 145 /** 146 * Indicates if this apk is a static library. 147 */ 148 private final boolean mIsStaticLibrary; 149 150 /** 151 * List of SDK names used by this apk. 152 */ 153 private final @NonNull List<String> mUsesSdkLibraries; 154 155 /** 156 * List of SDK major versions used by this apk. 157 */ 158 private final @Nullable long[] mUsesSdkLibrariesVersionsMajor; 159 160 /** 161 * List of SDK certificates used by this apk. 162 */ 163 private final @Nullable String[][] mUsesSdkLibrariesCertDigests; 164 165 private final @NonNull List<String> mUsesStaticLibraries; 166 167 private final @Nullable long[] mUsesStaticLibrariesVersions; 168 169 private final @Nullable String[][] mUsesStaticLibrariesCertDigests; 170 171 /** 172 * Indicates if this system app can be updated. 173 */ 174 private final boolean mUpdatableSystem; 175 176 /** 177 * Name of the emergency installer for the designated system app. 178 */ 179 private final @Nullable String mEmergencyInstaller; 180 181 private final @NonNull List<SharedLibraryInfo> mDeclaredLibraries; 182 183 /** 184 * Archival install info. 185 */ 186 private final @Nullable ArchivedPackageParcel mArchivedPackage; 187 188 /** 189 * pageSizeCompat info from manifest file 190 */ 191 private final int mPageSizeCompat; 192 ApkLite(String path, String packageName, String splitName, boolean isFeatureSplit, String configForSplit, String usesSplitName, boolean isSplitRequired, int versionCode, int versionCodeMajor, int revisionCode, int installLocation, List<VerifierInfo> verifiers, SigningDetails signingDetails, boolean coreApp, boolean debuggable, boolean profileableByShell, boolean multiArch, boolean use32bitAbi, boolean useEmbeddedDex, boolean extractNativeLibs, boolean isolatedSplits, String targetPackageName, boolean overlayIsStatic, int overlayPriority, String requiredSystemPropertyName, String requiredSystemPropertyValue, int minSdkVersion, int targetSdkVersion, int rollbackDataPolicy, Set<String> requiredSplitTypes, Set<String> splitTypes, boolean hasDeviceAdminReceiver, boolean isSdkLibrary, List<String> usesSdkLibraries, long[] usesSdkLibrariesVersionsMajor, String[][] usesSdkLibrariesCertDigests, boolean isStaticLibrary, List<String> usesStaticLibraries, long[] usesStaticLibrariesVersionsMajor, String[][] usesStaticLibrariesCertDigests, boolean updatableSystem, String emergencyInstaller, List<SharedLibraryInfo> declaredLibraries, int pageSizeCompat)193 public ApkLite(String path, String packageName, String splitName, boolean isFeatureSplit, 194 String configForSplit, String usesSplitName, boolean isSplitRequired, int versionCode, 195 int versionCodeMajor, int revisionCode, int installLocation, 196 List<VerifierInfo> verifiers, SigningDetails signingDetails, boolean coreApp, 197 boolean debuggable, boolean profileableByShell, boolean multiArch, boolean use32bitAbi, 198 boolean useEmbeddedDex, boolean extractNativeLibs, boolean isolatedSplits, 199 String targetPackageName, boolean overlayIsStatic, int overlayPriority, 200 String requiredSystemPropertyName, String requiredSystemPropertyValue, 201 int minSdkVersion, int targetSdkVersion, int rollbackDataPolicy, 202 Set<String> requiredSplitTypes, Set<String> splitTypes, 203 boolean hasDeviceAdminReceiver, boolean isSdkLibrary, 204 List<String> usesSdkLibraries, long[] usesSdkLibrariesVersionsMajor, 205 String[][] usesSdkLibrariesCertDigests, boolean isStaticLibrary, 206 List<String> usesStaticLibraries, long[] usesStaticLibrariesVersionsMajor, 207 String[][] usesStaticLibrariesCertDigests, 208 boolean updatableSystem, 209 String emergencyInstaller, List<SharedLibraryInfo> declaredLibraries, 210 int pageSizeCompat) { 211 mPath = path; 212 mPackageName = packageName; 213 mSplitName = splitName; 214 mSplitTypes = splitTypes; 215 mFeatureSplit = isFeatureSplit; 216 mConfigForSplit = configForSplit; 217 mUsesSplitName = usesSplitName; 218 mRequiredSplitTypes = requiredSplitTypes; 219 mSplitRequired = (isSplitRequired || hasAnyRequiredSplitTypes()); 220 mVersionCode = versionCode; 221 mVersionCodeMajor = versionCodeMajor; 222 mRevisionCode = revisionCode; 223 mInstallLocation = installLocation; 224 mVerifiers = verifiers.toArray(new VerifierInfo[verifiers.size()]); 225 mSigningDetails = signingDetails; 226 mCoreApp = coreApp; 227 mDebuggable = debuggable; 228 mProfileableByShell = profileableByShell; 229 mMultiArch = multiArch; 230 mUse32bitAbi = use32bitAbi; 231 mUseEmbeddedDex = useEmbeddedDex; 232 mExtractNativeLibs = extractNativeLibs; 233 mIsolatedSplits = isolatedSplits; 234 mTargetPackageName = targetPackageName; 235 mOverlayIsStatic = overlayIsStatic; 236 mOverlayPriority = overlayPriority; 237 mRequiredSystemPropertyName = requiredSystemPropertyName; 238 mRequiredSystemPropertyValue = requiredSystemPropertyValue; 239 mMinSdkVersion = minSdkVersion; 240 mTargetSdkVersion = targetSdkVersion; 241 mRollbackDataPolicy = rollbackDataPolicy; 242 mHasDeviceAdminReceiver = hasDeviceAdminReceiver; 243 mIsSdkLibrary = isSdkLibrary; 244 mIsStaticLibrary = isStaticLibrary; 245 mUsesSdkLibraries = usesSdkLibraries; 246 mUsesSdkLibrariesVersionsMajor = usesSdkLibrariesVersionsMajor; 247 mUsesSdkLibrariesCertDigests = usesSdkLibrariesCertDigests; 248 mUsesStaticLibraries = usesStaticLibraries; 249 mUsesStaticLibrariesVersions = usesStaticLibrariesVersionsMajor; 250 mUsesStaticLibrariesCertDigests = usesStaticLibrariesCertDigests; 251 mUpdatableSystem = updatableSystem; 252 mEmergencyInstaller = emergencyInstaller; 253 mArchivedPackage = null; 254 mDeclaredLibraries = declaredLibraries; 255 mPageSizeCompat = pageSizeCompat; 256 } 257 ApkLite(String path, ArchivedPackageParcel archivedPackage)258 public ApkLite(String path, ArchivedPackageParcel archivedPackage) { 259 mPath = path; 260 mPackageName = archivedPackage.packageName; 261 mSplitName = null; // base.apk 262 mSplitTypes = null; 263 mFeatureSplit = false; 264 mConfigForSplit = null; 265 mUsesSplitName = null; 266 mRequiredSplitTypes = null; 267 mSplitRequired = hasAnyRequiredSplitTypes(); 268 mVersionCode = archivedPackage.versionCode; 269 mVersionCodeMajor = archivedPackage.versionCodeMajor; 270 mRevisionCode = 0; 271 mInstallLocation = PackageInfo.INSTALL_LOCATION_UNSPECIFIED; 272 mVerifiers = new VerifierInfo[]{}; 273 mSigningDetails = archivedPackage.signingDetails; 274 mCoreApp = false; 275 mDebuggable = false; 276 mProfileableByShell = false; 277 mMultiArch = false; 278 mUse32bitAbi = false; 279 mUseEmbeddedDex = false; 280 mExtractNativeLibs = false; 281 mIsolatedSplits = false; 282 mTargetPackageName = null; 283 mOverlayIsStatic = false; 284 mOverlayPriority = 0; 285 mRequiredSystemPropertyName = null; 286 mRequiredSystemPropertyValue = null; 287 mMinSdkVersion = ApkLiteParseUtils.DEFAULT_MIN_SDK_VERSION; 288 mTargetSdkVersion = archivedPackage.targetSdkVersion; 289 mRollbackDataPolicy = 0; 290 mHasDeviceAdminReceiver = false; 291 mIsSdkLibrary = false; 292 mIsStaticLibrary = false; 293 mUsesSdkLibraries = Collections.emptyList(); 294 mUsesSdkLibrariesVersionsMajor = null; 295 mUsesSdkLibrariesCertDigests = null; 296 mUsesStaticLibraries = Collections.emptyList(); 297 mUsesStaticLibrariesVersions = null; 298 mUsesStaticLibrariesCertDigests = null; 299 mUpdatableSystem = true; 300 mEmergencyInstaller = null; 301 mArchivedPackage = archivedPackage; 302 mDeclaredLibraries = null; 303 mPageSizeCompat = ApplicationInfo.PAGE_SIZE_APP_COMPAT_FLAG_UNDEFINED; 304 } 305 306 /** 307 * Return {@link #mVersionCode} and {@link #mVersionCodeMajor} combined together as a 308 * single long value. The {@link #mVersionCodeMajor} is placed in the upper 32 bits. 309 */ getLongVersionCode()310 public long getLongVersionCode() { 311 return PackageInfo.composeLongVersionCode(mVersionCodeMajor, mVersionCode); 312 } 313 314 /** 315 * Return if requiredSplitTypes presents. 316 */ hasAnyRequiredSplitTypes()317 private boolean hasAnyRequiredSplitTypes() { 318 return !CollectionUtils.isEmpty(mRequiredSplitTypes); 319 } 320 321 322 323 // Code below generated by codegen v1.0.23. 324 // 325 // DO NOT MODIFY! 326 // CHECKSTYLE:OFF Generated code 327 // 328 // To regenerate run: 329 // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/content/pm/parsing/ApkLite.java 330 // 331 // To exclude the generated code from IntelliJ auto-formatting enable (one-time): 332 // Settings > Editor > Code Style > Formatter Control 333 //@formatter:off 334 335 336 /** 337 * Name of the package as used to identify it in the system 338 */ 339 @DataClass.Generated.Member getPackageName()340 public @NonNull String getPackageName() { 341 return mPackageName; 342 } 343 344 /** 345 * Path where this APK file was found on disk 346 */ 347 @DataClass.Generated.Member getPath()348 public @NonNull String getPath() { 349 return mPath; 350 } 351 352 /** 353 * Split name of this APK 354 */ 355 @DataClass.Generated.Member getSplitName()356 public @Nullable String getSplitName() { 357 return mSplitName; 358 } 359 360 /** 361 * Name of the split APK that this APK depends on 362 */ 363 @DataClass.Generated.Member getUsesSplitName()364 public @Nullable String getUsesSplitName() { 365 return mUsesSplitName; 366 } 367 368 /** 369 * Name of the split APK that this APK is a configuration for 370 */ 371 @DataClass.Generated.Member getConfigForSplit()372 public @Nullable String getConfigForSplit() { 373 return mConfigForSplit; 374 } 375 376 /** 377 * Indicate the types of the required split are necessary for this package to run 378 */ 379 @DataClass.Generated.Member getRequiredSplitTypes()380 public @Nullable Set<String> getRequiredSplitTypes() { 381 return mRequiredSplitTypes; 382 } 383 384 /** 385 * Split types of this APK 386 */ 387 @DataClass.Generated.Member getSplitTypes()388 public @Nullable Set<String> getSplitTypes() { 389 return mSplitTypes; 390 } 391 392 /** 393 * Major version number of this package 394 */ 395 @DataClass.Generated.Member getVersionCodeMajor()396 public int getVersionCodeMajor() { 397 return mVersionCodeMajor; 398 } 399 400 /** 401 * Minor version number of this package 402 */ 403 @DataClass.Generated.Member getVersionCode()404 public int getVersionCode() { 405 return mVersionCode; 406 } 407 408 /** 409 * Revision code of this APK 410 */ 411 @DataClass.Generated.Member getRevisionCode()412 public int getRevisionCode() { 413 return mRevisionCode; 414 } 415 416 /** 417 * Indicate the install location of this package 418 * 419 * @see {@link PackageInfo#INSTALL_LOCATION_AUTO} 420 * @see {@link PackageInfo#INSTALL_LOCATION_INTERNAL_ONLY} 421 * @see {@link PackageInfo#INSTALL_LOCATION_PREFER_EXTERNAL} 422 */ 423 @DataClass.Generated.Member getInstallLocation()424 public int getInstallLocation() { 425 return mInstallLocation; 426 } 427 428 /** 429 * Indicate the minimum SDK version number that the app requires 430 */ 431 @DataClass.Generated.Member getMinSdkVersion()432 public int getMinSdkVersion() { 433 return mMinSdkVersion; 434 } 435 436 /** 437 * Indicate the SDK version number that the application is targeting 438 */ 439 @DataClass.Generated.Member getTargetSdkVersion()440 public int getTargetSdkVersion() { 441 return mTargetSdkVersion; 442 } 443 444 /** 445 * Information about a package verifiers as used during package verification 446 */ 447 @DataClass.Generated.Member getVerifiers()448 public @NonNull VerifierInfo[] getVerifiers() { 449 return mVerifiers; 450 } 451 452 /** 453 * Signing-related data of an application package 454 */ 455 @DataClass.Generated.Member getSigningDetails()456 public @NonNull SigningDetails getSigningDetails() { 457 return mSigningDetails; 458 } 459 460 /** 461 * Indicate whether this APK is a 'feature' split 462 */ 463 @DataClass.Generated.Member isFeatureSplit()464 public boolean isFeatureSplit() { 465 return mFeatureSplit; 466 } 467 468 /** 469 * Indicate whether each split should be load into their own Context objects 470 */ 471 @DataClass.Generated.Member isIsolatedSplits()472 public boolean isIsolatedSplits() { 473 return mIsolatedSplits; 474 } 475 476 /** 477 * Indicate whether this package requires at least one split (either feature or resource) 478 * to be present in order to function 479 */ 480 @DataClass.Generated.Member isSplitRequired()481 public boolean isSplitRequired() { 482 return mSplitRequired; 483 } 484 485 /** 486 * Indicate whether this app is coreApp 487 */ 488 @DataClass.Generated.Member isCoreApp()489 public boolean isCoreApp() { 490 return mCoreApp; 491 } 492 493 /** 494 * Indicate whether this app can be debugged 495 */ 496 @DataClass.Generated.Member isDebuggable()497 public boolean isDebuggable() { 498 return mDebuggable; 499 } 500 501 /** 502 * Indicate whether this app is profileable by Shell 503 */ 504 @DataClass.Generated.Member isProfileableByShell()505 public boolean isProfileableByShell() { 506 return mProfileableByShell; 507 } 508 509 /** 510 * Indicate whether this app needs to be loaded into other applications' processes 511 */ 512 @DataClass.Generated.Member isMultiArch()513 public boolean isMultiArch() { 514 return mMultiArch; 515 } 516 517 /** 518 * Indicate whether the 32 bit version of the ABI should be used 519 */ 520 @DataClass.Generated.Member isUse32bitAbi()521 public boolean isUse32bitAbi() { 522 return mUse32bitAbi; 523 } 524 525 /** 526 * Indicate whether installer extracts native libraries 527 */ 528 @DataClass.Generated.Member isExtractNativeLibs()529 public boolean isExtractNativeLibs() { 530 return mExtractNativeLibs; 531 } 532 533 /** 534 * Indicate whether this package wants to run the dex within its APK but not extracted 535 * or locally compiled variants. 536 */ 537 @DataClass.Generated.Member isUseEmbeddedDex()538 public boolean isUseEmbeddedDex() { 539 return mUseEmbeddedDex; 540 } 541 542 /** 543 * Name of the overlay-able set of elements package 544 */ 545 @DataClass.Generated.Member getTargetPackageName()546 public @Nullable String getTargetPackageName() { 547 return mTargetPackageName; 548 } 549 550 /** 551 * Indicate whether the overlay is static 552 */ 553 @DataClass.Generated.Member isOverlayIsStatic()554 public boolean isOverlayIsStatic() { 555 return mOverlayIsStatic; 556 } 557 558 /** 559 * Indicate the priority of this overlay package 560 */ 561 @DataClass.Generated.Member getOverlayPriority()562 public int getOverlayPriority() { 563 return mOverlayPriority; 564 } 565 566 /** 567 * A comma separated list of system property names to control whether the overlay should be 568 * excluded based on the system property condition. 569 */ 570 @DataClass.Generated.Member getRequiredSystemPropertyName()571 public @Nullable String getRequiredSystemPropertyName() { 572 return mRequiredSystemPropertyName; 573 } 574 575 /** 576 * A comma separated list of system property values to control whether the overlay should be 577 * excluded based on the system property condition. 578 */ 579 @DataClass.Generated.Member getRequiredSystemPropertyValue()580 public @Nullable String getRequiredSystemPropertyValue() { 581 return mRequiredSystemPropertyValue; 582 } 583 584 /** 585 * Indicate the policy to deal with user data when rollback is committed 586 * 587 * @see {@link PackageManager#ROLLBACK_DATA_POLICY_RESTORE} 588 * @see {@link PackageManager#ROLLBACK_DATA_POLICY_WIPE} 589 * @see {@link PackageManager#ROLLBACK_DATA_POLICY_RETAIN} 590 */ 591 @DataClass.Generated.Member getRollbackDataPolicy()592 public int getRollbackDataPolicy() { 593 return mRollbackDataPolicy; 594 } 595 596 /** 597 * Indicates if this app contains a {@link android.app.admin.DeviceAdminReceiver}. 598 */ 599 @DataClass.Generated.Member isHasDeviceAdminReceiver()600 public boolean isHasDeviceAdminReceiver() { 601 return mHasDeviceAdminReceiver; 602 } 603 604 /** 605 * Indicates if this apk is a sdk. 606 */ 607 @DataClass.Generated.Member isIsSdkLibrary()608 public boolean isIsSdkLibrary() { 609 return mIsSdkLibrary; 610 } 611 612 /** 613 * Indicates if this apk is a static library. 614 */ 615 @DataClass.Generated.Member isIsStaticLibrary()616 public boolean isIsStaticLibrary() { 617 return mIsStaticLibrary; 618 } 619 620 /** 621 * List of SDK names used by this apk. 622 */ 623 @DataClass.Generated.Member getUsesSdkLibraries()624 public @NonNull List<String> getUsesSdkLibraries() { 625 return mUsesSdkLibraries; 626 } 627 628 /** 629 * List of SDK major versions used by this apk. 630 */ 631 @DataClass.Generated.Member getUsesSdkLibrariesVersionsMajor()632 public @Nullable long[] getUsesSdkLibrariesVersionsMajor() { 633 return mUsesSdkLibrariesVersionsMajor; 634 } 635 636 /** 637 * List of SDK certificates used by this apk. 638 */ 639 @DataClass.Generated.Member getUsesSdkLibrariesCertDigests()640 public @Nullable String[][] getUsesSdkLibrariesCertDigests() { 641 return mUsesSdkLibrariesCertDigests; 642 } 643 644 @DataClass.Generated.Member getUsesStaticLibraries()645 public @NonNull List<String> getUsesStaticLibraries() { 646 return mUsesStaticLibraries; 647 } 648 649 @DataClass.Generated.Member getUsesStaticLibrariesVersions()650 public @Nullable long[] getUsesStaticLibrariesVersions() { 651 return mUsesStaticLibrariesVersions; 652 } 653 654 @DataClass.Generated.Member getUsesStaticLibrariesCertDigests()655 public @Nullable String[][] getUsesStaticLibrariesCertDigests() { 656 return mUsesStaticLibrariesCertDigests; 657 } 658 659 /** 660 * Indicates if this system app can be updated. 661 */ 662 @DataClass.Generated.Member isUpdatableSystem()663 public boolean isUpdatableSystem() { 664 return mUpdatableSystem; 665 } 666 667 /** 668 * Name of the emergency installer for the designated system app. 669 */ 670 @DataClass.Generated.Member getEmergencyInstaller()671 public @Nullable String getEmergencyInstaller() { 672 return mEmergencyInstaller; 673 } 674 675 @DataClass.Generated.Member getDeclaredLibraries()676 public @NonNull List<SharedLibraryInfo> getDeclaredLibraries() { 677 return mDeclaredLibraries; 678 } 679 680 /** 681 * Archival install info. 682 */ 683 @DataClass.Generated.Member getArchivedPackage()684 public @Nullable ArchivedPackageParcel getArchivedPackage() { 685 return mArchivedPackage; 686 } 687 688 /** 689 * pageSizeCompat info from manifest file 690 */ 691 @DataClass.Generated.Member getPageSizeCompat()692 public int getPageSizeCompat() { 693 return mPageSizeCompat; 694 } 695 696 @DataClass.Generated( 697 time = 1738189581427L, 698 codegenVersion = "1.0.23", 699 sourceFile = "frameworks/base/core/java/android/content/pm/parsing/ApkLite.java", 700 inputSignatures = "private final @android.annotation.NonNull java.lang.String mPackageName\nprivate final @android.annotation.NonNull java.lang.String mPath\nprivate final @android.annotation.Nullable java.lang.String mSplitName\nprivate final @android.annotation.Nullable java.lang.String mUsesSplitName\nprivate final @android.annotation.Nullable java.lang.String mConfigForSplit\nprivate final @android.annotation.Nullable java.util.Set<java.lang.String> mRequiredSplitTypes\nprivate final @android.annotation.Nullable java.util.Set<java.lang.String> mSplitTypes\nprivate final int mVersionCodeMajor\nprivate final int mVersionCode\nprivate final int mRevisionCode\nprivate final int mInstallLocation\nprivate final int mMinSdkVersion\nprivate final int mTargetSdkVersion\nprivate final @android.annotation.NonNull android.content.pm.VerifierInfo[] mVerifiers\nprivate final @android.annotation.NonNull android.content.pm.SigningDetails mSigningDetails\nprivate final boolean mFeatureSplit\nprivate final boolean mIsolatedSplits\nprivate final boolean mSplitRequired\nprivate final boolean mCoreApp\nprivate final boolean mDebuggable\nprivate final boolean mProfileableByShell\nprivate final boolean mMultiArch\nprivate final boolean mUse32bitAbi\nprivate final boolean mExtractNativeLibs\nprivate final boolean mUseEmbeddedDex\nprivate final @android.annotation.Nullable java.lang.String mTargetPackageName\nprivate final boolean mOverlayIsStatic\nprivate final int mOverlayPriority\nprivate final @android.annotation.Nullable java.lang.String mRequiredSystemPropertyName\nprivate final @android.annotation.Nullable java.lang.String mRequiredSystemPropertyValue\nprivate final int mRollbackDataPolicy\nprivate final boolean mHasDeviceAdminReceiver\nprivate final boolean mIsSdkLibrary\nprivate final boolean mIsStaticLibrary\nprivate final @android.annotation.NonNull java.util.List<java.lang.String> mUsesSdkLibraries\nprivate final @android.annotation.Nullable long[] mUsesSdkLibrariesVersionsMajor\nprivate final @android.annotation.Nullable java.lang.String[][] mUsesSdkLibrariesCertDigests\nprivate final @android.annotation.NonNull java.util.List<java.lang.String> mUsesStaticLibraries\nprivate final @android.annotation.Nullable long[] mUsesStaticLibrariesVersions\nprivate final @android.annotation.Nullable java.lang.String[][] mUsesStaticLibrariesCertDigests\nprivate final boolean mUpdatableSystem\nprivate final @android.annotation.Nullable java.lang.String mEmergencyInstaller\nprivate final @android.annotation.NonNull java.util.List<android.content.pm.SharedLibraryInfo> mDeclaredLibraries\nprivate final @android.annotation.Nullable android.content.pm.ArchivedPackageParcel mArchivedPackage\nprivate final int mPageSizeCompat\npublic long getLongVersionCode()\nprivate boolean hasAnyRequiredSplitTypes()\nclass ApkLite extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genConstructor=false, genConstDefs=false)") 701 @Deprecated __metadata()702 private void __metadata() {} 703 704 705 //@formatter:on 706 // End of generated code 707 708 } 709