* changes:
Changed Content Catpure workflow so it notifies when multiple changes are made.
Improved how Content Capture events are flushed when activity is resumed / paused.
Add annotations to clarify the brightness
correction API.
Bug: 125347154
Test: atest android.display.cts.BrightnessTest
Test: manual, flash phone, get app using API to push corrections, adb shell dumpsys display
Change-Id: Icbb61bb542a49c49f279b865d69d59a542c0e42b
Also, throw an IllegalArgumentException is these APIs are called on
sessions that are not marked as staged.
Test: tested new apis with an ad-hoc app. atest RollbackTest
StagedRollbackTest
Fix: 124507718
Change-Id: I3529aaff404d644ab6dad98f29411141e8df865d
Add @RequiresPermission annotations to the methods so that
it's clear what permission is protecting these APIs.
Test: make
Change-Id: I203ce997319c7fc8a13e91b55f3c55d844429be8
Fix: 123661724
Add a doc link to MotionEvent#CLASSIFICATION_AMBIGUOUS_GESTURE, to make
it easier for readers to cross-reference documentation.
Bug: 125800452
Test: m doc-comment-check-docs
Change-Id: Ic7a5a14d30c0cc3aa57f8bcd6af34e2e684f0437
Using a global setting to specify the lid open/close behaviour
allows OEMs to support switching between windowed and windowless
lids at runtime instead of build time.
Bug: 70378569
Test: Find the hall effect sensor on the device and then using a magnet
confirm the expected behaviour for each global setting:
* No reaction from device
adb shell settings put global lid_behavior 0
* Sleep/screen off
adb shell settings put global lid_behavior 1
* Lock screen but screen stays on
adb shell settings put global lid_behavior 2
Change-Id: I53682711aeaaeb9eead7246ba83e4dd4b3c06a58
1) Actively disabling LOCATION_MODE instead of LOCATION_PROVIDERS_ALLOWED
since the latter is deprecated and not supported.
2) The LOCATION_MODE_FOREGROUND_ONLY flag wasn't used anywhere. As
such, it was essentially no different from LOCATION_MODE_NO_CHANGE. I've
implemented the behavior in LocationManagerService so it works properly.
3) GnssLocationProvider only turned off GPS when the location mode was
LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF, but not the mode was
LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF. I've fixed it so GPS is
turned off in both modes.
4) PowerManager looked at the global battery saver state to determine if
the location mode should be used. This was fine for full Battery Saver,
but would be a problem with adaptive Battery Saver. The proper thing to
do is to just look at the local 'batterySaverEnabled' flag.
Bug: 121256487
Bug: 122849003
Bug: 119261320
Test: atest CtsBatterySavingTestCases
Change-Id: I8973d27fb050d9892bb97021712d9cf9743e8939
Prior to this change, it sent a pair TYPE_INITIAL_VIEW_TREE_APPEARING and
TYPE_INITIAL_VIEW_TREE_APPEARED after the initial layout, then it would send invididual events for
the views appeared / disappeared.
This change improves the workflow by also sending this pair of events after each change, which lets
the service know that a bunch of changes were made at the same layout pass.
Test: atest CtsContentCaptureServiceTestCases # which was updated to listen to the new events
Test: m update-api
Bug: 125395044
Change-Id: Ied9def9c95dd0f7711f59bccb2cc89a766fdc36b
We were flushing right after the activity resumed, but the relevant events (views added / removed)
were not generated yet, which made such flushes useless.
This CL changes the workflow to flush them after the ViewRoot finishes doing its work.
Test: atest CtsContentCaptureServiceTestCases
Bug: 125395044
Bug: 122315042
Change-Id: I05bf27069b00c285643b2d23ad6708a6ad7bc8f3
The initial behavior cop^H^H^H based on Autofill, which only closes the session when the activity
finishes. But for content capture we must always close the session when the activity is stopped.
Test: manual verification
Fixes: 125628737
Change-Id: I064d4ace97721dd8fb20075c02e1f059ecbf942a