| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.content.pm.parsing; |
| 18 |
|
| 19 |
import android.annotation.NonNull; |
| 20 |
import android.annotation.Nullable; |
| 21 |
import android.content.pm.PackageInfo; |
| 22 |
import android.content.pm.PackageManager; |
| 23 |
import android.content.pm.SigningDetails; |
| 24 |
import android.content.pm.VerifierInfo; |
| 25 |
|
| 26 |
import com.android.internal.util.CollectionUtils; |
| 27 |
import com.android.internal.util.DataClass; |
| 28 |
|
| 29 |
import java.util.List; |
| 30 |
import java.util.Set; |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
@DataClass(genConstructor = false, genConstDefs = false) |
| 38 |
public class ApkLite { |
| 39 |
|
| 40 |
private final @NonNull String mPackageName; |
| 41 |
|
| 42 |
private final @NonNull String mPath; |
| 43 |
|
| 44 |
private final @Nullable String mSplitName; |
| 45 |
|
| 46 |
|
| 47 |
private final @Nullable String mUsesSplitName; |
| 48 |
|
| 49 |
private final @Nullable String mConfigForSplit; |
| 50 |
|
| 51 |
private final @Nullable Set<String> mRequiredSplitTypes; |
| 52 |
|
| 53 |
private final @Nullable Set<String> mSplitTypes; |
| 54 |
|
| 55 |
|
| 56 |
private final int mVersionCodeMajor; |
| 57 |
|
| 58 |
private final int mVersionCode; |
| 59 |
|
| 60 |
private final int mRevisionCode; |
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
private final int mInstallLocation; |
| 69 |
|
| 70 |
private final int mMinSdkVersion; |
| 71 |
|
| 72 |
private final int mTargetSdkVersion; |
| 73 |
|
| 74 |
private final @NonNull VerifierInfo[] mVerifiers; |
| 75 |
|
| 76 |
private final @NonNull SigningDetails mSigningDetails; |
| 77 |
|
| 78 |
|
| 79 |
private final boolean mFeatureSplit; |
| 80 |
|
| 81 |
private final boolean mIsolatedSplits; |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
|
| 86 |
private final boolean mSplitRequired; |
| 87 |
|
| 88 |
private final boolean mCoreApp; |
| 89 |
|
| 90 |
private final boolean mDebuggable; |
| 91 |
|
| 92 |
private final boolean mProfileableByShell; |
| 93 |
|
| 94 |
private final boolean mMultiArch; |
| 95 |
|
| 96 |
private final boolean mUse32bitAbi; |
| 97 |
|
| 98 |
private final boolean mExtractNativeLibs; |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
private final boolean mUseEmbeddedDex; |
| 104 |
|
| 105 |
|
| 106 |
private final @Nullable String mTargetPackageName; |
| 107 |
|
| 108 |
private final boolean mOverlayIsStatic; |
| 109 |
|
| 110 |
private final int mOverlayPriority; |
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
private final @Nullable String mRequiredSystemPropertyName; |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
private final @Nullable String mRequiredSystemPropertyValue; |
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
|
| 127 |
|
| 128 |
|
| 129 |
private final int mRollbackDataPolicy; |
| 130 |
|
| 131 |
|
| 132 |
|
| 133 |
|
| 134 |
private final boolean mHasDeviceAdminReceiver; |
| 135 |
|
| 136 |
|
| 137 |
|
| 138 |
|
| 139 |
private final boolean mIsSdkLibrary; |
| 140 |
|
| 141 |
public ApkLite(String path, String packageName, String splitName, boolean isFeatureSplit, |
| 142 |
String configForSplit, String usesSplitName, boolean isSplitRequired, int versionCode, |
| 143 |
int versionCodeMajor, int revisionCode, int installLocation, |
| 144 |
List<VerifierInfo> verifiers, SigningDetails signingDetails, boolean coreApp, |
| 145 |
boolean debuggable, boolean profileableByShell, boolean multiArch, boolean use32bitAbi, |
| 146 |
boolean useEmbeddedDex, boolean extractNativeLibs, boolean isolatedSplits, |
| 147 |
String targetPackageName, boolean overlayIsStatic, int overlayPriority, |
| 148 |
String requiredSystemPropertyName, String requiredSystemPropertyValue, |
| 149 |
int minSdkVersion, int targetSdkVersion, int rollbackDataPolicy, |
| 150 |
Set<String> requiredSplitTypes, Set<String> splitTypes, |
| 151 |
boolean hasDeviceAdminReceiver, boolean isSdkLibrary) { |
| 152 |
mPath = path; |
| 153 |
mPackageName = packageName; |
| 154 |
mSplitName = splitName; |
| 155 |
mSplitTypes = splitTypes; |
| 156 |
mFeatureSplit = isFeatureSplit; |
| 157 |
mConfigForSplit = configForSplit; |
| 158 |
mUsesSplitName = usesSplitName; |
| 159 |
mRequiredSplitTypes = requiredSplitTypes; |
| 160 |
mSplitRequired = (isSplitRequired || hasAnyRequiredSplitTypes()); |
| 161 |
mVersionCode = versionCode; |
| 162 |
mVersionCodeMajor = versionCodeMajor; |
| 163 |
mRevisionCode = revisionCode; |
| 164 |
mInstallLocation = installLocation; |
| 165 |
mVerifiers = verifiers.toArray(new VerifierInfo[verifiers.size()]); |
| 166 |
mSigningDetails = signingDetails; |
| 167 |
mCoreApp = coreApp; |
| 168 |
mDebuggable = debuggable; |
| 169 |
mProfileableByShell = profileableByShell; |
| 170 |
mMultiArch = multiArch; |
| 171 |
mUse32bitAbi = use32bitAbi; |
| 172 |
mUseEmbeddedDex = useEmbeddedDex; |
| 173 |
mExtractNativeLibs = extractNativeLibs; |
| 174 |
mIsolatedSplits = isolatedSplits; |
| 175 |
mTargetPackageName = targetPackageName; |
| 176 |
mOverlayIsStatic = overlayIsStatic; |
| 177 |
mOverlayPriority = overlayPriority; |
| 178 |
mRequiredSystemPropertyName = requiredSystemPropertyName; |
| 179 |
mRequiredSystemPropertyValue = requiredSystemPropertyValue; |
| 180 |
mMinSdkVersion = minSdkVersion; |
| 181 |
mTargetSdkVersion = targetSdkVersion; |
| 182 |
mRollbackDataPolicy = rollbackDataPolicy; |
| 183 |
mHasDeviceAdminReceiver = hasDeviceAdminReceiver; |
| 184 |
mIsSdkLibrary = isSdkLibrary; |
| 185 |
} |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
public long getLongVersionCode() { |
| 192 |
return PackageInfo.composeLongVersionCode(mVersionCodeMajor, mVersionCode); |
| 193 |
} |
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
private boolean hasAnyRequiredSplitTypes() { |
| 199 |
return !CollectionUtils.isEmpty(mRequiredSplitTypes); |
| 200 |
} |
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
@DataClass.Generated.Member |
| 221 |
public @NonNull String getPackageName() { |
| 222 |
return mPackageName; |
| 223 |
} |
| 224 |
|
| 225 |
|
| 226 |
|
| 227 |
|
| 228 |
@DataClass.Generated.Member |
| 229 |
public @NonNull String getPath() { |
| 230 |
return mPath; |
| 231 |
} |
| 232 |
|
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
@DataClass.Generated.Member |
| 237 |
public @Nullable String getSplitName() { |
| 238 |
return mSplitName; |
| 239 |
} |
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
@DataClass.Generated.Member |
| 245 |
public @Nullable String getUsesSplitName() { |
| 246 |
return mUsesSplitName; |
| 247 |
} |
| 248 |
|
| 249 |
|
| 250 |
|
| 251 |
|
| 252 |
@DataClass.Generated.Member |
| 253 |
public @Nullable String getConfigForSplit() { |
| 254 |
return mConfigForSplit; |
| 255 |
} |
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
|
| 260 |
@DataClass.Generated.Member |
| 261 |
public @Nullable Set<String> getRequiredSplitTypes() { |
| 262 |
return mRequiredSplitTypes; |
| 263 |
} |
| 264 |
|
| 265 |
|
| 266 |
|
| 267 |
|
| 268 |
@DataClass.Generated.Member |
| 269 |
public @Nullable Set<String> getSplitTypes() { |
| 270 |
return mSplitTypes; |
| 271 |
} |
| 272 |
|
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
@DataClass.Generated.Member |
| 277 |
public int getVersionCodeMajor() { |
| 278 |
return mVersionCodeMajor; |
| 279 |
} |
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
@DataClass.Generated.Member |
| 285 |
public int getVersionCode() { |
| 286 |
return mVersionCode; |
| 287 |
} |
| 288 |
|
| 289 |
|
| 290 |
|
| 291 |
|
| 292 |
@DataClass.Generated.Member |
| 293 |
public int getRevisionCode() { |
| 294 |
return mRevisionCode; |
| 295 |
} |
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
|
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
@DataClass.Generated.Member |
| 305 |
public int getInstallLocation() { |
| 306 |
return mInstallLocation; |
| 307 |
} |
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
@DataClass.Generated.Member |
| 313 |
public int getMinSdkVersion() { |
| 314 |
return mMinSdkVersion; |
| 315 |
} |
| 316 |
|
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
@DataClass.Generated.Member |
| 321 |
public int getTargetSdkVersion() { |
| 322 |
return mTargetSdkVersion; |
| 323 |
} |
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
@DataClass.Generated.Member |
| 329 |
public @NonNull VerifierInfo[] getVerifiers() { |
| 330 |
return mVerifiers; |
| 331 |
} |
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
@DataClass.Generated.Member |
| 337 |
public @NonNull SigningDetails getSigningDetails() { |
| 338 |
return mSigningDetails; |
| 339 |
} |
| 340 |
|
| 341 |
|
| 342 |
|
| 343 |
|
| 344 |
@DataClass.Generated.Member |
| 345 |
public boolean isFeatureSplit() { |
| 346 |
return mFeatureSplit; |
| 347 |
} |
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
@DataClass.Generated.Member |
| 353 |
public boolean isIsolatedSplits() { |
| 354 |
return mIsolatedSplits; |
| 355 |
} |
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
@DataClass.Generated.Member |
| 362 |
public boolean isSplitRequired() { |
| 363 |
return mSplitRequired; |
| 364 |
} |
| 365 |
|
| 366 |
|
| 367 |
|
| 368 |
|
| 369 |
@DataClass.Generated.Member |
| 370 |
public boolean isCoreApp() { |
| 371 |
return mCoreApp; |
| 372 |
} |
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
|
| 377 |
@DataClass.Generated.Member |
| 378 |
public boolean isDebuggable() { |
| 379 |
return mDebuggable; |
| 380 |
} |
| 381 |
|
| 382 |
|
| 383 |
|
| 384 |
|
| 385 |
@DataClass.Generated.Member |
| 386 |
public boolean isProfileableByShell() { |
| 387 |
return mProfileableByShell; |
| 388 |
} |
| 389 |
|
| 390 |
|
| 391 |
|
| 392 |
|
| 393 |
@DataClass.Generated.Member |
| 394 |
public boolean isMultiArch() { |
| 395 |
return mMultiArch; |
| 396 |
} |
| 397 |
|
| 398 |
|
| 399 |
|
| 400 |
|
| 401 |
@DataClass.Generated.Member |
| 402 |
public boolean isUse32bitAbi() { |
| 403 |
return mUse32bitAbi; |
| 404 |
} |
| 405 |
|
| 406 |
|
| 407 |
|
| 408 |
|
| 409 |
@DataClass.Generated.Member |
| 410 |
public boolean isExtractNativeLibs() { |
| 411 |
return mExtractNativeLibs; |
| 412 |
} |
| 413 |
|
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
|
| 418 |
@DataClass.Generated.Member |
| 419 |
public boolean isUseEmbeddedDex() { |
| 420 |
return mUseEmbeddedDex; |
| 421 |
} |
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
@DataClass.Generated.Member |
| 427 |
public @Nullable String getTargetPackageName() { |
| 428 |
return mTargetPackageName; |
| 429 |
} |
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
@DataClass.Generated.Member |
| 435 |
public boolean isOverlayIsStatic() { |
| 436 |
return mOverlayIsStatic; |
| 437 |
} |
| 438 |
|
| 439 |
|
| 440 |
|
| 441 |
|
| 442 |
@DataClass.Generated.Member |
| 443 |
public int getOverlayPriority() { |
| 444 |
return mOverlayPriority; |
| 445 |
} |
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
@DataClass.Generated.Member |
| 452 |
public @Nullable String getRequiredSystemPropertyName() { |
| 453 |
return mRequiredSystemPropertyName; |
| 454 |
} |
| 455 |
|
| 456 |
|
| 457 |
|
| 458 |
|
| 459 |
|
| 460 |
@DataClass.Generated.Member |
| 461 |
public @Nullable String getRequiredSystemPropertyValue() { |
| 462 |
return mRequiredSystemPropertyValue; |
| 463 |
} |
| 464 |
|
| 465 |
|
| 466 |
|
| 467 |
|
| 468 |
|
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
@DataClass.Generated.Member |
| 473 |
public int getRollbackDataPolicy() { |
| 474 |
return mRollbackDataPolicy; |
| 475 |
} |
| 476 |
|
| 477 |
@DataClass.Generated.Member |
| 478 |
public boolean isHasDeviceAdminReceiver() { |
| 479 |
return mHasDeviceAdminReceiver; |
| 480 |
} |
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
@DataClass.Generated.Member |
| 486 |
public boolean isIsSdkLibrary() { |
| 487 |
return mIsSdkLibrary; |
| 488 |
} |
| 489 |
|
| 490 |
@DataClass.Generated( |
| 491 |
time = 1643063342990L, |
| 492 |
codegenVersion = "1.0.23", |
| 493 |
sourceFile = "frameworks/base/core/java/android/content/pm/parsing/ApkLite.java", |
| 494 |
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\npublic long getLongVersionCode()\nprivate boolean hasAnyRequiredSplitTypes()\nclass ApkLite extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genConstructor=false, genConstDefs=false)") |
| 495 |
@Deprecated |
| 496 |
private void __metadata() {} |
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
} |