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