Adding abilities to debug:
- Attribute resolution stack (which resources are looked
at when resolving an attribute)
- Attribute value source (where did each attribute value
get defined)
- Get explicit style id (if a view had it set via style="...")
This feature will be behind Settings.Global flag that Android
Studio will set to the debugged application package ID.
Bug: 111439551
Test: atest CtsViewTestCases:android.view.cts.ViewStyleTest
Change-Id: Ib6f9fc81000bb867b5b94a68953c99b0bc802d6c
- PackageRollbackInfo now also stores list of users the package is
installed for and the inodes of backup CE data snapshot.
- Changed snapshotAppData to return a pair of
<pendingBackups, ceSnapshotInodes>.
- RollbackData is updated with CE user data snapshot inode after user
unlocks the phone and snapshotAppData call is made.
- Added javadoc to some methods in Installer.java to make lint happy.
Not sure how to automatically test:
- multi-user flow.
- the fact that user data snapshots were deleted. I can't access folder
with snapshot data in RollbackTest, because it is owned by installd.
Bug: 112431924
Test: AppDataRollbackHelperTest, RollbackTest
Change-Id: Ife15f1aed9cf1d2b15be238bdaf766c51b85cab6
We need a way for a content provider to say it always wants
permission grants, even though it is telling the system it doesn't
need permissions.
Change-Id: I50238ecd6a84e8b37f28145c36abe8a21de5c5eb
Fixes: 123704875
Test: manual (create screenshot, click edit in the notification)
The rollback manager needs to know the apk session to avoid doing an
extra backup of the apks when the apk session is applied post-reboot.
Bug: 112431924
Test: atest RollbackTest
Change-Id: Ie84969760b9b1fd3949a7241f23e52cfb403e294
For staged sessions, the staging manager calls through to the
Rollback manager during its pre-reboot flow if package rollback
is enabled for the session. It passes through a list of sessionIds
representing a single package session or siblings in a multi package
session that rollback must be enabled for. The rollback manager then
performs the following actions :
- Makes a copy of APKs and APEXes corresponding to the sessionIds
provided by the staging manager.
- Creates and persists RollbackData objects for the staged session.
and marks that they're part of a staged install and not a regular
install. This change augments RollbackData with sessionIds of
the staged session and PackageRollbackInfo with a flag indicating
whether or not it represents an APEX.
In a follow up change, the StagingManager will call through to the
RollbackManager post reboot and provide a mapping between the staged
session ID for the APK section of the staged install. This will allow
the RollbackManager to make userdata backups and finally mark the Rollback
as available.
Test: atest RollbackTest AppDataRollbackHelperTest
Test: adb install-multi-package --staged --enable-rollback \
./apex.test.apex ./RollbackTestAppAv2.apk
Change-Id: I4a7b154844684ddb26b7c95d39be36f542fb5d4b
This way PackageManager does not depend on RoleManager any more. Also
did some refactoring on RoleManagerService.
Bug: 123775970
Test: manual
Change-Id: I56c50d410ef212c960ffaa6212655b2f42870878
This is a temporary measure to allow staged installs for APKs to work on
dev-signed devices.
Test: adb install --staged file.apk on taimen-eng target; adb
install-multi-package file1.apex file2.apex file3.apk file4.apk
Bug: 123753157
Change-Id: I537afbb08cb0a5db37bb823f4b084691dcd2f5d1
These will be needed for the rollback manager to support rollback of
staged sessions.
Bug: 112431924
Test: atest RollbackTest
Change-Id: I22c02ba2de023af6cf6908207bf69ab36ca9291c
Currently only a boolean value (trim) is supported. If trim is true then the configuration (Configuration.java) is written only once, otherwise it is written 3 times. With this implementation too much information is written in the log and it is not possible to activate a continuous tracing mode without affecting system performance. Trace logging currently consumes ~1ms for each log write on a Pixel 2 device, divided into ~0.6ms to write the data to the ProtoBuf and ~0.4ms to it to the circular buffer.
This implementation converts this boolean into an enum and defines 3 different log levels (WindowTraceLogLevel enum): "Critical", "Trim" and "All".
"Trim" and "All" behave as the previously existing boolean. "Critical" is a new log level which logs only the elements which are visible with the minimum amount of information required for analysis. With this mode the average overhead of continuous logging drops to ~0.26ms on the same Pixel 2 device (0.2ms to write to ProtoBuf and 0.06 to add ot circular buffer).
The system automatically configures the log level between "Trim" and "Critical" according to the trace strategy used. When using continuous tracing mode it automatically uses the "Critical" level, otherwise it uses "Trim".
To activate the continuous mode use:
- adb shell cmd window tracing continuous true
Test: Flash a device. Set continuous mode to true and enable Winscope tracing. Start a systrace test for wm category and use the device. Check the "writeToProto" item to inspect the overhead.
Change-Id: I7abd74969b94abe44af4f7c65be5fefdd0860155
This change migrates the default browser to use role, while preserving
the old APIs.
Bug: 110557011
Test: manual
Change-Id: If0037e5d2a0d5dc24805bd66215a27e72927a0ef
This reverts commit e865b9d9bf.
Reason for revert: caused b/123709320, also non needed any more
Fixes: 123709320
Change-Id: I2afa0a60133a490ab433cd04dd03a5e26fb3fc14
In ag/5859897 we started tracking source styles for each TypedValue.
It is also useful to keep track of source layouts if the attribute
was resolved against a layout (attribute set in XML layout inside
of <View> tag).
Test: atest CtsContentTestCases:android.content.res.cts.TypedArrayTest
Bug: 111439551
Change-Id: Ie6bc6ecd9a22b536a2f3288263b896f9cec67d38
1. Now the value of manifest attribute foregroundServiceType can
be multiple flags ORed together.
2. Add a overloaded version of Service.startForeground() with an
additional parameter foregroundServiceType. The flags in parameter
foregroundServiceType must be a subset of flags specified in manifest
attribute foregroundServiceType, otherwise a IllegalArgumentException is
thrown.
3. Add a field foregroundServiceType in ServiceRecord, it is the types
that have been started on this foreground sevice.
Bug: 111453223
Test: atest frameworks/base/tests/FrameworkPerf
Change-Id: I7eb68f696e6bf75720fe9c9388a6c23a529677f7
Permissions that have the new apppredictor protection flag will
be granted to the app predictor app, which is AiAi for Pixels.
The MANAGE_APP_PREDICTIONS permission is updated to use the
app predictor flag.
App Predictor for Pixels already set in ag/6019430.
Some one-off handling for app predictor already added in
ag/6025266 and ag/6025267. This cl adds the appPredictor flag.
Test: Tested manually that it worked.
Test: atest CtsPermission2TestCases:PermissionPolicyTest
Bug:123599542
Change-Id: I0550930f78fdb57eea8680762c9b313a330968b6
Also remove the restriction of extractNativeLibs.
Test: build, (new) CTS in progress
Bug: 112037137
Change-Id: If0ad13b0d63b288c2da3a82b911d8dad0db8c07a
Define the DynamicAndroid with AIDL.
Add a java implementation.
Start a service instance in the system server.
Add a permission test.
Bug: 122015653
Test: Build & Test on a pixel phone with following command \
./frameworks/base/services/tests/runtests.py -e class com.android.server.DynamicAndroidTest
Change-Id: I2e54b6b71fac4a4c5a9c9c25ce6bdac74cddcfb7