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
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
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)
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
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
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
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
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
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
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
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
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
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