Commit Graph

6236 Commits

Author SHA1 Message Date
Nicolas Geoffray
87d840addd Merge "Support for showing percent progress in boot animation." 2021-02-01 09:51:30 +00:00
Ricky Wai
2007b0564e Return error in "sm unmount-app-data-dirs" if app data isolation is not enabled
This command should not do anything when feature flag is off,
and let developer knows this command fails.

Bug: 177228735
Test: run "sm unmount-app-data-dirs" when the app data isolation flag is off and returns error message
Change-Id: If07107712e8215a58ffade08aedce3e80ad1ac12
2021-01-22 10:15:01 +00:00
satayev
f1d5754c10 Merge "Enable @TestApi access for instrumentation." 2021-01-21 14:13:44 +00:00
Mitch Phillips
b3f5d59011 Merge "[MTE] Enable ASYNC MTE in the Zygote." 2021-01-20 18:30:07 +00:00
Artur Satayev
244fa92fc1 Enable @TestApi access for instrumentation.
Since introduction of ALLOW_TEST_API_ACCESS, it is now possible to
grant access to test apis for the whole UID, instead of just a starting
process.

This resolves the issue, where a forked test process cannot access @TestApi's.

Bug: 147113465
Test: atest CameraEvictionTest#testBasicCamera2ActivityEviction
Merged-In: I8dd3bbacdb263a3e30539f43d8081f6d78e80155
Change-Id: I8dd3bbacdb263a3e30539f43d8081f6d78e80155
2021-01-20 14:15:14 +00:00
Ricky Wai
e81ebc69c3 New sm command to unmount app data and obb app visibility mount
This command will be used in tests so tests won't mount data and obb
dirs anymore so won't be killed by system when volume is unmounted.

Bug: 148049767
Test: Enable storage app visibility flag, then run "sm unmount-app-data-dirs  PKG PID USER_ID", data and obb are not mounted in /proc/$PID anymore.
Change-Id: Ie5ddf55471f59c61e1906664b87a9bf889702536
2021-01-15 14:06:29 +00:00
Mitch Phillips
17de88981f [MTE] Enable ASYNC MTE in the Zygote.
This allows applications to turn on MTE. The current design of MTE
inside of Scudo doesn't allow us to late-enable MTE (but we can
late-disable it). Thus, we have to enable tagging in the Zygote in order
to allow apps and the system_server to control their own MTE behaviour.

We intentionally use ASYNC mode so that we don't waste memory collecting
stack traces from the zygote pre-fork. Given that the zygote is mostly
Java code, the process itself should be pretty low risk for memory
corruption.

Bug: 135772972
Bug: 172365548
Test: On FVP: atest -s localhost:5555 \
com.android.cts.tagging.TaggingSdk30Test#testMemoryTagChecksCompatFeatureEnabled \
com.android.cts.tagging.TaggingSdk30Test#testMemoryTagChecksCompatFeatureDisabled

Change-Id: I9da2c33cb6022033264f443308d5508b3ff8da9e
2021-01-13 14:37:08 -08:00
Nicolas Geoffray
bbb00e78ef Support for showing percent progress in boot animation.
Bug: 175686819
Test: boot with manual changes updating the progress

Change-Id: I2d936e3391f56796308c90deb39ecacc58797721
Merged-In: I2d936e3391f56796308c90deb39ecacc58797721
2021-01-11 13:56:21 +00:00
Bernie Innocenti
58cf8e3ffa Add explicit Result::ok() checks where needed
Test: m checkbuild continuous_instrumentation_tests continuous_instrumentation_tests_api_coverage continuous_native_tests device-tests platform_tests
Exempt-From-Owner-Approval: mechanical mass refactoring
Change-Id: I3117833c51cdb333cccdfd159d1582f2adef77db
2020-12-21 15:50:57 +00:00
Ryan Mitchell
314863c132 Merge changes from topic "inc-hard-am"
* changes:
  Revert^2 "Cache resolved theme values"
  Set resource id correctly when resolve fails
  Revert^2 "libandroidfw hardening for IncFs"
  idmap2: remove call to obsolete 'idmap2 verify' from valgrind.sh
  idmap2: remove the 'scan' command
