| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
| |
This implements and API for apps to interface with NvCPL and by
extension the PowerHAL.
Reverse engineered from the Shield Experience 8.2.0 update then cleaned
up to match Android standards.
Co-authored-by: nift4 <nift4@protonmail.com>
Change-Id: I774ac62c8867151f21712cfeee25f96a591415ad
|
| |
|
|
|
|
|
|
| |
Bug: 217388602
Bug: 218875965
Test: atest EnterpriseResourcesTests
Test: manual
Change-Id: I8af03136e67057d171e97cb5a43187aa6c7f4fe7
|
| |
|
|
|
|
|
|
|
|
|
| |
Expose a system API PackageManager#makeUidVisible for
mainline module to make a package become visible to the caller.
Bug: 222205552
Test: atest AppEnumerationTests
Test: atest PermissionPolicyTest
Ignore-AOSP-First: (for packages/Shell/AndroidManifest.xml) Permission
Change-Id: I6cf322ddfea09a8a4c0c442a6789af4e79d294d7
|
| |
|
|
|
|
|
|
|
| |
Remove lock for cached state in ApplicationPackageManager.
Short-circut the instant app check for internal API calls.
Bug: 215305214
Test: presubmit
Change-Id: Ie122d76f6ea0e950fa25b22bea65f9938a3bf5f1
|
| |
|
|
|
|
|
|
|
| |
Bug: 218314884
Bug: 220320098
Test: presubmit
Test: atest PackageManagerShellCommandTest
Test: atest SdkSandboxPermissionTest
Change-Id: I9fb98e0caee75bdaaa35d11d174004505f236799
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each app will have it's own supplemental process with a different uid
that uniquely maps to the uid of the application that this supplemental
process corresponds to.
This will impact some of the PackageManager and PermissionManager APIs
(e.g. PackageManager.getPackagesForUid, or
PermissionManager.checkPermission). In order to make it possible for
PackageManager to correctly treat supplemental process uids, we first
need to teach it about the supplemental process APK itself, hence this
change.
Bug: 215241564
Test: atest PackageManagerShellCommandTest
Change-Id: I28f4a382900f276170c51e8c92d8fcde8419ddb1
|
| |
|
|
|
|
|
| |
Bug: 203548565
Bug: 188410712
Test: manual testing
Change-Id: Ibee6c28e8a231eab9c370af3065619c2dffa706a
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This facilitates exposing the Parsed_ classes as
@SystemApi(client = SYSTEM_SERVER) while keeping everything inside
services.jar rather than having it split across both jars.
This reverts getPackageArchiveInfo to use legacy PackageParser, since
framework.jar can no longer access the moved classes.
Bug: 214038417
Test: presubmit, no logic changes
Change-Id: I152d70fb4f643d32efb012cfb20b0fbc5f88f2d8
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 152453213
Tag: #refactor
This commit prepares PropertyInvalidatedCache to function as a system
api. Specifically, the methods recompute() and bypass() which may be
overridden by clients are now public (instead of protected). This
forces an update to all existing clients, to accommodate the change in
method visibility.
Two small changes have been made as cleanup:
1. The awkwardly named debugCompareQueryResults() is now
resultEquals(), which is more or less consistent with how other
equality tests are named in Android. This name change affects two
clients.
2. PackageManager has changed to use resultEquals() instead of
maybeCheckConsistency(). This provides a simpler and more
consistent use of the APIs. maybeCheckConsistency() has been made
private.
Test: atest PropertyInvalidatedCacheTests
Change-Id: I4110f8e887a4fd8c784141e8892557a9d1b80a94
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are running out of int flags for public API methods such as
PackageManager.getPackageInfo(String packageName, int flags). As a
solution, we will change the flags param to Flags objects. At the
same time, we deprecate the old methods that directly use int flags.
The new flags classes are: ApplicationInfoFlags, PackageInfoFlags,
ComponentInfoFlags and ResolveInfoFlags. Because there are already
annotations of the same names, we renamed the annotations to *FlagsBits.
Old API usage example:
getPackageInfo(pkgName, MATCH_UNINSTALLED_PACKAGES)
New API usage example:
getPackageInfo(pkgName, PackageInfoFlags.of(MATCH_UNINSTALLED_PACKAGES))
See b/204433742 for discussions.
CTS-Coverage-Bug: 206147270
BUG: 204432643
BUG: 204433659
Test: manual
Change-Id: I8ab2adad6907670c5879c043d170c950afefe46c
|
| |
|
|
|
|
|
| |
Bug: 204208748
Fixes: 204208748
Test: atest ChecksumsTest
Change-Id: I8d52e6b5b4f7156964c64da47c68084472d9c32f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves the main interface, which allows all internal
and eventually mainline APIs to live in the same place and
reference each other in code and docs.
A compatiblity interface called FrameworkPackageUserState was
maintained in the old location because a lot of _Info generation
code relies on it to wrap simple booleans and other getters.
Refactoring those methods to use direct parameters rather than
the interfaces was deemed not worth the effort, as there would be
a large number of new parameters and method calls to fix up.
This can be improved over time and maybe once parsing/_Info object
generation is removed from framework.jar, this compatibility
interface can be fully removed.
Bug: 201811826
Test: atest PackageUserStateTest
Change-Id: I23ab9be440f2bcf5bcf58fea42a355caf2c13933
|
| |
|
|
|
|
|
|
|
| |
Hides fields in preparation for exposure as interface only through
mainline API and easier migation to @DataClass with Watchable support.
Bug: 173455397
Change-Id: I09d426c50c39d806c5d8d3408de8691b092f68b3
|
| |
|
|
|
|
|
|
|
| |
For consistency with other similar APIs, rename api mayPackageQuery
to canPackageQuery of PackageManager.
Bug: 199879339
Test: atest AppEnumerationTests
Change-Id: I96367aeb113f7ae671f40bcbc89f2b9b970b0bd4
|
| |
|
|
|
|
|
|
|
|
|
| |
This CL creates a new API PackageManager#mayPackageQuery for
applications that share details about other applications to
determine if those details should be withheld from callers
that do not otherwise have visibility of them.
Bug: 145916881
Test: atest AppEnumerationTests
Change-Id: I2dfba1169bce3d9fa88a75c92a22f53e1efe01b5
|
| |
|
|
|
|
|
|
|
|
|
| |
This cl creates a new API setComponentsEnabledSetting in PackageManager.
It accepts a list of component changes that applies them all atomically
in order to improve performance and minimize the risk of errors for the
applications.
Bug: 189883959
Test: atest PackageManagerTest
Change-Id: I64d9f46198e26e001e79ca9c198c26929adf8596
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit 8d6900e011733c368c833d751fda7973af125d18.
Reason for revert: The UIDs in this CL are Linux UIDs, which are never
negative. The @UserIdInt annotation is incorrect and the bypass()
override is unnecessary. See the comments on ag/15339446 for another
instance of this issue.
Change-Id: I79ccbb40c3f0ab1a3bb48f55da5a72696d4fb2b1
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add package visibility filtering to the implementation. Besides,
ensure the correct behavior in the AppEnumerationInternalTests.
Bug: 187722308
Test: AppEnumerationInternalTests
Test: manually using the PoC in the buganizer to ensure the symptom
no longer exists.
Change-Id: I79ddb18ea07d662df0238673ab0939b32a8daf8a
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 186778818
PropertyInvalidatedCache queries that contain wildcard user IDs are no
longer cached. Some simple multi-user tests show that no current
caches use wildcard user IDs, so the change has no effect on
performance. The bypass() mechanism is used to avoid the cache when
necessary.
Test: atest
* FrameworksServicesTests:UserManagerServiceCreateProfileTest
Change-Id: I092d1385cc254b3f595ae3d0322f77dbaf456b65
|
| |\
| |
| |
| |
| |
| |
| |
| | |
am: 5044308999 am: f0b67496fe am: 40339140a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14670362
Change-Id: I22ccff3e00f0b359e4519383fa859b34c99de6a0
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
The API is moved from PermissionControllerManager (only a System API)
to PackageManager to expose it as public API.
Bug: 182094776
Test: atest GetPermissionGroupInfoTest
Change-Id: I175afb2e37bf2651b91765029645f7940f58f39c
|
| |\|
| |
| |
| |
| |
| | |
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14377096
Change-Id: I923a79acf57ef760bdd2172c8d2ebdb2326dc7b3
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Use two separate interfaces for flags and single value. This produces
correct API documentation.
Bug: 160605420
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I9a7eaf86af558d8dcfd1636a4baf6a28e2ee79b1
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
PackageManager#getLaunchIntentForPackage returns null if the caller
is not allowed to query the package. This cl adds a new api using
the same implementation with the #getLaunchIntentForPackage. Instead
of returning the Intent, it returns the IntentSender which is not
restricted by package visibility.
Bug: 175336608
Test: atest android.content.pm.cts.PackageManagerTest
Change-Id: I43524f26b27b2278417dae1a75bcdeb0447b8273
|
| |
|
|
|
|
|
|
|
| |
Also made sure to invoke the callback on the main
handler thread, like all other callbacks.
Fixes: 182164620
Test: atest PackageManagerTests
Change-Id: Ic2abe0877a716e83a10965bf348888a53ae95db8
|
| |
|
|
|
|
|
|
|
|
|
| |
This reverts commit e756211374748cea87b17d1e100dc44dd818d3e7.
Reason for revert: Apparently this is used; b/179601086
NoNonSdkCheck: The original change erroneously removed the method from the block-list; this reinstates the method
Fixes: 179601086
Test: builds
Change-Id: I383bc0a0e2a319b24e11aa7a07a69603efff706f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RROs have historically been APK packages. We now have the ability to
generate RROs on-the-fly. These "fabricated" RROs are not APKs.
ApplicationInfo#resourceDirs documentation states that it only contains
paths to packages. To prevent changing the behavior of resourceDirs
until we can deprecate and remove it, a new overlayPaths field has been
added to ApplicationInfo. This new field contains APK overlay paths as
well as non-APK overlay paths.
Bug: 172471315
Test: boot enable/disable overlays and examine overlays working as well
as package manager dumpsys
Change-Id: I78c5eeef73b7d8bada61edc0f64a12a3cdc1ce16
|
| |
|
|
|
|
|
|
|
| |
Listener is more secure as nobody can send a broadcast with invalid
digests.
Bug: 160605420
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest PackageManagerServiceTest ChecksumsTest
Change-Id: I5f6ec3f0fa975d274d456d11d57be61d0b245e80
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to passing in display metrics. We can use
ActivityThread.currentApplication() as the context for getting
PermissionManager in system server process because it will be created
early in ActivityThread.attach() before any custom logic can run, but
it becomes a problem for apps because they can run their own logic by
overriding Application.attachBaseContext() and do things there before
ActivityThread.currentApplication() becomes non-null.
So pass in the split permissions explicitly as an external dependency
for ParsingPackageUtils, and move the getPackageArchiveInfo()
implementation from PackageManager to ApplicationPackageManager to
utilize the context there. PackageParser2 can get the split
permissions internally because it's only used in system server.
Fixes: 178155985
Test: manual
Change-Id: I8213cf752e16b08328ad1150b2639da18c5d0e83
(cherry picked from commit 7b8974d375c74ff228d71b1f038f48cfb46c6d7c)
|
| |
|
|
|
|
|
|
|
|
|
|
| |
and getting resources for a particular config
This would allow fetching display infos for the activity in a particular
config independent of system config.
Bug: 156154533
Test: Included CTS
Change-Id: Ie245d685fb21444c10a88b4ca86dc7ff08e2b599
Merged-In: Ie245d685fb21444c10a88b4ca86dc7ff08e2b599
|
| |
|
|
|
|
|
|
|
|
| |
Rotation Resolver Service provides the suggested screen rotation
to the system server.
Bug: 162359770
Bug: 172370409
Test: atest RotationResolverManagerPerUserServiceTest
Change-Id: Ia43dfdba8502e04768933ef46a4ac8a687d4936c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A number of permission-related methods were implemented in
ApplicationPackageManager by calling the IPermissionManager AIDL
interface. However since we are moving permission into module, the
AIDL inteface can't be an API and the implementions must be moved.
This change moves these methods into PermissionManager, with the
javadoc and interface from PackageManager and the implementation from
AppliationManager. The javadoc remains mostly the same except for
style and typo fixes. The API interface also remains the same except
for inclusive language changes since we are defining new one and have
a chance to fix them now.
We have to lazily get the PermissionManager instance because the
context passed in may be null for an instrumentation use case.
Bug: 158736025
Test: presubmit
Change-Id: I1c28433ca6200679a41e3518354fe03b866621b5
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Default apps (browser, dialer and home) are by no means a concept of
permission, so they should not be exposed as permission
manager API. Instead, they should be accessed via role manager API.
This change moves getDefaultBrowser() and setDefaultBrowser()'s AIDL
interface and implementation into RoleManagerService. Package manager
has a number of special behaviors regarding these default apps, so we
can not pretend that package manager doesn't know about these
roles. After all, we can say permission and role are at the same level
in the system after recent refactoring that split permission and
package. So package manager is reusing the public role API now.
The new methods moved to RoleManagerService needs to be system APIs on
RoleManager, because IRoleManager cannot be a system API and we need
to delegate method calls to it from ApplicationPackageManager.
The other methods directly calling into DefaultPermissionGrantPolicy
should be moved/refactored as well, depending on whether we want to
mainline it, in a later change.
Bug: 158736025
Test: presubmit
Change-Id: I84b9519a084e410875a3c3e88b33e9a612e7de98
|
| |
|
|
|
|
|
| |
Bug: 169258655
Test: atest CtsContentTestCases:PackageManagerGetPropertyTest
Test: atest CtsContentTestCases:PackageManagerQueryPropertyTest
Change-Id: I91d58cd42e7f1f10b0e494ff9f318a9e3fa073db
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
This is a resubmit of ag/12929664 with some APIs excluded that caused
test failures; see bugs 171886397, 171888296, 171864568.
APIs excluded:
Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord;
Landroid/os/Process;->myPpid()I
Landroid/os/SharedMemory;->getFd()I
Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I
Bug: 170729553
Test: Treehugger
Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6.
Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397
Bug: 171886397
Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
|
| |
|
|
|
|
|
|
|
|
| |
These are APIs that have @UnsupportedAppUsage but for which we don't
have any evidence of them currently being used, so should be safe to
remove from the unsupported list.
Bug: 170729553
Test: Treehugger
Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Those annotations could be inferred by some tools (like Kotlin), but the
https://checkerframework.org/ doesn't check inherited annotations
complaining about all equals() invocations that get nullable argument.
The change was generated by running
find . -name \*.java | xargs sed -i 's/public boolean equals(Object /public boolean equals(@Nullable Object /'
in the frameworks/base directory and by automatically adding and
formatting required imports if needed. No manual edits.
Bug: 170883422
Test: Annotation change only. Should have not impact.
Exempt-From-Owner-Approval: Mechanical change not specific to any component.
Change-Id: I5eedb571c9d78862115dfdc5dae1cf2a35343580
|
| |
|
|
|
|
|
| |
Fixes: 169153620
Fixes: 168601298
Test: atest ChecksumsTest
Change-Id: Ibe593ccd388ad56f01ba0e3f58fb5a17c86e5e5c
|
| |
|
|
|
|
|
|
|
|
|
| |
For quickly checking an app's targetSdkVersion without building and
returning an entire ApplicationInfo object.
Bug: 164459559
Test: atest android.content.pm.cts.PackageManagerTest#testGetInfo
Change-Id: Ibe1a3e977cd71b23e26395eb6cc73f61c1a85a0e
|
| |
|
|
|
|
|
|
|
|
|
| |
5d9710d5b72136b2face76b578ac120ad6ed931e
Bug: 160605420
Fixes: 168445565
Test: atest ChecksumsTest
Test: atest ApkVerityTest:com.android.apkverity.ApkVerityTest
Change-Id: Ib559ad9107996290f4ae4661ccec4dc14658a7e9
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert "Tests for installer-provided checksums."
Revert submission 12538860-installer-digests
Reason for revert: Droidcop: Potential culprit for b/168445565
Reverted Changes:
I112ba8594:Tests for installer-provided checksums.
I69a787bde:Digest API: allow installer to provide digests for...
Bug: 168445565
Change-Id: I2276373024bb951719cf056d28c4de0838c0519f
|
| |
|
|
|
|
|
| |
Bug: 160605420
Test: atest ChecksumsTest
Change-Id: I69a787bde596c9841ba04772a06c227d902f721f
|
| |
|
|
|
|
|
| |
Bug: 160605420
Test: atest ChecksumsTest
Change-Id: I08ef0b131c44313f2c6acddad00dfa03598cc1ff
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change migrates the previous usages of
ResourcesManager#getResources() from using the display id of expected
resources to an override display ID which will override the display
properties from the parent token resources. This ensures that all
contexts derived from a display context keep the overrides for their
intended display.
This also changes the meaning of ResourcesKey#mOverrideConfiguration and
ResourcesKey#mDisplayId. Previously mDisplayId was used as both the
current display of the ResourcesKey and used to apply overrides
to mOverrideConfiguration. This made it unclear whether a particular key
should keep its display override when an activity changes display or
whether it should inherit the new display from the activity. Now the
display IDs and overrides are managed by the ActivityResources struct and the
ResourcesKey is expected to only contain the final display ID expected
for the resources in 'mDisplayId' and the final configuration that should
be applied to the global configuration in 'mOverrideConfiguration'.
Fixes: 153866583
Fixes: 156758475
Fixes: 163813210
Fixes: 163812902
Fixes: 163813227
Test: ActivityThreadTest
Test: ResourcesManagerTest
Test: AppConfigurationTests#testActivityContextDerivedDisplayContextOrientationWhenRotating
Change-Id: If93f98f93ee15b27d8c7292a2f830c2cc0f49277
|
| |
|
|
|
|
|
|
|
|
| |
PackageNamePermissionQuery (and all that uses it) speaks
of uid, but it actually stores/queries a userId. We therefore
rename the variable/parameter from uid to userId, as appropriate.
Bug: 163651060
Test: still compiles (no functional changes were made)
Change-Id: I3db2263a3f960d7eda35466a2e9058fe6f27e49a
|
| |
|
|
|
|
|
|
|
|
|
| |
With this change, if user selects a preferred activity with "Always"
checked, there will only be one mAlways=true intent filter
for a given action.
BUG: 161394369
Test: manual
Test: atest FrameworksServicesTests
Change-Id: I3d5ee0130f6f07530bb53f9c1509d5121a46a34a
|
| |\
| |
| |
| |
| |
| |
| |
| | |
am: 8ce472840e am: ebd42f9dd3 am: df1adc879d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11959996
Change-Id: I352500452191b1a012ec486a8474c1210fbc9ea1
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The reason is passed to app exit info so a given app can get more
information about why their app was killed in the event of permission
revoke.
Test: atest RevokePermissionTest ActivityManagerAppExitInfoTest#testPermissionChangeWithReason
Fixes: 159659620
Change-Id: Id711667eb2c1579ecb2a1b83a62af3cc7862d5f6
|