RegisteredServicesCache caches services in an xml, so the system doesn't
have to scan all the apks. Whenever a package is changed
(add/remove/replaced), the broadcast receiver in RegisteredServicesCache
will refresh this cache by quering all matching services and reading
their
xml metadata. There is extra work done here, because only the changed
package
will have services added/removed.
The edge case is after a cache is invalidated, we want to query package
manager for everything, regardless of what changedUids is (we could
have arrived here if invalidateCache is called, and then a package
change event fires, before a getAllServices is called to rescan
everything).
Add a new test to verify that the optimization takes care of the case
when the cache is invalidated.
Bug: 117755076
Bug: 122912184
Test: atest RegisteredServicesCache
Test: dumpsys content # check sync adapters
Change-Id: I5c1f57108c4b67d24b198000d57216c63d35290a
Adding initial support for a content preview section within
the ChooserActivity. File/Image support is pending.
Bug: 120419296
Test: 'atest ChooserActivityTest' as well as visual inspection
of sharing from multiple google apps like Chrome
Change-Id: Iee4746940fb8ddd4f0a54a0bf7ef485be2eab30d
It is a helper in the system process that helps dumpstate and incidentd get
user confirmation to share reports
Bug: 123543706
Test: bit GooglePermissionControllerTest:*
Change-Id: Ia3fe4bd5257044ed89fe56ce683876fa03ba6c36
This gives the ONE app installed on the system the permission to
authorize the sharing of incident and bug reports with an app.
Currently that app is PermissionController. Package Manager
enforces that there is only one installed, and refused to boot
if that isn't the case.
Bug: 123543706
Test: bit GooglePermissionControllerTest:*
Change-Id: I76a7fad0ea36359bbb0ff09669df46202d059dab
This change implements support in the RollbackManagerService for
keeping track of pending backups and restores for users that are
credential unlocked, and subsequently performing after user
credentials are available.
All code pertaining to app data snapshot / rollback has been factored
out in AppDataRollbackHelper to allow for better mockability and
testing, given that integration tests for these classes are hard
to write. Some of the unit-tests for AppDataRollbackHelper contravene
good testing practices, but in combination with RollbackTest, they
exercise most code related to multi user scenarios.
Test: RollbackTest, AppDataRollbackHelperTest
Test: manual
Change-Id: I8debc24c9318cfd22e8c278dde7b5aee6688f3e6
Rather than implicitly reusing the PackageInstaller status codes.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I86929c0c1a5153c7f58e255e104b30fe96ddeca8
This is required for capturing playback audio for Tap2Captions. (Live
Captions).
Read the content capture service package name from the content capture
service name defined in the resources.
Change-Id: I6190e1eddf67a9f1d3d3718f61b22a0f235a05e9
Bug: 120408493
Test: manually that actions services has the permissions granted.
By passing a new causePackages list of VersionedPackage to
commitRollback and adding a RollbackInfo.getCausePackages() method to
retrieve the cause packages for committed rollbacks.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I3b52511fd7e31b6304e7a7c34180dbb4d20f6dbf
It should say false for disabled activities too.
Fix: 113135768
Test: manual test with "pm disable com.google.android.deskclock/com.android.deskclock.DeskClock"
and "pm enable"
Change-Id: Ib5d986178a1f37ef60268ff3cc58271b1e2808e7
To make it clear that the system only pays attention to the provided
rollback ID when committing a rollback.
Also, rename executeRollback to commitRollback in IRollbackManager.aidl,
now that we are touching the code anyway.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I315e75c39019536fb2f090a0c84ed4cf7c03ce8c
Includes @SystemApi for Context.NETD_SERVICE so system apps (including
the network stack) can obtain the service.
Test: m
Bug: 112869080
Change-Id: Ida63747cd30abb7b3c19559803353eb0e42e6efa
* changes:
Use "commit" instead of "execute" for rollbacks.
Rename PACKAGE_ROLLBACK_EXECUTED to ROLLBACK_COMMITTED.
Remove unused RollbackManager APIs.
Use RollbackManager.getAvailableRollbacks in RollbackTest
Use new RollbackManager API in RollbackPackageHealthObserver.
Add RollbackManager.getAvailableRollbacks API.
Include all relevant packages in RollbackInfo.
This was newly added to a now deprecated service. we can just
remove it and not provide backwards compatibility
Test: Built
Bug: 123221743
Change-Id: Ic7ff6674d3eafd98cd00f3a3e1d92c8161ba3f16
Allows a system app with the STATUS_BAR permission to toggle a default
set of disable flags during device setup.
Test: adb shell cmd disable-for-setup [true/false]
Bug: 114003699
Change-Id: Ieebcf7f8b101e408efe461ca64ad1114d96729c9
Which makes more sense for rollback of staged installs, where the caller
will have to reboot the device before the rollback takes effect.
Internal references to "execute" in IRollbackManager.aidl and the
rollback manager service implementation will be renamed in a follow up
CL.
Bug: 112431924
Test: atest RollbackTest
Change-Id: Ic2bb479873b309fc145e4eda3b347849ac219ac9
Because there's no need to distinguish between package and other kinds
of rollbacks, and for rollback of staged installs, committed is a more
appropriate name than executed.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I2a409de29ba82a7a3df2fd0b17f939795caa61d5
RollbackManager.getAvailableRollback and
getPackagesWithAvailableRollback are no longer needed given the
getAvailableRollbacks API. Remove them.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I88a50a0efd97dd5b45c68e0a3e3253f11d0284f6
Partial revert of ag/5808503 due to comment #27 and #29 of bug below
Fixes: 115639644
Test: builds
Change-Id: I31911569523023aa47ea53c1ae92b1663f7abca4
To replace getAvailableRollback and getPackagesWithAvailableRollbacks,
which will be removed in a subsequent CL.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I67adeb41df974aa5b375f16becdad5910ccc9c76