2020-12-14 20:42:03 +00:00
Ryan Mitchell
80094e39f9 Revert^2 "libandroidfw hardening for IncFs"
55ef6167a2

Change-Id: I02d4890d181655dfd0a14c188468db512559d27b
Merged-In: I02d4890d181655dfd0a14c188468db512559d27b
2020-12-08 16:58:12 +00:00
Mårten Kongstad
ec7e7f5622 idmap2: remove call to obsolete 'idmap2 verify' from valgrind.sh
The 'verify' command was removed as part of a707013b78. Update
valgrind.sh accordingly.

Test: frameworks/base/cmds/idmap2/valgrind.sh
Change-Id: I571cb46bb2ca09a244dc7b609a8bb0ffe01a6e2a
Merged-In: I571cb46bb2ca09a244dc7b609a8bb0ffe01a6e2a
2020-12-08 16:57:07 +00:00
Mårten Kongstad
6532483950 idmap2: remove the 'scan' command
The 'scan' command has been replaced by 'create-multiple'. Remove the
unused code.

Also remove unused functions and #includes from FileUtils, and the
obsolete JNI plumbing.

Test: atest idmap2_tests OverlayDeviceTests OverlayHostTests
Change-Id: Iae073c13ce64b5db48f22f7e723bc8c0c5fcd2c9
Merged-In: Iae073c13ce64b5db48f22f7e723bc8c0c5fcd2c9
2020-12-08 16:54:51 +00:00
Jeff Sharkey
9af6ac78b0 Merge changes from topic "dec5" am: c2793cf12b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519384

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ifdc390f5ae046c515a30158f3f55b831be147547
2020-12-08 16:05:11 +00:00
Jeff Sharkey
52b9862f87 Improve OWNERS coverage across frameworks/base/.
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.

Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas.  Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:

-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage

Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance.  With this extensive
effort, we've now improved our coverage as follows:

-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage

This specific change is automatically generated by a script that
identifies relevant "include" directives.

Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
Change-Id: I3480ddf2fe7ba3dfb922b459d4da01fa17a2c813
2020-12-08 08:36:28 -07:00
Xin Li
8836e88707 DO NOT MERGE - Merge RQ1A.201205.011
Bug: 172690556
Merged-In: I26bed08456197721d07f2fab563be0c54e43efd2
Change-Id: Ic1ac100efa50687ccfcbb87ee91a57703105afad
2020-12-07 00:39:42 -08:00
Baligh Uddin
3eab1b0983 Migrate frameworks/base/cmds/statsd to packages/modules/StatsD/bin
Add statsd protos to platform_protos rule

BUG: 167962588
TEST: TH
TEST: Local build [ m com.android.os.statsd ]
Merged-In: I053f2a211ea28c2f181937af3d58ad16b235d096
Change-Id: I637a1af27d572924e88b1f8a930fc45d0794fa20
2020-12-04 00:40:07 +00:00
Baligh Uddin
5913866804 Merge "Temporary apply OWNERS block for migration" 2020-12-01 23:01:40 +00:00
Philip Junker
f1291ba703 Send shutdown callback only during animation destruction
The shutdown callback is currently used only by audioplay.cpp to destroy the audio player.
Sending shutdown when the animation is destructed makes sure the audio
player is not being destroyed before its boot animation part is being displayed.

Test: Modified bootanimation, sound in second last part of bootanimation
plays
Bug: 157407957
Bug: 127254055
Merged-In: I47f57643791e73e4a4fa1597309dccb1f52f2316

Change-Id: I47f57643791e73e4a4fa1597309dccb1f52f2316
2020-12-01 16:45:52 +01:00
Baligh Uddin
2228195331 Merge "Revert "Add OWNERS block to facilitate in migration"" 2020-11-30 17:21:25 +00:00
Baligh Uddin
add50828c6 Revert "Add OWNERS block to facilitate in migration"
This reverts commit 9e569671a3.

