The screen brightness float setting initially did not exist when upgrading the device software. This change ensures the float and int values are synchronised on the system start-up.
Bug: 167651957
Test: manual - set autobrightness off, upgrade from Q to R, and check brightness value in settings.
Change-Id: I2a3b996c8747e3c5f1d181bbdd438c70bf23d08b
(cherry picked from commit 96f43f21b3a3021762c2d213d8958590127cae36)
Bug: 165793553
Test: adb shell cmd device_config put systemui pip_stashing true
Test: Drag PIP Window to outside of display and see it stashed
Change-Id: I59e5475162cd3353e2bcbdf38bd5c5a22561a578
This patch will change the logging behavior in the Zygote such that
lambdas from the preload list that aren't found during Zygote
initialization will be counted and a summary provided at the end rather
than logging them each individually. These missing lambdas will only be
logged for userdebug builds.
Test: Compared logs before and after
Bug: 163602260
Change-Id: I4cd11d626d7e4f365c55f8458aac20cd442638ed
Merged-In: I4cd11d626d7e4f365c55f8458aac20cd442638ed
Renames baseCodePath -> baseApkPath and codePath -> path to better
reflect their actual meanings. Their respective JavaDoc has also been
consolidated and updated.
Also explains why the pkg field can be null, as this has been the cause
of a significant number of bugs. Also hides it behind a getter to
preempt any mutation issues. Doesn't refactor existing usages. This can
be done inline with other changes that touch that code.
Bug: 164218844
Bug: 164488334
Test: atest com.android.server.pm
Change-Id: Ia254e7cebb0ab86165e5ec42e8f8bfcf8673884b
The frame won't be changed if there is no IWindow#resized or
IWindowSession#relayout. So it can be retrieved from these methods
directly instead of another binder transaction.
And because some parameters are usually used together for layout,
the parameters are consolidated into a new ClientWindowFrames.
That reduces changing the interface in the future if the frame
related information needs to be changed.
Also refine the resize handling in ViewRootImpl to make it easier
to read.
There should be no behavior change by this modification.
Bug: 161781274
Test: WmTests, DialogFrameTests
Change-Id: I9f711ad2023442046fa8582944320b98e7c4ecfa
This patch will change the logging behavior in the Zygote such that
lambdas from the preload list that aren't found during Zygote
initialization will be counted and a summary provided at the end rather
than logging them each individually. These missing lambdas will only be
logged for userdebug builds.
Test: Compared logs before and after
Bug: 163602260
Change-Id: I4cd11d626d7e4f365c55f8458aac20cd442638ed
To support the new listen event, use long instead of int for the new one then creat bitmask for old events.
Bug: 162300897
Test: manual - 5g testing
Change-Id: I002cb3579eb920ffc0b0a8dbf59e8d1153222411
The previous implementation of createDisplayContext() was essentially a
noop within ResourcesManager when the default display was passed. However,
the current implementation always overrides the configuration with the provided
display's metrics so when a DecorContext with the default display is
created a new ResourcesImpl object is also created due to the difference in
configuration. This CL changes the DecorContext logic to match the
previous implemenation where the configuration is only overriden for a
non-default display thus only creating a new ResourcesImpl object for
non-default displays.
Bug: 166174272
Test: atest google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-test -v
Test: atest com.android.internal.policy.DecorContextTest
Change-Id: I05920c4f7987ffcaec8b197e8636606c04b418d4
Also reorganized the FrameTrackerTest a bit
Bug: 162927074
Test: manual - statsd_testdrive to verify statsd logging + run
FrameTrackerTest
Change-Id: Iec1fcafcd6c8373ebdeebbbd829eb94967c2bfb8
The alarms inside alarm manager service are stored in a variety of
different lists, the main one being an array list of Batch objects. Over
time due to various policy changes, it has caused a lot of coupling
between the service's business logic and the management of these data
structures.
This change introduces an interface to store alarms (a.k.a. AlarmStore)
and attempts to create a well defined boundary across which the service
interacts with this data structure. The interface presently supports
the following operations:
- add: to add an alarm.
- remove: to remove any alarms described by a predicate.
- removePendingAlarms: to remove any alarms that are due at a given
time.
- getNextDeliveryTime: the next upcoming alarm's delivery time.
- getNextWakeupDeliveryTime: the next upcoming wakeup alarm's delivery
time.
- recalculateAlarmDeliveries: to adjust the alarm deliveries in a way
described by the caller.
All the times are interpreted in the elapsed timebase.
The details of how the alarms are stored and managed, such as their
relative ordering and the complexity of each of the supported operations
is left to the implementations to decide. The expectation is that
this will make it easier to change and optimize these aspects of the
data structure in the future, while also making it simpler to make
changes to the service side policies.
Apart from the above, some formatting was corrected, obsolete or dead
code was removed and a bug where we were missing a rebatch was fixed.
Test: atest FrameworksMockingServicesTests:com.android.server.alarm
atest CtsAlarmManagerTestCases
Bug: 161497385
Change-Id: I8ac475d6c6a827500bf93be982cd40897f6743ae
Only on userdebug and eng builds for now.
Bug: 131859447
Test: manual - flashed the phone and verified the atoms with statsd_testdrive
Change-Id: I1a97dfe4ad062740f7c30558930de455cac07d9c
The aot infrastructure for instrumenting CUJs.
The usage is like below:
AlwaysOnTraceManager.init(view /* one in the view tree */);
AlwaysOnTraceManager.begin();
...
AlwaysOnTraceManager.end();
Bug: 158756171
Bug: 163514962
Bug: 162483077
Test: Manually
Test: atest FrameworksCoreTests
Change-Id: I570a760d4f3b71e86f19172d8f595e558369ff65
When rendering the requested image, the updated scrollDelta was not
being accounted for, resulting in rendering the wrong vertical
position. This would happen if the view scrolled as a result of the
request.
Also adds a call invalidate() on the target view after scrolling to
ensure that DisplayLists are correctly rebuilt when rendered here
since there is no synchronization with the render thread.
Test: atest ScrollViewCaptureHelperTest
Change-Id: I1e6aec8dd4352b4ae610657537581689a04b725b
The content of a window with FLAG_LAYOUT_NO_LIMITS can extend into
system bar areas before android R, but not in R, which is not
compatible.
Fix: 166391803
Test: atest ImeInsetsSourceConsumerTest InsetsControllerTest
InsetsStateTest
Change-Id: I2470a4eeb9f0f291321e21d42bc6e9c52e7a8e9d
When the file is deleted, renamed or moved, revoke all uri
permissions with the file
Bug: 157474195
Test: manual test with DocumentsUI
Test: atest DocumentsTest#testAfterMoveDocumentInStorage_revokeUriPermission
Change-Id: I4ffb183630aadb2d87b0965e8cecf88af15f4534
Merged-In: I4ffb183630aadb2d87b0965e8cecf88af15f4534
(cherry picked from commit 9efd606f43)