Commit Graph

640958 Commits

Author SHA1 Message Date
Ryan Mitchell
efcdb95fa7 Aapt2 ValueTransformer
For future macro support, aapt2 must be able to convert Reference
values into other Value types. Currently a DescendingValueVisitor is
used to visit all of the References in a ResourceTable or a compiled
XML file to set their resource ids during the link phase. This was fine
since we were only mutating the resource id of the visited Reference.

A macro may reference a String, BinaryPrimitive, or any other Item
type. During the link phase, we will need to transform references to
macros into the values of the macros.

The only parameter in the methods of the ValueVisitor interface is a
raw pointer to the type being visited. The visitor interface does not
support reassigning the visited type to a different type.

ValueTransformer is a new interface for consuming a Value type and
transforming it into a compatible Value type. This change refactors
Value::Clone to use this interface.

Bug: 175616308
Test: aapt2_tests
Change-Id: Ic1b9d718b932c208764114cd9c74d880e189ccb0
2021-04-21 08:32:30 -07:00
Nate Myren
e5a10560c8 Merge "Add EXTRA_AUDIO_INJECT_SOURCE to RecognizerIntent" into sc-dev 2021-04-21 15:30:07 +00:00
Bill Yi
989f61b057 Import translations. DO NOT MERGE ANYWHERE
Auto-generated-cl: translation import
Change-Id: I9f9ead504dfaa4e52b2299c240b03b58e5c0553a
2021-04-21 15:26:38 +00:00
Treehugger Robot
f75ae22219 Merge "Do not deduce VCN capability if Builder is derived from request" am: 4f6c13a4c2 am: 22edbef1ca am: 807284da27
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1683015

Change-Id: I6ecdb60e530807c8a93f2709784cf1b5814a2178
2021-04-21 15:21:59 +00:00
Andy Hung
ca57ecee1b Merge "MediaFormat: Update constants for MPEG-H codecs" 2021-04-21 15:21:01 +00:00
vichang
a1335e23ac Merge "Change the API signature of DateTimePatternGenerator.getBestPattern" am: 19fd56d767
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1662460

Change-Id: I3e42b7d61460be1415a3cba5f318f65cf3e77ba6
2021-04-21 15:07:27 +00:00
TreeHugger Robot
16472322f9 Merge "Pipe start op throught app ops policy and delegate" into sc-dev 2021-04-21 15:06:11 +00:00
Neil Fuller
ee2feb56e1 Fix "location_time_zone_detection_enabled"
Fix "location_time_zone_detection_enabled" user restriction handling.
This setting impacts user privacy so it is not being restricted like
the ability to set the time / time zone manually & change the auto time
/ time zone toggles.

Bug: 166579161
Test: Manual testing with the restriction enabled via TestDPC
Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/ConfigurationInternalTest.java
Test: atest services/tests/servicestests/src/com/android/server/timezonedetector/TimeZoneDetectorStrategyImplTest.java
Change-Id: I07eb49a4aaa3392aefdb733465b27d671b3e227d
2021-04-21 16:04:50 +01:00
Jordan Demeulenaere
5c4d8e8085 Merge "Fade in status bar icons during launch animations." into sc-dev 2021-04-21 15:01:23 +00:00
Treehugger Robot
807284da27 Merge "Do not deduce VCN capability if Builder is derived from request" am: 4f6c13a4c2 am: 22edbef1ca
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1683015

