Since uninstalling apexes is development/testing operation, only root
and shell are allowed to perform it.
Test: adb uninstall + adb reboot
Bug: 123667725
Change-Id: Ifd7b743b2581dbdeebd63c33fd343a830dfc377a
and the mechanism to use it
Since both starts and bindings might be contributing to the service
being whitelisted, track the state in ServiceRecord and update
the parent process accordingly when changes happen.
While we're at it, add that flag for bindings to accessibility
services, voice interaction services and QSTiles.
Also, make the timeout constant configurable for start-based
whitelisting.
Bug: 124298522
Bug: 123495976 (accessibility services)
Bug: 123337181 (paying via NFC, like Google Pay)
Bug: 122887611 (binding to InCallService)
Bug: 127774234 (binding to QSTile)
Bug: 124288681 (binding to voice interaction services)
Test: atest WmTests:ActivityStarterTests
Test: atest AccessibilityServiceConnectionTest
Test: manual with:
1) notifications from calendar and dynamite to test service starts
whitelisting
2) enabling talkback and livetranscribe to test service bindings
whitelisting
3) adding the LastPass QSTile and clicking on it
Change-Id: I8b6f23f999683920411ca40ab5b25c688a4f7055
This change adds TestAPIs for tests to retrive an instance of
ConnectivityManager, allowing it to build test TUN interfaces, as well
as test networks.
This also integrates the TestNetwork types with ConnectivityManager,
creating virtual networks if the network agent is a test agent.
Bug: 72950854
Test: Compiles, CTS tests using this passing correctly
Change-Id: I741ef9cdf4bd4125d9129af3a030edf32f438e4f
Backwards compatibility takes a slight performance hit. Only apply this
rule to outdated system apps as they are the only ones that use these
libraries.
Bug: 86259915
Test: boot Pixel 2
Test: boot Pixel 3 and systrace app startup
Test: atest android.content.pm.AndroidHidlUpdaterTest
Change-Id: I2d2e2ca79266a92ba0e4efcf25e31d15daee87a1
This moves PackageBackwardCompatibility from parsePackage to
applyPolicy.
The motivation of this is to expose partition information to these
files. Specifically, to expose whether the app is a pre-installed
(or updated pre-installed app) for certain backwards compatibility
rules that should only apply to these cases.
Bug: 86259915
Test: boot Pixel 2
Test: Pixel 3: atest -p cts/tests/signature
- all passed except for CtsSystemApiAnnotationTestCases test which
failed (known issue b/124210145)
Change-Id: Ic824f06489781233dc98bf3dc0182681d32f7142
This ensures that there might be at most one committed non-finalized
(i.e. either applied or failed) session.
Note that from StagingManager POV atomic staged install is considered to
be a single session that is represented by the parent session of an
install.
Test: run adb install --staged foo.apk twice.
Test: StagedRollbackTest
Bug: 127296534
Change-Id: I497723173745d4f6eb64b7d22fa3adb0f9e8f6c0
... in order to remove unnecessary code.
9e4da717 Revert "Flip default of extractNativeLibs if targets Q+"
fe693a07 Revert "Fix default of extractNativeLibs in parseBaseApplication"
86e2783d Revert "Partial revert to not flip the default of extractNativeLibs"
Test: atest CtsDynamicLinkerTestCases
Bug: 128335904
Change-Id: I0e43608a76b3891e84c1622c7a98e2a1dab91985
Adds @TestApi for all system apis needed for RollbackTests.
Removes @SystemApi for RollbackManager.expireRollbackForPackage and
RollbackManager.reloadPersistedData, which were always intended to be
used solely for testing.
Bug: 127282563
Test: atest RollbackTest StagedRollbackTest
Change-Id: I183b8a484b4a08f36fc19d64241ab408d28c64ca
The uid information of a removed package cannot be retrieved by the
packageName anymore once it is removed. So it would be useful to provide
the uid of removed package in the onPackageAdded and onPackageRemoved
method of the PackageListObserver. This modification helps simplify the
design in PermissionMonitor.
Bug: 125396053
Test: dumpsys netd trafficcontroller
Change-Id: I2bd4bdf924687960a4fa3a47235bae68d885e445
The original changes are 4e54b521 and 12dd9cd4.
Test: atest CtsDynamicLinkerTestCases
Bug: 124353586
Bug: 112037137
Bug: 128335904
Change-Id: Ie55bc735aebcf33d1561b5c225a8bac8d68e85e2
Mark PackageInstaller.SessionParams#setEnableRollback() as @removed and
@deprecated.
Add PackageInstaller.SessionParams#setEnableRollback(enable).
Replace old API usages in RollbackTestUtils with the new API.
Also, add PackageInstaller.SessionInfo#getEnableRollback().
Fixes: 127282838
Test: atest RollbackTest
Change-Id: I696680207be5ac06560d2abb525f91a100301b4c
Xml.asAttributeSet with a null returns non XmlBlock.Parser type
object.
This fixes the existing test that broke due to my changes to
LayoutInflater.
Test: atest CtsViewTestCases:LayoutInflaterTest
Change-Id: Ib10e07ef3814c5570a6d2bd334481f2e26bb3d3e
Turns out this method is generaly useful outside of View construction.
Test: added CTS test
Bug: 127855851
Change-Id: Ia2a5a3a9dc5eac5a1da51e7df6989bb09b141141
Only require a less-powerful, but heavily restricted permission to the
the permission flags.
Bug: 124317989
Test: Built
Change-Id: Ibdd6baea6dcee57dc327c28663a136e47e80dcb8
This allows us to expose both system-only and app available APIs for
role in RoleControllerService.
Bug: 127691087
Test: manual
Change-Id: I86fe3736fc28516aae25d48efe3ba599ffdf45d5
Add them to the "all flags" mask. We cannot change the value of a
constant in the API, hence need to deprecate it. This change does
not create a new API with the new value to not have the same problem
again.
Register the flag type in the IntDef and toString methods.
Test: Set permission flags, rebooted and verified that flags get
restored.
Bug: 124317989
Change-Id: Ia68053a937be7dc47af6e313e66e87f3228a2d14
Bug: 124317989
Test: adb shell dumpsys package com.google.android.apps.messaging
and ensure permissions without flag GRANTED_BY_DEFAULT have flag USER_VISIBLE
Change-Id: Ie3129a87a4391cb5a52ccda1b84fa46585850432