• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2020 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;
18 
19 import android.annotation.Dimension;
20 import android.annotation.DrawableRes;
21 import android.annotation.NonNull;
22 import android.annotation.Nullable;
23 import android.annotation.StringRes;
24 import android.annotation.StyleRes;
25 import android.annotation.SystemApi;
26 import android.annotation.XmlRes;
27 import android.content.ComponentName;
28 import android.content.Intent;
29 import android.content.pm.ActivityInfo;
30 import android.content.pm.ApplicationInfo;
31 import android.content.pm.ConfigurationInfo;
32 import android.content.pm.FeatureGroupInfo;
33 import android.content.pm.FeatureInfo;
34 import android.content.pm.InstrumentationInfo;
35 import android.content.pm.PackageInfo;
36 import android.content.pm.PackageManager;
37 import android.content.pm.PermissionInfo;
38 import android.content.pm.ProviderInfo;
39 import android.content.pm.ServiceInfo;
40 import android.content.pm.SigningDetails;
41 import android.os.Bundle;
42 import android.os.storage.StorageManager;
43 import android.processor.immutability.Immutable;
44 import android.util.ArraySet;
45 import android.util.Pair;
46 import android.util.SparseArray;
47 import android.util.SparseIntArray;
48 
49 import com.android.internal.R;
50 import com.android.internal.pm.pkg.component.ParsedActivity;
51 import com.android.internal.pm.pkg.component.ParsedApexSystemService;
52 import com.android.internal.pm.pkg.component.ParsedAttribution;
53 import com.android.internal.pm.pkg.component.ParsedInstrumentation;
54 import com.android.internal.pm.pkg.component.ParsedIntentInfo;
55 import com.android.internal.pm.pkg.component.ParsedPermission;
56 import com.android.internal.pm.pkg.component.ParsedPermissionGroup;
57 import com.android.internal.pm.pkg.component.ParsedProcess;
58 import com.android.internal.pm.pkg.component.ParsedProvider;
59 import com.android.internal.pm.pkg.component.ParsedService;
60 import com.android.internal.pm.pkg.component.ParsedUsesPermission;
61 import com.android.internal.pm.pkg.parsing.ParsingPackageUtils;
62 
63 import java.security.PublicKey;
64 import java.util.List;
65 import java.util.Map;
66 import java.util.Set;
67 import java.util.UUID;
68 
69 /**
70  * The representation of an application on disk, as parsed from its split APKs' manifests.
71  *
72  * Metadata available here is mostly device-state independent and indicates what the application
73  * author declared for their app.
74  *
75  * This is the system server in-process API equivalent of the public API {@link ApplicationInfo}.
76  * Note that because {@link ApplicationInfo} is stateful, several methods that exist on it may not
77  * be available here and need to be read through {@link PackageState} or {@link PackageUserState}.
78  *
79  * All instances of {@link AndroidPackage} are associated with a {@link PackageState}, and the
80  * only way to retrieve one is through {@link PackageState}. Note that the inverse does not apply
81  * and {@link AndroidPackage} may be null in several cases. See
82  * {@link PackageState#getAndroidPackage()}.
83  *
84  * The data available here is immutable and will throw {@link UnsupportedOperationException} if any
85  * collection type is mutated.
86  *
87  * @hide
88  */
89 @SystemApi(client = SystemApi.Client.SYSTEM_SERVER)
90 @Immutable
91 public interface AndroidPackage {
92 
93     /**
94      * @see ApplicationInfo#className
95      * @see R.styleable#AndroidManifestApplication_name
96      */
97     @Nullable
getApplicationClassName()98     String getApplicationClassName();
99 
100     /**
101      * @see ApplicationInfo#appComponentFactory
102      * @see R.styleable#AndroidManifestApplication_appComponentFactory
103      */
104     @Nullable
getAppComponentFactory()105     String getAppComponentFactory();
106 
107     /**
108      * @see ApplicationInfo#backupAgentName
109      * @see R.styleable#AndroidManifestApplication_backupAgent
110      */
111     @Nullable
getBackupAgentName()112     String getBackupAgentName();
113 
114     /**
115      * @see ApplicationInfo#banner
116      * @see R.styleable#AndroidManifestApplication_banner
117      */
118     @DrawableRes
getBannerResourceId()119     int getBannerResourceId();
120 
121     /**
122      * @see PackageInfo#baseRevisionCode
123      * @see R.styleable#AndroidManifest_revisionCode
124      */
getBaseRevisionCode()125     int getBaseRevisionCode();
126 
127     /**
128      * @see ApplicationInfo#category
129      * @see R.styleable#AndroidManifestApplication_appCategory
130      */
getCategory()131     int getCategory();
132 
133     /**
134      * @see ApplicationInfo#classLoaderName
135      * @see R.styleable#AndroidManifestApplication_classLoader
136      */
137     @Nullable
getClassLoaderName()138     String getClassLoaderName();
139 
140     /**
141      * @see ApplicationInfo#compatibleWidthLimitDp
142      * @see R.styleable#AndroidManifestSupportsScreens_compatibleWidthLimitDp
143      */
144     @Dimension(unit = Dimension.DP)
getCompatibleWidthLimitDp()145     int getCompatibleWidthLimitDp();
146 
147     /**
148      * @see ApplicationInfo#dataExtractionRulesRes
149      * @see R.styleable#AndroidManifestApplication_dataExtractionRules
150      */
151     @XmlRes
getDataExtractionRulesResourceId()152     int getDataExtractionRulesResourceId();
153 
154     /**
155      * @see ApplicationInfo#descriptionRes
156      * @see R.styleable#AndroidManifestApplication_description
157      */
158     @StringRes // This is actually format="reference"
getDescriptionResourceId()159     int getDescriptionResourceId();
160 
161     /**
162      * @see ApplicationInfo#fullBackupContent
163      * @see R.styleable#AndroidManifestApplication_fullBackupContent
164      */
165     @XmlRes
getFullBackupContentResourceId()166     int getFullBackupContentResourceId();
167 
168     /**
169      * @see ApplicationInfo#getGwpAsanMode()
170      * @see R.styleable#AndroidManifestApplication_gwpAsanMode
171      */
172     @ApplicationInfo.GwpAsanMode
getGwpAsanMode()173     int getGwpAsanMode();
174 
175     /**
176      * @see ApplicationInfo#iconRes
177      * @see R.styleable#AndroidManifestApplication_icon
178      */
179     @DrawableRes
getIconResourceId()180     int getIconResourceId();
181 
182     /**
183      * @see ApplicationInfo#labelRes
184      * @see R.styleable#AndroidManifestApplication_label
185      */
186     @StringRes
getLabelResourceId()187     int getLabelResourceId();
188 
189     /**
190      * @see ApplicationInfo#largestWidthLimitDp
191      * @see R.styleable#AndroidManifestSupportsScreens_largestWidthLimitDp
192      */
193     @Dimension(unit = Dimension.DP)
getLargestWidthLimitDp()194     int getLargestWidthLimitDp();
195 
196     /**
197      * Library names this package is declared as, for use by other packages with "uses-library".
198      *
199      * @see R.styleable#AndroidManifestLibrary
200      */
201     @NonNull
getLibraryNames()202     List<String> getLibraryNames();
203 
204     /**
205      * @see ApplicationInfo#logo
206      * @see R.styleable#AndroidManifestApplication_logo
207      */
208     @DrawableRes
getLogoResourceId()209     int getLogoResourceId();
210 
211     /**
212      * The resource ID used to provide the application's locales configuration.
213      *
214      * @see R.styleable#AndroidManifestApplication_localeConfig
215      */
216     @XmlRes
getLocaleConfigResourceId()217     int getLocaleConfigResourceId();
218 
219     /**
220      * @see PackageInfo#getLongVersionCode()
221      * @see R.styleable#AndroidManifest_versionCode
222      * @see R.styleable#AndroidManifest_versionCodeMajor
223      */
getLongVersionCode()224     long getLongVersionCode();
225 
226     /**
227      * @see ApplicationInfo#maxAspectRatio
228      * @see R.styleable#AndroidManifestApplication_maxAspectRatio
229      */
getMaxAspectRatio()230     float getMaxAspectRatio();
231 
232     /**
233      * @see ApplicationInfo#minAspectRatio
234      * @see R.styleable#AndroidManifestApplication_minAspectRatio
235      */
getMinAspectRatio()236     float getMinAspectRatio();
237 
238     /**
239      * @see ApplicationInfo#getNativeHeapZeroInitialized()
240      * @see R.styleable#AndroidManifestApplication_nativeHeapZeroInitialized
241      */
242     @ApplicationInfo.NativeHeapZeroInitialized
getNativeHeapZeroInitialized()243     int getNativeHeapZeroInitialized();
244 
245     /**
246      * @see ApplicationInfo#networkSecurityConfigRes
247      * @see R.styleable#AndroidManifestApplication_networkSecurityConfig
248      */
249     @XmlRes
getNetworkSecurityConfigResourceId()250     int getNetworkSecurityConfigResourceId();
251 
252     /**
253      * @see PackageInfo#requiredAccountType
254      * @see R.styleable#AndroidManifestApplication_requiredAccountType
255      */
256     @Nullable
getRequiredAccountType()257     String getRequiredAccountType();
258 
259     /**
260      * @see ApplicationInfo#requiresSmallestWidthDp
261      * @see R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp
262      */
263     @Dimension(unit = Dimension.DP)
getRequiresSmallestWidthDp()264     int getRequiresSmallestWidthDp();
265 
266     /**
267      * The restricted account authenticator type that is used by this application.
268      *
269      * @see PackageInfo#restrictedAccountType
270      * @see R.styleable#AndroidManifestApplication_restrictedAccountType
271      */
272     @Nullable
getRestrictedAccountType()273     String getRestrictedAccountType();
274 
275     /**
276      * @see R.styleable#AndroidManifestApplication_emergencyInstaller
277      * @hide
278      */
279     @Nullable
getEmergencyInstaller()280     String getEmergencyInstaller();
281 
282     /**
283      * @see ApplicationInfo#roundIconRes
284      * @see R.styleable#AndroidManifestApplication_roundIcon
285      */
286     @DrawableRes
getRoundIconResourceId()287     int getRoundIconResourceId();
288 
289     /**
290      * @see R.styleable#AndroidManifestSdkLibrary_name
291      */
292     @Nullable
getSdkLibraryName()293     String getSdkLibraryName();
294 
295     /**
296      * @see PackageInfo#sharedUserId
297      * @see R.styleable#AndroidManifest_sharedUserId
298      */
299     @Nullable
getSharedUserId()300     String getSharedUserId();
301 
302     /**
303      * @see PackageInfo#sharedUserLabel
304      * @see R.styleable#AndroidManifest_sharedUserLabel
305      */
306     @StringRes
getSharedUserLabelResourceId()307     int getSharedUserLabelResourceId();
308 
309     /**
310      * @return List of all splits for a package. Note that base.apk is considered a
311      * split and will be provided as index 0 of the list.
312      */
313     @NonNull
getSplits()314     List<AndroidPackageSplit> getSplits();
315 
316     /**
317      * @see R.styleable#AndroidManifestStaticLibrary_name
318      */
319     @Nullable
getStaticSharedLibraryName()320     String getStaticSharedLibraryName();
321 
322     /**
323      * @see R.styleable#AndroidManifestStaticLibrary_version
324      * @hide
325      */
getStaticSharedLibraryVersion()326     long getStaticSharedLibraryVersion();
327 
328     /**
329      * @return The {@link UUID} for use with {@link StorageManager} APIs identifying where this
330      * package was installed.
331      */
332     @NonNull
getStorageUuid()333     UUID getStorageUuid();
334 
335     /**
336      * @see ApplicationInfo#targetSdkVersion
337      * @see R.styleable#AndroidManifestUsesSdk_targetSdkVersion
338      */
getTargetSdkVersion()339     int getTargetSdkVersion();
340 
341     /**
342      * @see ApplicationInfo#theme
343      * @see R.styleable#AndroidManifestApplication_theme
344      */
345     @StyleRes
getThemeResourceId()346     int getThemeResourceId();
347 
348     /**
349      * @see ApplicationInfo#uiOptions
350      * @see R.styleable#AndroidManifestApplication_uiOptions
351      */
getUiOptions()352     int getUiOptions();
353 
354     /**
355      * @see PackageInfo#versionName
356      */
357     @Nullable
getVersionName()358     String getVersionName();
359 
360     /**
361      * @see ApplicationInfo#zygotePreloadName
362      * @see R.styleable#AndroidManifestApplication_zygotePreloadName
363      */
364     @Nullable
getZygotePreloadName()365     String getZygotePreloadName();
366 
367     /**
368      * @see ApplicationInfo#PRIVATE_FLAG_ALLOW_AUDIO_PLAYBACK_CAPTURE
369      * @see R.styleable#AndroidManifestApplication_allowAudioPlaybackCapture
370      */
isAllowAudioPlaybackCapture()371     boolean isAllowAudioPlaybackCapture();
372 
373     /**
374      * @see ApplicationInfo#FLAG_ALLOW_BACKUP
375      * @see R.styleable#AndroidManifestApplication_allowBackup
376      */
isBackupAllowed()377     boolean isBackupAllowed();
378 
379     /**
380      * @see ApplicationInfo#FLAG_ALLOW_CLEAR_USER_DATA
381      * @see R.styleable#AndroidManifestApplication_allowClearUserData
382      */
isClearUserDataAllowed()383     boolean isClearUserDataAllowed();
384 
385     /**
386      * @see ApplicationInfo#PRIVATE_FLAG_ALLOW_CLEAR_USER_DATA_ON_FAILED_RESTORE
387      * @see R.styleable#AndroidManifestApplication_allowClearUserDataOnFailedRestore
388      */
isClearUserDataOnFailedRestoreAllowed()389     boolean isClearUserDataOnFailedRestoreAllowed();
390 
391     /**
392      * @see ApplicationInfo#PRIVATE_FLAG_ALLOW_NATIVE_HEAP_POINTER_TAGGING
393      * @see R.styleable#AndroidManifestApplication_allowNativeHeapPointerTagging
394      */
isAllowNativeHeapPointerTagging()395     boolean isAllowNativeHeapPointerTagging();
396 
397     /**
398      * @see ApplicationInfo#FLAG_ALLOW_TASK_REPARENTING
399      * @see R.styleable#AndroidManifestApplication_allowTaskReparenting
400      */
isTaskReparentingAllowed()401     boolean isTaskReparentingAllowed();
402 
403     /**
404      * If omitted from manifest, returns true if {@link #getTargetSdkVersion()} >= {@link
405      * android.os.Build.VERSION_CODES#DONUT}.
406      *
407      * @see R.styleable#AndroidManifestSupportsScreens_anyDensity
408      * @see ApplicationInfo#FLAG_SUPPORTS_SCREEN_DENSITIES
409      */
isAnyDensity()410     boolean isAnyDensity();
411 
412     /**
413      * @see ApplicationInfo#areAttributionsUserVisible()
414      * @see R.styleable#AndroidManifestApplication_attributionsAreUserVisible
415      */
isAttributionsUserVisible()416     boolean isAttributionsUserVisible();
417 
418     /**
419      * @see ApplicationInfo#PRIVATE_FLAG_BACKUP_IN_FOREGROUND
420      * @see R.styleable#AndroidManifestApplication_backupInForeground
421      */
isBackupInForeground()422     boolean isBackupInForeground();
423 
424     /**
425      * @see ApplicationInfo#FLAG_HARDWARE_ACCELERATED
426      * @see R.styleable#AndroidManifestApplication_hardwareAccelerated
427      */
isHardwareAccelerated()428     boolean isHardwareAccelerated();
429 
430     /**
431      * @see ApplicationInfo#PRIVATE_FLAG_CANT_SAVE_STATE
432      * @see R.styleable#AndroidManifestApplication_cantSaveState
433      */
isSaveStateDisallowed()434     boolean isSaveStateDisallowed();
435 
436     /**
437      * @see PackageInfo#coreApp
438      */
isCoreApp()439     boolean isCoreApp();
440 
441     /**
442      * @see ApplicationInfo#crossProfile
443      * @see R.styleable#AndroidManifestApplication_crossProfile
444      */
isCrossProfile()445     boolean isCrossProfile();
446 
447     /**
448      * @see ApplicationInfo#FLAG_DEBUGGABLE
449      * @see R.styleable#AndroidManifestApplication_debuggable
450      */
isDebuggable()451     boolean isDebuggable();
452 
453     /**
454      * @see ApplicationInfo#PRIVATE_FLAG_DEFAULT_TO_DEVICE_PROTECTED_STORAGE
455      * @see R.styleable#AndroidManifestApplication_defaultToDeviceProtectedStorage
456      */
isDefaultToDeviceProtectedStorage()457     boolean isDefaultToDeviceProtectedStorage();
458 
459     /**
460      * @see ApplicationInfo#PRIVATE_FLAG_DIRECT_BOOT_AWARE
461      * @see R.styleable#AndroidManifestApplication_directBootAware
462      */
isDirectBootAware()463     boolean isDirectBootAware();
464 
465     /**
466      * @see ApplicationInfo#FLAG_EXTRACT_NATIVE_LIBS
467      * @see R.styleable#AndroidManifestApplication_extractNativeLibs
468      */
isExtractNativeLibrariesRequested()469     boolean isExtractNativeLibrariesRequested();
470 
471     /**
472      * @see ApplicationInfo#FLAG_FACTORY_TEST
473      */
isFactoryTest()474     boolean isFactoryTest();
475 
476     /**
477      * @see R.styleable#AndroidManifestApplication_forceQueryable
478      */
isForceQueryable()479     boolean isForceQueryable();
480 
481     /**
482      * @see ApplicationInfo#FLAG_FULL_BACKUP_ONLY
483      * @see R.styleable#AndroidManifestApplication_fullBackupOnly
484      */
isFullBackupOnly()485     boolean isFullBackupOnly();
486 
487     /**
488      * @see ApplicationInfo#FLAG_HAS_CODE
489      * @see R.styleable#AndroidManifestApplication_hasCode
490      */
isDeclaredHavingCode()491     boolean isDeclaredHavingCode();
492 
493     /**
494      * @see ApplicationInfo#PRIVATE_FLAG_HAS_FRAGILE_USER_DATA
495      * @see R.styleable#AndroidManifestApplication_hasFragileUserData
496      */
isUserDataFragile()497     boolean isUserDataFragile();
498 
499     /**
500      * @see ApplicationInfo#PRIVATE_FLAG_ISOLATED_SPLIT_LOADING
501      * @see R.styleable#AndroidManifest_isolatedSplits
502      */
isIsolatedSplitLoading()503     boolean isIsolatedSplitLoading();
504 
505     /**
506      * @see ApplicationInfo#FLAG_KILL_AFTER_RESTORE
507      * @see R.styleable#AndroidManifestApplication_killAfterRestore
508      */
isKillAfterRestoreAllowed()509     boolean isKillAfterRestoreAllowed();
510 
511     /**
512      * @see ApplicationInfo#FLAG_LARGE_HEAP
513      * @see R.styleable#AndroidManifestApplication_largeHeap
514      */
isLargeHeap()515     boolean isLargeHeap();
516 
517     /**
518      * Returns true if R.styleable#AndroidManifest_sharedUserMaxSdkVersion is set to a value
519      * smaller than the current SDK version, indicating the package wants to leave its declared
520      * {@link #getSharedUserId()}. This only occurs on new installs, pretending the app never
521      * declared one.
522      *
523      * @see R.styleable#AndroidManifest_sharedUserMaxSdkVersion
524      */
isLeavingSharedUser()525     boolean isLeavingSharedUser();
526 
527     /**
528      * @see ApplicationInfo#FLAG_MULTIARCH
529      * @see R.styleable#AndroidManifestApplication_multiArch
530      */
isMultiArch()531     boolean isMultiArch();
532 
533     /**
534      * @see ApplicationInfo#nativeLibraryRootRequiresIsa
535      */
isNativeLibraryRootRequiresIsa()536     boolean isNativeLibraryRootRequiresIsa();
537 
538     /**
539      * @see R.styleable#AndroidManifestApplication_enableOnBackInvokedCallback
540      */
isOnBackInvokedCallbackEnabled()541     boolean isOnBackInvokedCallbackEnabled();
542 
543     /**
544      * @see ApplicationInfo#FLAG_PERSISTENT
545      * @see R.styleable#AndroidManifestApplication_persistent
546      */
isPersistent()547     boolean isPersistent();
548 
549     /**
550      * @see ApplicationInfo#PRIVATE_FLAG_EXT_PROFILEABLE
551      * @see R.styleable#AndroidManifestProfileable
552      */
isProfileable()553     boolean isProfileable();
554 
555     /**
556      * @see ApplicationInfo#PRIVATE_FLAG_PROFILEABLE_BY_SHELL
557      * @see R.styleable#AndroidManifestProfileable_shell
558      */
isProfileableByShell()559     boolean isProfileableByShell();
560 
561     /**
562      * @see ApplicationInfo#PRIVATE_FLAG_REQUEST_LEGACY_EXTERNAL_STORAGE
563      * @see R.styleable#AndroidManifestApplication_requestLegacyExternalStorage
564      */
isRequestLegacyExternalStorage()565     boolean isRequestLegacyExternalStorage();
566 
567     /**
568      * @see PackageInfo#requiredForAllUsers
569      * @see R.styleable#AndroidManifestApplication_requiredForAllUsers
570      */
isRequiredForAllUsers()571     boolean isRequiredForAllUsers();
572 
573     /**
574      * Whether the enabled settings of components in the application should be reset to the default,
575      * when the application's user data is cleared.
576      *
577      * @see R.styleable#AndroidManifestApplication_resetEnabledSettingsOnAppDataCleared
578      */
isResetEnabledSettingsOnAppDataCleared()579     boolean isResetEnabledSettingsOnAppDataCleared();
580 
581     /**
582      * @see ApplicationInfo#PRIVATE_FLAG_IS_RESOURCE_OVERLAY
583      * @see ApplicationInfo#isResourceOverlay()
584      * @see R.styleable#AndroidManifestResourceOverlay
585      */
isResourceOverlay()586     boolean isResourceOverlay();
587 
588     /**
589      * @see ApplicationInfo#FLAG_RESTORE_ANY_VERSION
590      * @see R.styleable#AndroidManifestApplication_restoreAnyVersion
591      */
isRestoreAnyVersion()592     boolean isRestoreAnyVersion();
593 
594     /**
595      * @see ApplicationInfo#PRIVATE_FLAG_SIGNED_WITH_PLATFORM_KEY
596      */
isSignedWithPlatformKey()597     boolean isSignedWithPlatformKey();
598 
599     /**
600      * If omitted from manifest, returns true if {@link #getTargetSdkVersion()} >= {@link
601      * android.os.Build.VERSION_CODES#GINGERBREAD}.
602      *
603      * @see R.styleable#AndroidManifestSupportsScreens_xlargeScreens
604      * @see ApplicationInfo#FLAG_SUPPORTS_XLARGE_SCREENS
605      */
isExtraLargeScreensSupported()606     boolean isExtraLargeScreensSupported();
607 
608     /**
609      * If omitted from manifest, returns true if {@link #getTargetSdkVersion()} >= {@link
610      * android.os.Build.VERSION_CODES#DONUT}.
611      *
612      * @see R.styleable#AndroidManifestSupportsScreens_largeScreens
613      * @see ApplicationInfo#FLAG_SUPPORTS_LARGE_SCREENS
614      */
isLargeScreensSupported()615     boolean isLargeScreensSupported();
616 
617     /**
618      * If omitted from manifest, returns true.
619      *
620      * @see R.styleable#AndroidManifestSupportsScreens_normalScreens
621      * @see ApplicationInfo#FLAG_SUPPORTS_NORMAL_SCREENS
622      */
isNormalScreensSupported()623     boolean isNormalScreensSupported();
624 
625     /**
626      * @see ApplicationInfo#FLAG_SUPPORTS_RTL
627      * @see R.styleable#AndroidManifestApplication_supportsRtl
628      */
isRtlSupported()629     boolean isRtlSupported();
630 
631     /**
632      * If omitted from manifest, returns true if {@link #getTargetSdkVersion()} >= {@link
633      * android.os.Build.VERSION_CODES#DONUT}.
634      *
635      * @see R.styleable#AndroidManifestSupportsScreens_smallScreens
636      * @see ApplicationInfo#FLAG_SUPPORTS_SMALL_SCREENS
637      */
isSmallScreensSupported()638     boolean isSmallScreensSupported();
639 
640     /**
641      * @see ApplicationInfo#FLAG_TEST_ONLY
642      * @see R.styleable#AndroidManifestApplication_testOnly
643      */
isTestOnly()644     boolean isTestOnly();
645 
646     /**
647      * The install time abi override to choose 32bit abi's when multiple abi's are present. This is
648      * only meaningful for multiarch applications. The use32bitAbi attribute is ignored if
649      * cpuAbiOverride is also set.
650      *
651      * @see R.attr#use32bitAbi
652      */
is32BitAbiPreferred()653     boolean is32BitAbiPreferred();
654 
655     /**
656      * @see ApplicationInfo#FLAG_USES_CLEARTEXT_TRAFFIC
657      * @see R.styleable#AndroidManifestApplication_usesCleartextTraffic
658      */
isCleartextTrafficAllowed()659     boolean isCleartextTrafficAllowed();
660 
661     /**
662      * @see ApplicationInfo#PRIVATE_FLAG_USE_EMBEDDED_DEX
663      * @see R.styleable#AndroidManifestApplication_useEmbeddedDex
664      */
isUseEmbeddedDex()665     boolean isUseEmbeddedDex();
666 
667     /**
668      * @see ApplicationInfo#PRIVATE_FLAG_USES_NON_SDK_API
669      * @see R.styleable#AndroidManifestApplication_usesNonSdkApi
670      */
isNonSdkApiRequested()671     boolean isNonSdkApiRequested();
672 
673     /**
674      * @see ApplicationInfo#FLAG_VM_SAFE_MODE
675      * @see R.styleable#AndroidManifestApplication_vmSafeMode
676      */
isVmSafeMode()677     boolean isVmSafeMode();
678 
679     // Methods below this comment are not yet exposed as API
680 
681     /**
682      * Set of Activities parsed from the manifest.
683      * <p>
684      * This contains minimal system state and does not
685      * provide the same information as {@link ActivityInfo}. Effective state can be queried through
686      * {@link android.content.pm.PackageManager#getActivityInfo(ComponentName, int)} or by
687      * combining state from from com.android.server.pm.pkg.PackageState and
688      * {@link PackageUserState}.
689      *
690      * @see ActivityInfo
691      * @see PackageInfo#activities
692      * @see R.styleable#AndroidManifestActivity
693      * @hide
694      */
695     @Immutable.Ignore
696     @NonNull
getActivities()697     List<ParsedActivity> getActivities();
698 
699     /**
700      * The names of packages to adopt ownership of permissions from, parsed under {@link
701      * ParsingPackageUtils#TAG_ADOPT_PERMISSIONS}.
702      *
703      * @see R.styleable#AndroidManifestOriginalPackage_name
704      * @hide
705      */
706     @NonNull
getAdoptPermissions()707     List<String> getAdoptPermissions();
708 
709     /**
710      * @see R.styleable#AndroidManifestApexSystemService
711      * @hide
712      */
713     @Immutable.Ignore
714     @NonNull
getApexSystemServices()715     List<ParsedApexSystemService> getApexSystemServices();
716 
717     /**
718      * @see R.styleable#AndroidManifestAttribution
719      * @hide
720      */
721     @Immutable.Ignore
722     @NonNull
getAttributions()723     List<ParsedAttribution> getAttributions();
724 
725     /**
726      * @see ApplicationInfo#AUTO_REVOKE_ALLOWED
727      * @see ApplicationInfo#AUTO_REVOKE_DISCOURAGED
728      * @see ApplicationInfo#AUTO_REVOKE_DISALLOWED
729      * @see R.styleable#AndroidManifestApplication_autoRevokePermissions
730      * @hide
731      */
getAutoRevokePermissions()732     int getAutoRevokePermissions();
733 
734     /**
735      * @see ApplicationInfo#sourceDir
736      * @see ApplicationInfo#getBaseCodePath
737      *
738      * @deprecated Use {@link #getSplits()}[0].{@link AndroidPackageSplit#getPath() getPath()}
739      *
740      * @hide
741      */
742     @Deprecated
743     @NonNull
getBaseApkPath()744     String getBaseApkPath();
745 
746     /**
747      * @see ApplicationInfo#compileSdkVersion
748      * @see R.styleable#AndroidManifest_compileSdkVersion
749      * @hide
750      */
getCompileSdkVersion()751     int getCompileSdkVersion();
752 
753     /**
754      * @see ApplicationInfo#compileSdkVersionCodename
755      * @see R.styleable#AndroidManifest_compileSdkVersionCodename
756      * @hide
757      */
758     @Nullable
getCompileSdkVersionCodeName()759     String getCompileSdkVersionCodeName();
760 
761     /**
762      * @see PackageInfo#configPreferences
763      * @see R.styleable#AndroidManifestUsesConfiguration
764      * @hide
765      */
766     @Immutable.Ignore
767     @NonNull
getConfigPreferences()768     List<ConfigurationInfo> getConfigPreferences();
769 
770     /**
771      * @see PackageInfo#featureGroups
772      * @see R.styleable#AndroidManifestUsesFeature
773      * @hide
774      */
775     @Immutable.Ignore
776     @NonNull
getFeatureGroups()777     List<FeatureGroupInfo> getFeatureGroups();
778 
779     /**
780      * Permissions requested but not in the manifest. These may have been split or migrated from
781      * previous versions/definitions.
782      * @hide
783      */
784     @NonNull
getImplicitPermissions()785     Set<String> getImplicitPermissions();
786 
787     /**
788      * @see ApplicationInfo#installLocation
789      * @see R.styleable#AndroidManifest_installLocation
790      * @hide
791      */
getInstallLocation()792     int getInstallLocation();
793 
794     /**
795      * @see InstrumentationInfo
796      * @see PackageInfo#instrumentation
797      * @see R.styleable#AndroidManifestInstrumentation
798      * @hide
799      */
800     @Immutable.Ignore
801     @NonNull
getInstrumentations()802     List<ParsedInstrumentation> getInstrumentations();
803 
804     /**
805      * For use with {@link com.android.server.pm.KeySetManagerService}. Parsed in {@link
806      * ParsingPackageUtils#TAG_KEY_SETS}.
807      *
808      * @see R.styleable#AndroidManifestKeySet
809      * @see R.styleable#AndroidManifestPublicKey
810      * @hide
811      */
812     @Immutable.Ignore
813     @NonNull
getKeySetMapping()814     Map<String, ArraySet<PublicKey>> getKeySetMapping();
815 
816     /**
817      * @see ApplicationInfo#mKnownActivityEmbeddingCerts
818      * @see R.styleable#AndroidManifestApplication_knownActivityEmbeddingCerts
819      * @hide
820      */
821     @SuppressWarnings("JavadocReference")
822     @NonNull
getKnownActivityEmbeddingCerts()823     Set<String> getKnownActivityEmbeddingCerts();
824 
825     /**
826      * @see ApplicationInfo#manageSpaceActivityName
827      * @see R.styleable#AndroidManifestApplication_manageSpaceActivity
828      * @hide
829      */
830     @Nullable
getManageSpaceActivityName()831     String getManageSpaceActivityName();
832 
833     /**
834      * The package name as declared in the manifest, since the package can be renamed. For example,
835      * static shared libs use synthetic package names.
836      * @hide
837      */
838     @NonNull
getManifestPackageName()839     String getManifestPackageName();
840 
841     /**
842      * @see R.styleable#AndroidManifestUsesSdk_maxSdkVersion
843      * @hide
844      */
getMaxSdkVersion()845     int getMaxSdkVersion();
846 
847     /**
848      * @see ApplicationInfo#getMemtagMode()
849      * @see R.styleable#AndroidManifestApplication_memtagMode
850      * @hide
851      */
852     @ApplicationInfo.MemtagMode
getMemtagMode()853     int getMemtagMode();
854 
855     /**
856      * TODO(b/135203078): Make all the Bundles immutable (and non-null by shared empty reference?)
857      * @see R.styleable#AndroidManifestMetaData
858      * @hide
859      */
860     @Immutable.Ignore
861     @Nullable
getMetaData()862     Bundle getMetaData();
863 
864     /**
865      * @see R.attr#mimeGroup
866      * @hide
867      */
868     @Nullable
getMimeGroups()869     Set<String> getMimeGroups();
870 
871     /**
872      * @see R.styleable#AndroidManifestExtensionSdk
873      * @hide
874      */
875     @Immutable.Ignore
876     @Nullable
getMinExtensionVersions()877     SparseIntArray getMinExtensionVersions();
878 
879     /**
880      * @see ApplicationInfo#minSdkVersion
881      * @see R.styleable#AndroidManifestUsesSdk_minSdkVersion
882      * @hide
883      */
getMinSdkVersion()884     int getMinSdkVersion();
885 
886     /**
887      * @see ApplicationInfo#nativeLibraryDir
888      * @hide
889      */
890     @Nullable
getNativeLibraryDir()891     String getNativeLibraryDir();
892 
893     /**
894      * @see ApplicationInfo#nativeLibraryRootDir
895      * @hide
896      */
897     @Nullable
getNativeLibraryRootDir()898     String getNativeLibraryRootDir();
899 
900     /**
901      * If {@link R.styleable#AndroidManifestApplication_label} is a string literal, this is it.
902      * Otherwise, it's stored as {@link #getLabelResourceId()}.
903      *
904      * @see ApplicationInfo#nonLocalizedLabel
905      * @see R.styleable#AndroidManifestApplication_label
906      * @hide
907      */
908     @Nullable
getNonLocalizedLabel()909     CharSequence getNonLocalizedLabel();
910 
911     /**
912      * For system use to migrate from an old package name to a new one, moving over data if
913      * available.
914      *
915      * @see R.styleable#AndroidManifestOriginalPackage
916      * @hide
917      */
918     @NonNull
getOriginalPackages()919     List<String> getOriginalPackages();
920 
921     /**
922      * @see PackageInfo#overlayCategory
923      * @see R.styleable#AndroidManifestResourceOverlay_category
924      * @hide
925      */
926     @Nullable
getOverlayCategory()927     String getOverlayCategory();
928 
929     /**
930      * @see PackageInfo#overlayPriority
931      * @see R.styleable#AndroidManifestResourceOverlay_priority
932      * @hide
933      */
getOverlayPriority()934     int getOverlayPriority();
935 
936     /**
937      * @see PackageInfo#overlayTarget
938      * @see R.styleable#AndroidManifestResourceOverlay_targetPackage
939      * @hide
940      */
941     @Nullable
getOverlayTarget()942     String getOverlayTarget();
943 
944     /**
945      * @see PackageInfo#targetOverlayableName
946      * @see R.styleable#AndroidManifestResourceOverlay_targetName
947      * @hide
948      */
949     @Nullable
getOverlayTargetOverlayableName()950     String getOverlayTargetOverlayableName();
951 
952     /**
953      * Map of overlayable name to actor name.
954      * @hide
955      */
956     @NonNull
getOverlayables()957     Map<String, String> getOverlayables();
958 
959     /**
960      * @see PackageInfo#packageName
961      * @hide
962      */
getPackageName()963     String getPackageName();
964 
965     /**
966      * @see ApplicationInfo#scanSourceDir
967      * @see ApplicationInfo#getCodePath
968      * @hide
969      */
970     @NonNull
getPath()971     String getPath();
972 
973     /**
974      * @see ApplicationInfo#permission
975      * @see R.styleable#AndroidManifestApplication_permission
976      * @hide
977      */
978     @Nullable
getPermission()979     String getPermission();
980 
981     /**
982      * @see android.content.pm.PermissionGroupInfo
983      * @see R.styleable#AndroidManifestPermissionGroup
984      * @hide
985      */
986     @Immutable.Ignore
987     @NonNull
getPermissionGroups()988     List<ParsedPermissionGroup> getPermissionGroups();
989 
990     /**
991      * @see PermissionInfo
992      * @see PackageInfo#permissions
993      * @hide
994      */
995     @Immutable.Ignore
996     @NonNull
getPermissions()997     List<ParsedPermission> getPermissions();
998 
999     /**
1000      * Used to determine the default preferred handler of an {@link Intent}.
1001      * <p>
1002      * Map of component className to intent info inside that component. TODO(b/135203078): Is this
1003      * actually used/working?
1004      * @hide
1005      */
1006     @Immutable.Ignore
1007     @NonNull
getPreferredActivityFilters()1008     List<Pair<String, ParsedIntentInfo>> getPreferredActivityFilters();
1009 
1010     /**
1011      * @see ApplicationInfo#processName
1012      * @see R.styleable#AndroidManifestApplication_process
1013      * @hide
1014      */
1015     @NonNull
getProcessName()1016     String getProcessName();
1017 
1018     /**
1019      * @see android.content.pm.ProcessInfo
1020      * @see R.styleable#AndroidManifestProcess
1021      * @hide
1022      */
1023     @Immutable.Ignore
1024     @NonNull
getProcesses()1025     Map<String, ParsedProcess> getProcesses();
1026 
1027     /**
1028      * Returns the properties set on the application
1029      * @see R.styleable#AndroidManifestProperty
1030      * @hide
1031      */
1032     @Immutable.Ignore
1033     @NonNull
getProperties()1034     Map<String, PackageManager.Property> getProperties();
1035 
1036     /**
1037      * System protected broadcasts.
1038      *
1039      * @see R.styleable#AndroidManifestProtectedBroadcast
1040      * @hide
1041      */
1042     @NonNull
getProtectedBroadcasts()1043     List<String> getProtectedBroadcasts();
1044 
1045     /**
1046      * Set of {@link android.content.ContentProvider ContentProviders} parsed from the manifest.
1047      * <p>
1048      * This contains minimal system state and does not
1049      * provide the same information as {@link ProviderInfo}. Effective state can be queried through
1050      * {@link PackageManager#getProviderInfo(ComponentName, int)} or by
1051      * combining state from from com.android.server.pm.pkg.PackageState and
1052      * {@link PackageUserState}.
1053      *
1054      * @see ProviderInfo
1055      * @see PackageInfo#providers
1056      * @see R.styleable#AndroidManifestProvider
1057      * @hide
1058      */
1059     @Immutable.Ignore
1060     @NonNull
getProviders()1061     List<ParsedProvider> getProviders();
1062 
1063     /**
1064      * Intents that this package may query or require and thus requires visibility into.
1065      *
1066      * @see R.styleable#AndroidManifestQueriesIntent
1067      * @hide
1068      */
1069     @Immutable.Ignore
1070     @NonNull
getQueriesIntents()1071     List<Intent> getQueriesIntents();
1072 
1073     /**
1074      * Other packages that this package may query or require and thus requires visibility into.
1075      *
1076      * @see R.styleable#AndroidManifestQueriesPackage
1077      * @hide
1078      */
1079     @NonNull
getQueriesPackages()1080     List<String> getQueriesPackages();
1081 
1082     /**
1083      * Authorities that this package may query or require and thus requires visibility into.
1084      *
1085      * @see R.styleable#AndroidManifestQueriesProvider
1086      * @hide
1087      */
1088     @NonNull
getQueriesProviders()1089     Set<String> getQueriesProviders();
1090 
1091     /**
1092      * Set of {@link android.content.BroadcastReceiver BroadcastReceivers} parsed from the manifest.
1093      * <p>
1094      * This contains minimal system state and does not
1095      * provide the same information as {@link ActivityInfo}. Effective state can be queried through
1096      * {@link PackageManager#getReceiverInfo(ComponentName, int)} or by
1097      * combining state from from com.android.server.pm.pkg.PackageState and
1098      * {@link PackageUserState}.
1099      * <p>
1100      * Since they share several attributes, receivers are parsed as {@link ParsedActivity}, even
1101      * though they represent different functionality.
1102      * <p>
1103      * TODO(b/135203078): Reconsider this and maybe make ParsedReceiver so it's not so confusing
1104      *
1105      * @see ActivityInfo
1106      * @see PackageInfo#receivers
1107      * @see R.styleable#AndroidManifestReceiver
1108      * @hide
1109      */
1110     @Immutable.Ignore
1111     @NonNull
getReceivers()1112     List<ParsedActivity> getReceivers();
1113 
1114     /**
1115      * @see PackageInfo#reqFeatures
1116      * @see R.styleable#AndroidManifestUsesFeature
1117      * @hide
1118      */
1119     @Immutable.Ignore
1120     @NonNull
getRequestedFeatures()1121     List<FeatureInfo> getRequestedFeatures();
1122 
1123     /**
1124      * All the permissions declared. This is an effective set, and may include permissions
1125      * transformed from split/migrated permissions from previous versions, so may not be exactly
1126      * what the package declares in its manifest.
1127      *
1128      * @see PackageInfo#requestedPermissions
1129      * @see R.styleable#AndroidManifestUsesPermission
1130      * @hide
1131      */
1132     @NonNull
getRequestedPermissions()1133     Set<String> getRequestedPermissions();
1134 
1135     /**
1136      * Whether or not the app requested explicitly resizeable Activities. Null value means nothing
1137      * was explicitly requested.
1138      *
1139      * @see ApplicationInfo#PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_RESIZEABLE
1140      * @see ApplicationInfo#PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_UNRESIZEABLE
1141      * @see R.styleable#AndroidManifestApplication_resizeableActivity
1142      * @hide
1143      */
1144     @Nullable
getResizeableActivity()1145     Boolean getResizeableActivity();
1146 
1147     /**
1148      * SHA-512 hash of the only APK that can be used to update a system package.
1149      *
1150      * @see R.styleable#AndroidManifestRestrictUpdate
1151      * @hide
1152      */
1153     @Immutable.Ignore
1154     @Nullable
getRestrictUpdateHash()1155     byte[] getRestrictUpdateHash();
1156 
1157     /**
1158      * @see R.styleable#AndroidManifestSdkLibrary_versionMajor
1159      * @hide
1160      */
getSdkLibVersionMajor()1161     int getSdkLibVersionMajor();
1162 
1163     /**
1164      * @see ApplicationInfo#secondaryNativeLibraryDir
1165      * @hide
1166      */
1167     @Nullable
getSecondaryNativeLibraryDir()1168     String getSecondaryNativeLibraryDir();
1169 
1170     /**
1171      * Set of {@link android.app.Service Services} parsed from the manifest.
1172      * <p>
1173      * This contains minimal system state and does not
1174      * provide the same information as {@link ServiceInfo}. Effective state can be queried through
1175      * {@link PackageManager#getServiceInfo(ComponentName, int)} or by
1176      * combining state from from com.android.server.pm.pkg.PackageState and
1177      * {@link PackageUserState}.
1178      *
1179      * @see ServiceInfo
1180      * @see PackageInfo#services
1181      * @see R.styleable#AndroidManifestService
1182      * @hide
1183      */
1184     @Immutable.Ignore
1185     @NonNull
getServices()1186     List<ParsedService> getServices();
1187 
1188     /**
1189      * The signature data of all APKs in this package, which must be exactly the same across the
1190      * base and splits.
1191      * @hide
1192      */
1193     @Immutable.Ignore
1194     @NonNull
getSigningDetails()1195     SigningDetails getSigningDetails();
1196 
1197     /**
1198      * @see ApplicationInfo#splitClassLoaderNames
1199      * @see R.styleable#AndroidManifestApplication_classLoader
1200      * @hide
1201      */
1202     @Immutable.Ignore
1203     @Nullable
getSplitClassLoaderNames()1204     String[] getSplitClassLoaderNames();
1205 
1206     /**
1207      * @see ApplicationInfo#splitSourceDirs
1208      * @see ApplicationInfo#getSplitCodePaths
1209      * @hide
1210      */
1211     @Immutable.Ignore
1212     @NonNull
getSplitCodePaths()1213     String[] getSplitCodePaths();
1214 
1215     /**
1216      * @see ApplicationInfo#splitDependencies
1217      * @hide
1218      */
1219     @Immutable.Ignore
1220     @NonNull
getSplitDependencies()1221     SparseArray<int[]> getSplitDependencies();
1222 
1223     /**
1224      * Flags of any split APKs; ordered by parsed splitName
1225      * @hide
1226      */
1227     @Immutable.Ignore
1228     @Nullable
getSplitFlags()1229     int[] getSplitFlags();
1230 
1231     /**
1232      * TODO(b/135203078): Move split stuff to an inner data class
1233      *
1234      * @see ApplicationInfo#splitNames
1235      * @see PackageInfo#splitNames
1236      * @hide
1237      */
1238     @Immutable.Ignore
1239     @NonNull
getSplitNames()1240     String[] getSplitNames();
1241 
1242     /**
1243      * @see PackageInfo#splitRevisionCodes
1244      * @hide
1245      */
1246     @Immutable.Ignore
1247     @NonNull
getSplitRevisionCodes()1248     int[] getSplitRevisionCodes();
1249 
1250     /**
1251      * @see ApplicationInfo#targetSandboxVersion
1252      * @see R.styleable#AndroidManifest_targetSandboxVersion
1253      * @hide
1254      */
getTargetSandboxVersion()1255     int getTargetSandboxVersion();
1256 
1257     /**
1258      * @see ApplicationInfo#taskAffinity
1259      * @see R.styleable#AndroidManifestApplication_taskAffinity
1260      * @hide
1261      */
1262     @Nullable
getTaskAffinity()1263     String getTaskAffinity();
1264 
1265     /**
1266      * This is an appId, the {@link ApplicationInfo#uid} if the user ID is
1267      * {@link android.os.UserHandle#SYSTEM}.
1268      *
1269      * @deprecated Use {@link PackageState#getAppId()} instead.
1270      * @hide
1271      */
1272     @Deprecated
getUid()1273     int getUid();
1274 
1275     /**
1276      * For use with {@link com.android.server.pm.KeySetManagerService}. Parsed in {@link
1277      * ParsingPackageUtils#TAG_KEY_SETS}.
1278      *
1279      * @see R.styleable#AndroidManifestUpgradeKeySet
1280      * @hide
1281      */
1282     @NonNull
getUpgradeKeySets()1283     Set<String> getUpgradeKeySets();
1284 
1285     /**
1286      * @see R.styleable#AndroidManifestUsesLibrary
1287      * @hide
1288      */
1289     @NonNull
getUsesLibraries()1290     List<String> getUsesLibraries();
1291 
1292     /**
1293      * @see R.styleable#AndroidManifestUsesNativeLibrary
1294      * @hide
1295      */
1296     @NonNull
getUsesNativeLibraries()1297     List<String> getUsesNativeLibraries();
1298 
1299     /**
1300      * Like {@link #getUsesLibraries()}, but marked optional by setting {@link
1301      * R.styleable#AndroidManifestUsesLibrary_required} to false . Application is expected to handle
1302      * absence manually.
1303      *
1304      * @see R.styleable#AndroidManifestUsesLibrary
1305      * @hide
1306      */
1307     @NonNull
getUsesOptionalLibraries()1308     List<String> getUsesOptionalLibraries();
1309 
1310     /**
1311      * Like {@link #getUsesNativeLibraries()}, but marked optional by setting {@link
1312      * R.styleable#AndroidManifestUsesNativeLibrary_required} to false . Application is expected to
1313      * handle absence manually.
1314      *
1315      * @see R.styleable#AndroidManifestUsesNativeLibrary
1316      * @hide
1317      */
1318     @NonNull
getUsesOptionalNativeLibraries()1319     List<String> getUsesOptionalNativeLibraries();
1320 
1321     /** @hide */
1322     @Immutable.Ignore
1323     @NonNull
getUsesPermissions()1324     List<ParsedUsesPermission> getUsesPermissions();
1325 
1326     /**
1327      * TODO(b/135203078): Move SDK library stuff to an inner data class
1328      *
1329      * @see R.styleable#AndroidManifestUsesSdkLibrary
1330      * @hide
1331      */
1332     @NonNull
getUsesSdkLibraries()1333     List<String> getUsesSdkLibraries();
1334 
1335     /**
1336      * @see R.styleable#AndroidManifestUsesSdkLibrary_certDigest
1337      * @hide
1338      */
1339     @Immutable.Ignore
1340     @Nullable
getUsesSdkLibrariesCertDigests()1341     String[][] getUsesSdkLibrariesCertDigests();
1342 
1343     /**
1344      * @see R.styleable#AndroidManifestUsesSdkLibrary_versionMajor
1345      * @hide
1346      */
1347     @Immutable.Ignore
1348     @Nullable
getUsesSdkLibrariesVersionsMajor()1349     long[] getUsesSdkLibrariesVersionsMajor();
1350 
1351 
1352     /**
1353      * @see R.styleable#AndroidManifestUsesSdkLibrary_optional
1354      * @hide
1355      */
1356     @Immutable.Ignore
1357     @Nullable
getUsesSdkLibrariesOptional()1358     boolean[] getUsesSdkLibrariesOptional();
1359 
1360     /**
1361      * TODO(b/135203078): Move static library stuff to an inner data class
1362      *
1363      * @see R.styleable#AndroidManifestUsesStaticLibrary
1364      * @hide
1365      */
1366     @NonNull
getUsesStaticLibraries()1367     List<String> getUsesStaticLibraries();
1368 
1369     /**
1370      * @see R.styleable#AndroidManifestUsesStaticLibrary_certDigest
1371      * @hide
1372      */
1373     @Immutable.Ignore
1374     @Nullable
getUsesStaticLibrariesCertDigests()1375     String[][] getUsesStaticLibrariesCertDigests();
1376 
1377     /**
1378      * @see R.styleable#AndroidManifestUsesStaticLibrary_version
1379      * @hide
1380      */
1381     @Immutable.Ignore
1382     @Nullable
getUsesStaticLibrariesVersions()1383     long[] getUsesStaticLibrariesVersions();
1384 
1385     /**
1386      * @see ApplicationInfo#volumeUuid
1387      * @hide
1388      */
1389     @Nullable
getVolumeUuid()1390     String getVolumeUuid();
1391 
1392     /** @hide */
hasPreserveLegacyExternalStorage()1393     boolean hasPreserveLegacyExternalStorage();
1394 
1395     /**
1396      * @see ApplicationInfo#PRIVATE_FLAG_EXT_REQUEST_FOREGROUND_SERVICE_EXEMPTION
1397      * @see R.styleable#AndroidManifestApplication_requestForegroundServiceExemption
1398      * @hide
1399      */
hasRequestForegroundServiceExemption()1400     boolean hasRequestForegroundServiceExemption();
1401 
1402     /**
1403      * @see ApplicationInfo#getRequestRawExternalStorageAccess()
1404      * @see R.styleable#AndroidManifestApplication_requestRawExternalStorageAccess
1405      * @hide
1406      */
hasRequestRawExternalStorageAccess()1407     Boolean hasRequestRawExternalStorageAccess();
1408 
1409     /** @hide */
isApex()1410     boolean isApex();
1411 
1412 
1413     /**
1414      * @see R.styleable#AndroidManifestApplication_updatableSystem
1415      * @hide
1416      */
isUpdatableSystem()1417     boolean isUpdatableSystem();
1418 
1419     /**
1420      * @see ApplicationInfo#enabled
1421      * @see R.styleable#AndroidManifestApplication_enabled
1422      * @hide
1423      */
isEnabled()1424     boolean isEnabled();
1425 
1426     /**
1427      * @see ApplicationInfo#FLAG_EXTERNAL_STORAGE
1428      * @hide
1429      */
isExternalStorage()1430     boolean isExternalStorage();
1431 
1432     /**
1433      * @see ApplicationInfo#FLAG_IS_GAME
1434      * @see R.styleable#AndroidManifestApplication_isGame
1435      * @hide
1436      * @deprecated
1437      */
1438     @Deprecated
isGame()1439     boolean isGame();
1440 
1441     /**
1442      * @see ApplicationInfo#PRIVATE_FLAG_HAS_DOMAIN_URLS
1443      * @see R.styleable#AndroidManifestIntentFilter
1444      * @hide
1445      */
isHasDomainUrls()1446     boolean isHasDomainUrls();
1447 
1448     /**
1449      * @see PackageInfo#mOverlayIsStatic
1450      * @hide
1451      */
isOverlayIsStatic()1452     boolean isOverlayIsStatic();
1453 
1454     /**
1455      * @see ApplicationInfo#PRIVATE_FLAG_PARTIALLY_DIRECT_BOOT_AWARE
1456      * @see R.styleable#AndroidManifestActivity_directBootAware
1457      * @see R.styleable#AndroidManifestProvider_directBootAware
1458      * @see R.styleable#AndroidManifestReceiver_directBootAware
1459      * @see R.styleable#AndroidManifestService_directBootAware
1460      * @hide
1461      */
isPartiallyDirectBootAware()1462     boolean isPartiallyDirectBootAware();
1463 
1464     /**
1465      * If omitted from manifest, returns true if {@link #getTargetSdkVersion()} >= {@link
1466      * android.os.Build.VERSION_CODES#DONUT}.
1467      *
1468      * @see R.styleable#AndroidManifestSupportsScreens_resizeable
1469      * @see ApplicationInfo#FLAG_RESIZEABLE_FOR_SCREENS
1470      * @hide
1471      */
isResizeable()1472     boolean isResizeable();
1473 
1474     /**
1475      * @see ApplicationInfo#PRIVATE_FLAG_ACTIVITIES_RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION
1476      * @see R.styleable#AppWidgetProviderInfo_resizeMode
1477      * @hide
1478      */
isResizeableActivityViaSdkVersion()1479     boolean isResizeableActivityViaSdkVersion();
1480 
1481     /**
1482      * True means that this package/app contains an SDK library.
1483      * @see R.styleable#AndroidManifestSdkLibrary
1484      * @hide
1485      */
isSdkLibrary()1486     boolean isSdkLibrary();
1487 
1488     /**
1489      * @see ApplicationInfo#PRIVATE_FLAG_STATIC_SHARED_LIBRARY
1490      * @see R.styleable#AndroidManifestStaticLibrary
1491      * @hide
1492      */
isStaticSharedLibrary()1493     boolean isStaticSharedLibrary();
1494 
1495     /**
1496      * @see PackageInfo#isStub
1497      * @hide
1498      */
isStub()1499     boolean isStub();
1500 
1501     /**
1502      * Set if the any of components are visible to instant applications.
1503      *
1504      * @see R.styleable#AndroidManifestActivity_visibleToInstantApps
1505      * @see R.styleable#AndroidManifestProvider_visibleToInstantApps
1506      * @see R.styleable#AndroidManifestService_visibleToInstantApps
1507      * @hide
1508      */
isVisibleToInstantApps()1509     boolean isVisibleToInstantApps();
1510 
1511     /**
1512      * @see ApplicationInfo#allowCrossUidActivitySwitchFromBelow
1513      * @see R.styleable#AndroidManifestApplication_allowCrossUidActivitySwitchFromBelow
1514      * @hide
1515      */
isAllowCrossUidActivitySwitchFromBelow()1516     boolean isAllowCrossUidActivitySwitchFromBelow();
1517 }
1518