Change-Id: Ib6a1b690c32b25aa86d8d432ac3f3a9eb1803efa
2021-04-21 14:57:42 +00:00
vichang
19fd56d767 Merge "Change the API signature of DateTimePatternGenerator.getBestPattern" 2021-04-21 14:52:13 +00:00
Pavel Grafov
67f11e65ca Make sure DPC knows if revoke fails
Bug: 183098396
Test: atest MixedDeviceOwnerTest#testKeyManagement
Change-Id: I89b51a1fb4be3b53eb46a7c194924b5255cd262b
2021-04-21 15:48:45 +01:00
Kweku Adams
fee10dbd76 Merge "Clean up SyncManager." into sc-dev 2021-04-21 14:48:29 +00:00
Julia Reynolds
4fb65c3a6d Merge "Re-re-designs the volume panel." into sc-dev 2021-04-21 14:47:09 +00:00
Tadashi G. Takaoka
e33cf0dfc0 Fix group summary suppression logic when without bubbles
The current logic of updateSuppression() concludes there is no child
notification when there is no Bubbles defined.

Bug: 161980186
Bug: 174623537
Test: atest SystemUITests:com.android.systemui.statusbar.notification
Change-Id: Iad4ea8117ef9bd7f813854eb6ed353df64fbdedd
Merged-In: Iad4ea8117ef9bd7f813854eb6ed353df64fbdedd
(cherry picked from commit da2ab11551)
2021-04-21 14:46:13 +00:00
Michal Olech
1abb5dc24e Merge "[CEC Configuration] Rename Power Control Mode setting name string" into sc-dev 2021-04-21 14:29:51 +00:00
Treehugger Robot
22edbef1ca Merge "Do not deduce VCN capability if Builder is derived from request" am: 4f6c13a4c2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1683015

Change-Id: I19da4ae952b5d412b429aa291868e8e7980ad5fd
2021-04-21 14:29:33 +00:00
TreeHugger Robot
90aba17718 Merge "Cred mng app URI documentation" into sc-dev 2021-04-21 14:25:40 +00:00
Nikita Iashchenko
319fe85e6e Remove usage of Math.randomLongInternal
As a part of internal libcore API cleanup some of the functions
previously exposed are getting removed from public surface.
Math#randomLongInternal is a wrapper around java.util.Random and has no
specific implications so its usages are get refactored.

Bug: 154796679
Test: m droid
Change-Id: I8db2400df0453baaddea6ab985f8e08a6338cfe0
2021-04-21 14:10:44 +00:00
Nikita Iashchenko
1bc8a1f886 Remove usage of Math.randomLongInternal
As a part of internal libcore API cleanup some of the functions
previously exposed are getting removed from public surface.
Math#randomLongInternal is a wrapper around java.util.Random and has no
specific implications so its usages are get refactored.

Bug: 154796679
Test: m droid
Change-Id: I29e0e9307fbaf9c1ac018b83014efb2d3dd74479
2021-04-21 14:10:43 +00:00
Treehugger Robot
4f6c13a4c2 Merge "Do not deduce VCN capability if Builder is derived from request" 2021-04-21 14:06:14 +00:00
Jordan Demeulenaere
f7bf52bc3a Merge "Use correct alpha interpolator for notification animation." into sc-dev 2021-04-21 14:02:45 +00:00
Neil Fuller
d571ec3fc7 Add location_time_zone_detection_enabled setting
Add location_time_zone_detection_enabled setting to backup list. This
setting was added in S.

Bug: 151304765
Bug: 185884644
Test: build / treehugger
Change-Id: I7ca034028fdf21451e12627ef0bbff6c8fb6c8be
2021-04-21 14:58:13 +01:00
Lais Andrade
2607057d62 Fix flaky VibratorManagerService test
Change test conditions to use the played effects on the fake
vibrator instead of asserting on the vibrator state