Reason for revert: atoms and associated protos have been migrated.  Removing migration block.

Change-Id: Ia1e4a73001ebc9509b8550c7957135172ce8938d
BUG: 167962588
Test: TH
2020-11-30 15:46:34 +00:00
Baligh Uddin
86e53e5db7 Temporary apply OWNERS block for migration
BUG: 167962588
TEST: TH
Change-Id: Ia168658c499e19f99aac05cb379155669a3e1431
2020-11-30 15:34:58 +00:00
Jeffrey Huang
17df403e9e Move enums file to new directory
Bug: 167962588
Test: m -j
Change-Id: I29b21fdc98c6c795902d23f21ef3dfd11d3f3216
Merged-In: I29b21fdc98c6c795902d23f21ef3dfd11d3f3216
2020-11-25 16:14:08 -08:00
Jeffrey Huang
5d230a2d49 Delete atoms.proto from statsd
Use the atoms.proto in proto_logging as the source of truth. Also
migrates statsd log api gen to use the new atoms.proto

Bug: 167962588
Test: m -j && m CtsStatsdAtomHostTestCases

Change-Id: I36ec354d273dceace5245d7634c68ac63dc5a8cd
Merged-In: I36ec354d273dceace5245d7634c68ac63dc5a8cd
2020-11-24 10:57:06 -08:00
Baligh Uddin
9e569671a3 Add OWNERS block to facilitate in migration
BUG: 167962588
Test: TH
Change-Id: Ia8cdeb0c2bd0e98d8d6b8a44f49d42ccd0d04908
2020-11-22 14:59:22 +00:00
Nikita Iashchenko
ff64fd0f36 Import TLS handshake atom for Conscrypt
Bug: 160345816
Test: m droid
Change-Id: I7ddf7626376bd649c8b10306d464b783cf16959b
Merged-In: I142a792c34dced6b0e27b867ed3a1d95249a5f7f
2020-11-03 16:48:04 +00:00
Yegor Malyshev
21819ef3b6 Merge "Support animation parts fading out" 2020-10-20 08:55:02 +00:00
Treehugger Robot
72864d2930 Merge changes I1d3e5e66,I86b869af,Iab4d3902,I645ee722
* changes:
  Fix <overlay-config-signature> comments
  Fix non-inclusive OMS test language
  Remove malloc/free for inline overlay values
  OMS: Add config_signature policy handling
2020-10-19 17:57:33 +00:00
Yegor Malyshev
eafcb99786 Support animation parts fading out
This support helps with several things:
- simpler animation structure (size, number of items)
- more room for designers avoiding thinking about exit part
- time saving as complete parts now can be safely used as fading parts

Bug: 167352662
Test: Manual testing of major/edge cases
  - backward compatibility => "f 0" is mapped to "p", "p" still works
  - only trimmed areas are faded out
  - clock is not faded out (wear case)
  - adb shell su root bootanimation
  - [c, (exit) f 120, c] => "f 120" fades out and "c" completes
  - [c, (exit) f 120, f 320] => "f 120" fades out and "f 320" skipped
  - [c, f 16, (exit) f 120] => "f 16" played, "f 120" fades out
  - [c, (exit) f 0, f 120] => "f 0" skipped, "f 120" fades out

Change-Id: I9b200ee7107ef9b3dc8d711658ed1042b83739c2
Merged-In: I9b200ee7107ef9b3dc8d711658ed1042b83739c2
2020-10-19 14:33:17 +02:00
Ryan Mitchell
70e02d4285 Fix <overlay-config-signature> comments
Fix comments that refer to <overlay-config-signature> as
<config-signature>.

Bug: none
Test: build
Change-Id: I1d3e5e66ec3da993082f3441997b0d243d61520b
2020-10-14 14:53:01 -07:00
Ryan Mitchell
bf1f45b071 Remove malloc/free for inline overlay values
Remove malloc/free of android::ResTable_entry for inline overlay
values.

Add `target_entry_inline` to the idmap format to encode inline overlay
values separate from direct mapping of target resource to overlay
resource. This reduces the number of bytes needed to represent a direct
mapping of target resource to overlay resource from 9 bytes to 8 bytes
per entry.

Fixed all idmap alignment issues that required the framework to use
"#pragma pack(push, 1)" when loading idmaps.

Bug: 170341022
Test: idmap2_tests and libandroidfw_tests
Change-Id: Iab4d3902508f02773464724913e0ee966e3689e4
2020-10-14 14:52:52 -07:00
Zoran Jovanovic
0f942f99ca OMS: Add config_signature policy handling
Alongside SIGNATURE and ACTOR_SIGNATURE policies, add CONFIG_SIGNATURE
policy to overlayable that overlay fulfills if it is signed with the
same certificate as the reference package whose package name is
declared in 'config-signature' tag of SystemConfig and is vetted by
OMS that it's a system pre-installed package.

BUG: 158726924
TEST: regular aapt2, idmap2, OMS tests

Merged-In: I645ee72271496008742886274be0d63a2985201b
Change-Id: I645ee72271496008742886274be0d63a2985201b
2020-10-14 14:52:46 -07:00
Howard Ro
cf9d5d571f Fix out of bound error of IncidentService
Before this change, it was possible for the code to suffer an out of
bound error.

Bug: 150706572
Test: make
Change-Id: I3e8d37f2ee3c942bc9b176edee043557b005c757
(cherry picked from commit 8ff5315e98)
(cherry picked from commit e592700068)
2020-10-13 01:07:39 +00:00
Tej Singh
39074df903 Remove dead code for AnomalyAlarm
Anomaly alarms now rely on the flow of events into statsd's socket for
firing alarms. Remove the StatsCompanionService code path, which is
unused now.

Test: m
Bug: 161326200
Bug: 152642091
Change-Id: Ife0b17c281984fc489ef46039cbf5aa7b1346bdb
Merged-In: Ife0b17c281984fc489ef46039cbf5aa7b1346bdb
2020-10-10 04:33:12 +00:00
Tej Singh
8b914c0f00 Remove alarm manager dependency from anomalyalarms
Anomaly alarms, which are used for prediction-base duration metric
anomaly detection, currently use alarm manager for setting alarms. This
can result in excessive binder calls to SCS to set/cancel the alarms if
the duration metric that the alarm is based on gets stopped/started in
quick succession.

To resolve this without losing precision, we can instead rely on the
flow of events into the statsd socket for this prediction. The socket
receives events very frequently, so there should be minimal (if any)
loss of precision, and we can remove the binder call entirely.

One concern is that we used to hold a wakelock when the alarm fired
(since alarm manager would hold a wakelock), and we now lose this
ability.

Test: atest statsd_test
Test: atest AnomalyDetectionTests
Bug: 161326200
Bug: 152642091
Change-Id: If37e5c6ccd8efa4e822c70a0444fa6b5a31bebca
Merged-In: If37e5c6ccd8efa4e822c70a0444fa6b5a31bebca
2020-10-09 16:05:57 -07:00
Ioannis Ilkos
7717083f3c Additional LMK diagnostic information
Add free memory / swap as well as the kill reason to better understand
and diagnose lmkd behaviour in the field

Test: build with corresponding lmkd change
Bug: 168117803
Merged-In: I190f70758daa442b8605e17960c74574676fa3ae
Change-Id: I190f70758daa442b8605e17960c74574676fa3ae
2020-09-16 15:39:45 +00:00
Ioannis Ilkos
e408d2189e Additional LMK diagnostic information
Add free memory / swap as well as the kill reason to better understand
and diagnose lmkd behaviour in the field

Change-Id: I190f70758daa442b8605e17960c74574676fa3ae
Test: build with corresponding lmkd change
2020-09-11 12:37:05 +01:00
Kelly Rossmoyer
2837883e87 Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

BUG=161896447

Test: make (change is only comments + 1 log message)