Fix: 185989305
Test: VibratorManagerServiceTest
Change-Id: I85da0e16d3adbef654735cd766556710cdf1edf7
2021-04-21 13:43:25 +00:00
Riddle Hsu
d854e004da Also check idle to handle stopping activities
Animating activity may not have nowVisible=true (see
WindowSgtate#updateReportedVisibility) but it may be
already idle.

This restores the same condition as before commit edc4294.

Bug: 185807984
Test: atest DreamManagerServiceTests# \
            testStartTurnScreenOnActivityDoesWake
Change-Id: Iaaffb80bd9e1e339d36034bdb6a369562f59a41c
2021-04-21 13:38:51 +00:00
Dave Mankoff
9a984a26a0 Increase gesture completion delay for falsing.
The FalsingManager was hitting a race condition with View click
listeners, where clicks would still, somtimes come in after the
FalsingManager had already marked the gesture as un-analyzed.
Increasing the delay from 50ms to 100ms should all but prevent that
from happening.

I have also decreased the penalty for unalayzed taps since
accidentally tapping on the wrong part of the screen is not unlikely.

Fixes: 185212498
Test: manual
Change-Id: I91e1e9152536a36eda74b5fd60051acc78434761
2021-04-21 09:28:23 -04:00
easoncylee
e9f67379be Move CtsAutoFillServiceTestCases to group presubmit-large
The test config takes longer than 15mins to run. Move it to a dedicated
group for running slow presubmit Test Mapping test.

Some more context is in the referenced bug, e.g, b/174495337
The group will work exactly the same as presubmit for now.

Bug: 174654670
Bug: 174495337
Test: none
Change-Id: I946061e2c5a75b12ca370d172db32a8f7e8e8f68
2021-04-21 13:24:07 +00:00
Victoria Lestari
0ca0dee816 Remove appPredictor from android:protectionLevel because we already have role
Bug: 183600573

Test: CTS on ag/14172753
Change-Id: Iac7fae8fe24a77a26acf4a1ae2b1af983cfcb850
2021-04-21 14:03:25 +01:00
Matt Pietal
6c19a8d39a Controls - All blacks
Control background must be all black for proper contrast. Make sure
the window and status bar stay that way.

Fixes: 185980818
Test: manual
Change-Id: I7fa1e864968f6f55f4ef4058eaec709019c3bd93
2021-04-21 09:00:47 -04:00
Wesley.CW Wang
7c90eedb07 Update battery saver footer strings
- Remove 'Hey Google' text

Bug: 183689347
Test: make
Change-Id: I8624474bfa1ddeace0d792b5c4a66765f3611d0b
2021-04-21 20:51:51 +08:00
Alex Johnston
c271813dcf Cred mng app URI documentation
* Add URI matching documentation

Bug: 177979648
Test: build docs
Change-Id: I44d40e919cce1b4f955f562b1cf6cbad450b4b58
2021-04-21 13:50:35 +01:00
Jordan Demeulenaere
2541d51347 Animate activities launched by QS click (1/2).
See b/185892236#comment3 for before/after videos.

Bug: 185892236
Test: atest QuickAccessWalletTileTest DeviceControlsTileTest AlarmTileTest
Change-Id: I539921777ab516bd35ba809f818fe02092325e78
2021-04-21 14:28:26 +02:00
Beverly Tai
f98e690f9e Merge "If enrolled show udfps bouncer on camera roll auth" into sc-dev 2021-04-21 12:25:11 +00:00
Matt Pietal
a2be0990e2 Merge "Remove "Device Controls" from Settings" into sc-dev 2021-04-21 11:31:33 +00:00
Joanne Chung
6b0cff16cf Merge "Update javadoc for ViewTranslationRequest.Builder for virtual view." into sc-dev 2021-04-21 11:22:30 +00:00
Aaron Huang
5d3144c977 Merge "Add getters to NetworkStateSnapshot" into sc-dev 2021-04-21 11:20:10 +00:00
Chalard Jean
6f9f6a280d Enable policy ranking
Test: Passes all presubmits, been tested in labs
Bug: 184834350
Change-Id: If33884aa245bcc8817bbc9c2fdfab035249e7301
2021-04-21 11:16:44 +00:00
junyulai
aa2d7f5355 Do not deduce VCN capability if Builder is derived from request
If the caller constructed the builder from a request, it means
the user might explicitly want the capabilities from the request.
Thus, the NOT_VCN_MANAGED capabilities should not be touched
later.

Test: TH
Fix: 185876442
Change-Id: I92037cc8547fb72de12d6b6402f060f6c98e1853
2021-04-21 19:10:28 +08:00
Kholoud Mohamed
48cf9cdfb0 Merge "Add a new permission to install testOnly apps" into sc-dev 2021-04-21 11:07:50 +00:00
Kholoud Mohamed
3846f7b552 Merge "Expose setInstallFlagAllowTest testAPI" into sc-dev 2021-04-21 11:07:50 +00:00
Wei Sheng Shih
874dc67f8f Merge "Clear mTranslucentActivityWaiting if the activity is going to relaunch" into sc-dev 2021-04-21 11:07:23 +00:00
Lais Andrade
dd6027e5f1 Expose SPIN and THUD vibration effects to public
Fix: 167947207
Test: N/A
Change-Id: I0785ba8efbd8edea5813715e0891bda9341b5cea
2021-04-21 10:26:23 +00:00
Lais Andrade
8231960159 Expose vibration primitives durations in Vibrator
Fix: 182477149
Test: VibratorTest
Change-Id: I4dd500fe6551645454ac9af24499098a74fd866e
2021-04-21 10:26:13 +00:00
TreeHugger Robot
7f0b426d3d Merge "Revert^2 "Remove framework-connectivity from the private API"" into sc-dev 2021-04-21 10:21:15 +00:00
Minche Li
891620267d Merge "Magnification uses WindowManager.getMaximumWindiowMetrics to compute its layout instead of the display size" into sc-dev 2021-04-21 10:19:45 +00:00
Riddle Hsu
1aae6246a3 Merge "Check animating accurately when assigning mAnimatingExit from relayout" into sc-dev 2021-04-21 10:02:03 +00:00
Eric Laurent
c670e06157 AudioRecord: Allow to share capture history.
Add the possibility for privileged applications to
share part of their audio capture history with another app.

A privileged app with permission CAPTURE_AUDIO_HOTWORD can share part of
its recent capture history on a given AudioRecord with the following
steps:
1) Specify the maximum time in the past that will be available for other
apps by calling setMaxSharedAudioHistoryMillis() on the AudioRecord.Builder
when creating the AudioRecord
2) Start recording and determine where the other app should start
capturing in the past.
3) Call AudioRecord.shareAudioHistory() with the package name of the app the history
will be shared with and the intended start time for this app's capture relative to
this AudioRecord's start time.
4) Communicate the MediaSyncEvent returned by shareAudioHistory() to the other app
5) The other app will use the MediaSyncEvent when creating its AudioRecord by calling
setSharedAudioEvent() on the AudioRecord.Builder.
6) Only after the other app has started capturing can this app stop capturing and
release its AudioRecord.

Bug: 183705547
Test: regression on capture use cases

Change-Id: I5beba6c1e489148a14ba86165b8ef2fdc78c802a
2021-04-21 12:00:00 +02:00
Nicolas Geoffray
db45defb94 Merge "bootanimation: ensure that if a percent is shown, we'll get to 100." am: 87c254de0e am: 10e844df41 am: 55b2ba298c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1681127

Change-Id: I1ee402945af4207affb77d61eb76a21c175ac1fc
2021-04-21 09:54:52 +00:00
Nicolas Geoffray
55b2ba298c Merge "bootanimation: ensure that if a percent is shown, we'll get to 100." am: 87c254de0e am: 10e844df41
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1681127

Change-Id: I6c86286bdb5eb45231ea1106d0e439970b3ec7bc
2021-04-21 09:28:44 +00:00
Mathew Inwood
080e301930 API changes as requested by API council.
Bug: 183512729
Test: m
Merged-In: Ie465c49ff02065e78a2e8e211a13350a0ff7f0a4
Change-Id: Ie465c49ff02065e78a2e8e211a13350a0ff7f0a4
2021-04-21 10:24:50 +01:00