Change-Id: I8a21ef4ce19c517853388d8f7542f3a0cf8d91d5
Merged-In: I26ef8e079bf13f19bdc3bbc8219f572a43b68090
2020-09-10 13:55:33 -07:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Stephen Hines
39fa5efb15 Prefer = delete in place of DISALLOW_COPY_AND_ASSIGN.
Clang-tidy expects modernized code to prefer deleting copy constructors
and assignment operators to legacy macros.

/disk/android_trees/aosp-master-plus-llvm/frameworks/base/cmds/idmap2/tests/ResultTests.cpp:263:3: error: prefer deleting copy constructor and assignment operator over using macro 'DISALLOW_COPY_AND_ASSIGN' [modernize-replace-disal low-copy-and-assign-macro,-warnings-as-errors]
  DISALLOW_COPY_AND_ASSIGN(NoCopyContainer);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Bug: http://b/155835175
Test: mm in idmap2
Change-Id: I3bb29b48a478a67cbda959f47b271ccf8543a768
2020-08-22 10:08:56 -07:00
Tom Cherry
94891ea6c6 Include log/log_read.h for reading logs
log/log.h is concerned with writing logs.

Bug: 78370064
Test: build
Merged-In: I3c7719bcbffc6809377e80292b00312b4598bfc2
Change-Id: I3c7719bcbffc6809377e80292b00312b4598bfc2
2020-08-17 18:25:17 +00:00
Philip P. Moltmann
9334f7aba7 Do not log package name on privacy-indicator logs
as requested by privacy review.

Bug: 162547999
Test: Built
Change-Id: I9333facfdc39cc7a344c5671f487928977f5d82e
2020-08-11 23:50:14 +00:00
Hasini Gunasinghe
d64ab1853d Merge "Add KeystoreKeyEventReported atom for keystore logging." 2020-08-10 15:09:49 +00:00
Treehugger Robot
4aedb4cdad Merge "Use -target 8 for android_uiautomator" 2020-08-04 19:42:02 +00:00
Colin Cross
43ffc371f6 Use -target 8 for android_uiautomator
android_uiautomator is distributed as part of the SDK and should use
-target 8 for compatibility with old JDKs.

Bug: 150153790
Bug: 162522383
Test: javap -v -cp out/target/common/obj/JAVA_LIBRARIES/android_uiautomator_intermediates/classes.jar com.android.uiautomator.core.Configurator | grep "major version"
Change-Id: I6871ab5436232ad3bffff6bd26adf2de6b3c06ff
Merged-In: I6871ab5436232ad3bffff6bd26adf2de6b3c06ff
(cherry picked from commit 51387a027d)
2020-08-04 10:38:39 -07:00
Colin Cross
48666a1abb Merge "Use -target 8 for android_uiautomator" into rvc-dev 2020-08-04 16:30:51 +00:00
Colin Cross
51387a027d Use -target 8 for android_uiautomator
android_uiautomator is distributed as part of the SDK and should use
-target 8 for compatibility with old JDKs.

Bug: 150153790
Bug: 162522383
Test: javap -v -cp out/target/common/obj/JAVA_LIBRARIES/android_uiautomator_intermediates/classes.jar com.android.uiautomator.core.Configurator | grep "major version"
Change-Id: I6871ab5436232ad3bffff6bd26adf2de6b3c06ff
2020-08-03 18:03:40 -07:00
Liz Kammer
16f2f94b7e Remove create_stubs: false from droiddoc
`create_stubs: false` is the default behavior in soong as of
https://r.android.com/1380730

Test: m docs
Bug: 144248501
Bug: 143136634
Change-Id: If13de5c0a4071b032bc460f5c57e27819b33051d
2020-08-03 14:48:04 -07:00
Guang Zhu
6e634c03c6 address use of DummyIME in UI Automator
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: compile (code is not active in use)
Change-Id: Ice71490ff09969f229943d6ef952a09f4e283d14
Merged-In: Ice71490ff09969f229943d6ef952a09f4e283d14
2020-07-31 21:10:17 +00:00
Kelly Rossmoyer
3261ea7b0a Merge "Update language to comply with Android's inclusive language guidance" 2020-07-29 23:45:17 +00:00