• Home
  • History
  • Annotate
  • only in /frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
History log of /frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
30c75471492ec7862ab7fbd56358a75178e0ed52 18-May-2018 Lucas Dupin <dupin@google.com> Pulse state should always show ambient wallpaper

Otherwise wallpaper wouldn't be set to AOD when the device pulses
and always on is off.

Bug: 78606979
Test: manual
Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
Change-Id: Ic40c18252cd6cb06ff6fd0d79ec3f1de16a1add5
ozeWallpaperStateTest.java
6dceace0eddd08156e6b71c17e3de4ed5f4f2f41 16-May-2018 Jason Monk <jmonk@google.com> Reduce usages of main looper in sysui tests

Push over to a standard testable looper, and a testable looper +
setAsMain when needed.

Also make tests more synchronous and single threaded as possible.
This will make them more deterministic and speeds them up noticeably.

Test: runtest systemui
Bug: 79550837
Change-Id: Iab0eb794329d7b1de95aef904ec08ecae7dadc98
ozeTriggersTest.java
39880be88c3b40c45e189199d7b7a633410bd85d 23-Apr-2018 Adrian Roos <roosa@google.com> AOD: Fix WakeLock leak

Bug: 78402666
Test: Toggle screen off and on again real quick. Verify "Doze" wake lock was not leaked.
Change-Id: Ie34f8aeeb5d10628f2a40567267ab36e694e21bb
ozeScreenStateTest.java
16cfe45dec96154d37b36364f67cedce16ca2484 08-Feb-2018 Lucas Dupin <dupin@google.com> Screen off animation

SysUI can now control the screen off animation as long as
config_dozeAfterScreenOff is set to false.

The current implementation collapses the notification shade and moves
the clock whenever the use is on the lock screen, or will fade the
scrims and show the clock when the keyguard is occluded.

Display state change (on, doze, doze_suspended) is delayed to let the
animations occur at 60Hz.

Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeUiTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
Test: atest tests/src/com/android/systemui/statusbar/phone/DozeScrimControllerTest.java
Test: atest tests/src/com/android/systemui/statusbar/phone/DozeParametersTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/keyguard/WakefulnessLifecycleTest.java
Fixes: 73178121
Change-Id: Id5d964452f342d4e97bedf1084efa808604e602c
ozeScreenStateTest.java
ozeUiTest.java
ozeWallpaperStateTest.java
12663d30baa5d691f3d132d9242e6186b0791807 08-Feb-2018 Lucas Dupin <dupin@google.com> Remove black frame when pulsing

Fixes: 73121392
Test: Receive notification on AOD
Change-Id: I04802b3b456e2c484fc5aaab8460a08b82f952e4
ozeScreenStateTest.java
4df92c366edbdc9c3429a29ba41b0b57b001411a 08-Jan-2018 Lucas Dupin <dupin@google.com> Update clock whenever AoD unpauses

Clock might show wrong time otherwise.

Test: cover prox sensor, look at clock
Change-Id: I73e37f133e877ef0affa038f23b0e11787f9aa65
Fixes: 65674396
ozeHostFake.java
660d573e438c4b1a044fa399bb99272a0bcc9f22 19-Dec-2017 Lucas Dupin <dupin@google.com> Let wallpaper know when to animate AoD transition

Sometimes the screen will blank, and sometime the
wallpaper has the opportunity to animate the
transition.

Bug: 64155983
Test: atest tests/Internal/src/android/service/wallpaper/WallpaperServiceTest.java
Test: atest packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
Change-Id: Ia92c00edb98eeeba42da33bdc7bec3feb961a658
ozeWallpaperStateTest.java
7517b5dcce8dde3a22177857b8fff6439fd98d82 22-Aug-2017 Lucas Dupin <dupin@google.com> Support wallpapers in AoD

Such wallpaper has to define supportsAmbientMode,
and set it to true on its android.service.wallpaper
meta data.

Also introduces WallpaperService.Engine#onAmbientModeChanged
to notify a live wallpaper that the display state has changed.

Change-Id: I49e846069a698b3cc3bb6e7cda98172920eaae4c
Bug: 64155983
Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeWallpaperStateTest.java
Test: runtest -x frameworks/base/tests/Internal/src/android/app/WallpaperInfoTest.java
Test: runtest -x frameworks/base/tests/Internal/src/android/service/wallpaper/WallpaperServiceTest.java
Test: set AoD wallpaper, go to aod, lock screen, launcher
Test: set regular wallpaper, go to aod, lock screen, launcher
ozeWallpaperStateTest.java
43d0d73d0789025cd92336ec241d2e2e21f558a3 16-Nov-2017 Lucas Dupin <dupin@google.com> Add support for seamless transion from/to AoD

Bug: 64155983
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeUiTest.java
Test: manual
Change-Id: I06e72cd5964944c79fb7bfda6881fc4a5a79ca7b
ozeHostFake.java
ozeUiTest.java
9e3fa1033c1fb43c82abf93f231636a4b103c0e4 09-Nov-2017 Lucas Dupin <dupin@google.com> Refactoring ScrimController

ScrimController is now a state machine with tests.

The main motivation for refactoring this class was to
centralize ownership of the scrim state. Before, animations
could be triggered by StatusBar, StatusBarKeyguardViewManager
or DozeScrimController simultaneously, causing collision,
sometimes overriding an expected state due to the call order
and making it hard to calculate an actual state.

Change-Id: I4f4d82549235d3fc7be35b235a2668e70b956cb7
Fixes: 64397851
Fixes: 65688233
Bug: 64155983
Test: runtest -x tests/src/com/android/systemui/statusbar/phone/ScrimControllerTest.java
Test: runtest -x tests/src/com/android/systemui/statusbar/phone/DozeScrimControllerTest.java
Test: unlock using fingerprint, or challenge (pin/password/pattern)
Test: trigger in-app bouncer (camera app)
Test: pull down notification shade locked and unlocked
Test: lock, look at AoD (or black display when AoD isn't supported)
ozeHostFake.java
10a4a64bcc046ca0429069ad6dc2d20b65279bc6 25-Sep-2017 Chris Phoenix <cphoenix@google.com> SidekickService (base)

Test: builds; Sidekick watch face animates in Ambient
Change-Id: I5946dbf7194653ac4707b6c186b0a9197d125d5f
ozeScreenStatePreventingAdapterTest.java
ozeSuspendScreenStatePreventingAdapterTest.java
c7fd69699058e9b7f0601aca9275b597e8f62736 06-Sep-2017 Adrian Roos <roosa@google.com> AOD: Prewarm display while waiting for brightness sensor

This partially reverts commit a79ad59d49cdb3ef6f4cf864094063e3e9111586.

Instead of keeping AOD paused, we now turn the display on, but keep it soft
blanked by keeping the front scrim opaque black until we get a valid sensor
event.

Bug: 65010918
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
Change-Id: Ic39d29814024d52117538a6a19adaf3866c7223e
ozeHostFake.java
ozeScreenBrightnessTest.java
ozeTriggersTest.java
c21891284b31b1372ee48b2f588850a5c482389e 04-Sep-2017 Adrian Roos <roosa@google.com> AOD Policy: Fix pausing timeout to use minutes instead of seconds

Bug: 65010918
Change-Id: I2a5f3a2109a38d7093fd0ea84fbb1026eb6c1215
Test: On AOD cover prox for 10s. Verify screen turns off.
lwaysOnDisplayPolicyTest.java
a79ad59d49cdb3ef6f4cf864094063e3e9111586 31-Aug-2017 Adrian Roos <roosa@google.com> AOD: Keep brightness sensor registered while covered

Keeps the brightness sensor registered even if proximity is near.

This allows the brightness sensor to react faster after coming out
of a pocket.

Also wait with unpausing AOD until the brightness sensor reports
a valid brightness again.

Bug: 65010918
Test: Cover prox sensor for 10s, verify with 'adb shell dumpsys sensorservice' that the binned brightness sensor is still registered.
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java
Change-Id: Ife1bb7399a7ad8a15b1f4d210bb38044cbe9d3ae
ozeScreenBrightnessTest.java
ozeTriggersTest.java
8443dd0e7680e489509e8a9bf0bb5fcefd7a8c3e 25-Aug-2017 jackqdyulei <jackqdyulei@google.com> Hook up AOD knobs to Settings.Global

This cl creates AlwaysOnDisplayPolicy, which get values for the
following knobs(go/aod-experiments) from Settings.Global:
1. screen_brightness_array
2. dimming_scrim_array
3. prox_screen_off_delay
4. prox_cooldown_trigger
5. prox_cooldown_period

Also update code to make sure AlwaysOnDisplayPolicy is used
everywhere.

Bug: 64899561
Test: runtest -x AlwaysOnDisplayPolicyTest

Change-Id: I2e83ff980771e67177e4964bd83aa68b2bdca65f
lwaysOnDisplayPolicyTest.java
ozeScreenBrightnessTest.java
5502b8942f15e7141686a623f6176339e2389b8d 22-Aug-2017 Adrian Roos <roosa@google.com> AOD: Fix crash when AOD is stopped immediately after starting

Fixes an issue where the screen state was set after DozeService was already
destroyed, causing a crash.

Change-Id: I13ff590b62f905330ccb438692410e118b76c242
Fixes: 64907936
Test: runtest -x $ANDROID_BUILD_TOP/frameworks/base/packages/SystemUI/src/com/android/systemui/doze/DozeScreenState.java
ozeScreenStateTest.java
ozeServiceFake.java
8db9311cb683c58b7d61f812ae4975feca926aa4 11-Aug-2017 Adrian Roos <roosa@google.com> AOD: Fix navbar flicker when transitioning to AOD

Under certain circumstances, the transition to AOD can happen before
the navigation bar gets a chance to hide itself, which happens in a
traversal. To work around this, post turning the screen on such that
it only happens after the next traversal.

Change-Id: I178b9394e7cc6baa8e9552c9819c3ce9b044defb
Fixes: 64599221
Test: Open Whatsapp / Gmail, turn off screen, verify navbar does not flicker.
ozeScreenStateTest.java
c8e29e78863784037670f56e48464924b7f960ea 03-Aug-2017 Adrian Roos <roosa@google.com> AOD: Add support for dimming in software

Some devices cannot dim low enough in hardware in low power states.
To work around that, keep the front scrim at higher opacity when needed
to simulate lower brightness.

Bug: 63995944
Test: Configure scrim in config.xml; use device in very dim light at night, observe AOD is sufficiently dim.
Change-Id: I92fffedeea89b9327d76dfb184c5c761364ead11
ozeScreenBrightnessTest.java
a6c03f8d27cf6239e318e815dd12e2eed5d300a4 26-Jul-2017 Adrian Roos <roosa@google.com> AOD: When prox covered disable touch during pulse instead of aborting

Fixes a UX issue where covering the prox would abort dozing. This
was done to prevent falsing and save power, but in practice results
in a frustrating experience when the proximity sensor is covered
transiently when reaching for the device.

Instead, just ignore touch while the sensor is covered.

Change-Id: Id70f8605c6c7a37288a383d587025bb9b4191b42
Fixes: 64007762
Test: Trigger AOD2, cover sensor. Verify phone stays on but double tap does nothing.
ozeHostFake.java
e4cb6c8a31585de27afe89b1c06e1a5a124d8c66 19-Jul-2017 Adrian Roos <roosa@google.com> Flicker free screen-on from AOD

When pulsing from AOD, we force the display OFF first. This allows
us to transition smoothly from AOD.

Also, we add a scrim transition for whenever we are waking up from
dozing. This relies on I4f3a863709a970f0fc8682c0a0c3547886e1fd0f
which forces the DOZE -> ON transition through OFF first.

Also fixes the WAKE_AND_UNLOCK transition that happens when waking
up with the fingerprint sensor.

Also fix an issue where KeyguardViewMediator's mWakeAndUnlocking
was cleared in onScreenTurnedOff; this should have been added to
the wakefulness lifecycle instead and now that the AOD -> ON transtion
dispatches the screen off callback it broke the fingerprint unlock
transition.

Fixes: 35849781
Fixes: 63887857
Fixes: 63783651
Fixes: 63727166
Test: AOD, receive notification; AOD, unlock with fingerprint; AOD, wake to lockscreen. Verify that everything is flicker-free.
Change-Id: I7d539db80a1c7e9216cf4c5c1e6d314c1893f12d
ozeScreenStateTest.java
3a8f892bd840d6cf01b19450df037c64535a0a00 13-Jul-2017 Adrian Roos <roosa@google.com> AOD: Refactor low and high brightness modes

Bug: 63427319
Test: Receive notification on AOD, observe that brightness does not change.
Change-Id: I6ab6d75121f51ac16c08e59a3e552808a8e70853
ozeScreenBrightnessTest.java
eacef7a03a4d011b01102ab8e2edd8eb82b2e7af 07-Jul-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AOD: Block when fingerprint is already authenticated but waiting for goingToSleep to complete" into oc-dr1-dev
710a0b13628be61899472959526fa5e6fbb06b1f 07-Jul-2017 Adrian Roos <roosa@google.com> AOD: Block when fingerprint is already authenticated but waiting for goingToSleep to complete

Improves an issue where immediately triggering fingerprint after
the devices goes to sleep results in a lot of flickering.

There's still flicker however if the fingerprint authenticates after we've requested the AOD
display state, but before it has actually been applied.

Bug: 62887179
Test: Go to Home. Lock screen. Immediately unlock via fingerprint. Verify that the AOD screen does not even show.
Change-Id: Ib6425eee803a8c7e02f9621a571e562e825af57f
ozeHostFake.java
3e23eb59d09faca2e40e308a191d8499ffdb6ab3 07-Jul-2017 Adrian Roos <roosa@google.com> AOD: Keep doze brightness when unlocking with fingerprint

Updates the logic that was already in place to prevent lighting up
the display before the unlock transition starts:
- treat AOD as pulsing in FingerprintUnlockController
- now that doze can use more than one brightness level, use the current

Bug: 62885451
Test: Unlock with fingerprint from AOD. Observe that the unlock transition does not prematurely change the brightness level
Change-Id: I266bd5e4c0a1d5b4c347a65c0e7936247e333cfc
ozeHostFake.java
f2d545e30717c09c39df36aa601cf39e44dcdc50 05-Jul-2017 Adrian Roos <roosa@google.com> AOD: Disable if device is not yet provisioned

Change-Id: If1563d9558205936a8c78d1232eb0879700ff6b3
Fixes: 62263216
Test: adb shell settings put user_setup_complete 0; turn off screen; verify AOD does not show
ozeHostFake.java
857b0ff5d7cfbb1d07b1b81d4e6a55de70309ea5 30-Jun-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AOD: Refactor doze brigthness controllers, add AOD auto brightness support" into oc-dr1-dev
6023ccbea1568d8b22db82cac9bf7a03367d0a61 28-Jun-2017 Adrian Roos <roosa@google.com> AOD: Add hysteresis to pausing the display

Delays pausing the display by several seconds to avoid
flickering when the prox is only covered transiently.

Also adds cooldown to the proximity sensor, such that when
it toggles too often it gets disabled for a while.

Bug: 62292293
Test: cover prox for less than 10s, observe display stays on. Cover for more, observe display turns off.
Change-Id: Ifa407b84760fc299fbbcfa92d9e942e0093c4b73
ozeTriggersTest.java
2981eb0d59f3568bfe84ce905c82fc17d62d21c5 27-May-2017 Adrian Roos <roosa@google.com> AOD: Refactor doze brigthness controllers, add AOD auto brightness support

- Factor out doze brightness and screen state controllers
- Add support for setting the screen brightness from a
sensor in AOD / when pulsing
- Refactor FakeSensorManager for generic sensors, add a light sensor

Bug: 38354633
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenTest.java
Change-Id: I55f2bee253cee23a76ba857ba1f19052ff88a753
ozeMachineTest.java
ozeScreenBrightnessTest.java
ozeScreenStateTest.java
ozeServiceFake.java
c429f690e54db1bdc4631aab7c0191e30ccf1d51 27-Jun-2017 Jason Monk <jmonk@google.com> Add system to avoid a crash stopping tests from running

Add a system such that when a crash happens on the main thread, it is
delayed until the tests complete, then thrown.

Also mark some old flaky tests as not flaky as they should be good
now.

Test: runtest systemui
Change-Id: Ic18a38daf4a93dab63549d834fa00f295644fbf1
Fixes: 62935720, 62251903, 62529569
ozeTriggersTest.java
25c7a58f33c7c24e59f522b86e3cf064fdfd3b8c 02-Jun-2017 Adrian Roos <roosa@google.com> AOD: Use double tap coordinates to trigger Ambient Indication

Bug: 38386446
Test: Double tap on AOD, verify that it still works. On device that supports double tap coordinates, verify that double tapping on ambient music opens ambient music.
Change-Id: Ic75ba731a980c9598c85927e83d2032f01da4822
(cherry picked from commit 44198f5124743f0d603eb4efa3b436bd96f32144)
ozeHostFake.java
eefa3be55d941bc0193edae515b9e1b01b50e908 12-Jun-2017 Geoffrey Pitsch <gpitsch@google.com> Change FlakyTest to Ignores

These are failing reliably, no need for FlakyTest

Bug: 62475085
Test: runtest systemui
Change-Id: Ib9abedda149976cffe07ea75c7034dd290d1f715
ozeTriggersTest.java
ed268dc3501d5ac65c1b013b5ff132acacd01538 10-Jun-2017 Lucas Dupin <dupin@google.com> Merge "Removed test from presubmit." into oc-dev
am: 4f30aa2be8

Change-Id: I3f73f3581fad4575f774f2c5ba870cc3308443a4
f26517d46617cb8b8d3ea5a7559bbcb7df31a526 09-Jun-2017 Lucas Dupin <dupin@google.com> Removed test from presubmit.

testOnNotification_stillWorksAfterOneFailedProxCheck needs to
be ignored on presubmit runs. It fails on Tree Hugger but
runs locally.

Test: runtest systemui
Change-Id: Id4e1107528715c7e0b6ce7c69e2da7fa837e79a2
ozeTriggersTest.java
25a52b65b2cac1f49f37f4532cfa62282432957a 23-May-2017 Jason Monk <jmonk@google.com> Add test to verify all sysui tests extend the right stuff

And then make it pass.

Test: runtest systemui
Fixes: 38500852
Change-Id: I377164219e4a4f4d1a99f11ef06da03c2b527eb0
ozeMachineTest.java
ozeScreenStatePreventingAdapterTest.java
ozeTriggersTest.java
fba8faf5c5f58f115fa3c099da9ef0953b484147 23-May-2017 Jason Monk <jmonk@google.com> Add test to verify all sysui tests extend the right stuff

And then make it pass.

Test: runtest systemui
Bug: 38500852
Change-Id: I377164219e4a4f4d1a99f11ef06da03c2b527eb0
ozeMachineTest.java
ozeScreenStatePreventingAdapterTest.java
ozeSuspendScreenStatePreventingAdapterTest.java
ozeTriggersTest.java
ozeUiTest.java
540b528f359c86d521090bc960906727255b6bd4 15-May-2017 Adrian Roos <roosa@google.com> AOD: Fix time tick alarm registration

Fixes an issue where canceling the time tick
alarm was not done properly, which then prevented
the alarm from being scheduled again.

Change-Id: I233f6227eabc65ea1cd13e7c53930573fb552126
Fixes: 36506772
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeUiTest.java
ozeHostFake.java
ozeUiTest.java
5a81ac8158e4d2061ce674137675c969b3c05cee 11-May-2017 Adrian Roos <roosa@google.com> Merge "AOD: Update wakeup animation" into oc-dev am: 40b34460ef
am: a6ca1c47a3

Change-Id: I04799d23877f1baae0acf632e5ee4b7a88844551
28f90c78b213fb436b243126e8bc10c4f554bd1c 09-May-2017 Adrian Roos <roosa@google.com> AOD: Update wakeup animation

Fixes several issues with the wakeup transition.

Bug: 34716110
Test: Trigger ambient display, press power button
Change-Id: I1fa6e0be13c80a84356a8826ed18e9477bf2aba2
ozeHostFake.java
8036799d2e95a60e2778c44548c244b79c9869af 10-May-2017 Michael Wright <michaelwr@google.com> Enable Always On mode by default.

Also, add a config value for always on display availability.

Test: runtest -x tests/src/com/android/systemui/doze
Change-Id: Id5e0136a5bed0eac78ad48147b0bef8311b06986
ozeConfigurationTest.java
6c237720de31e8c608951f3b7814d480dcbee615 04-May-2017 Adrian Roos <roosa@google.com> Merge "AOD: Change DozeTriggersTest to run on prox-less devices" into oc-dev am: 07672353a5
am: fdcd2a4f14

Change-Id: Ic93232c9dc35ce3382d68185b8cc39a613894021
84a187f0dd9b480a058e787f85e766a4a66121a9 28-Apr-2017 Adrian Roos <roosa@google.com> AOD: Change DozeTriggersTest to run on prox-less devices

Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java
Change-Id: I4077d4fcd93f76f08bdd1bd6192cae746f64cc76
Fixes: 37760104
ozeTriggersTest.java
ensorManagerFake.java
7a2de699b26fde465c34f14f4e8126e49c5562fa 03-May-2017 Adrian Roos <roosa@google.com> Merge "AOD: Pass through pulse reason to DozeUi" into oc-dev am: 838e5f04be
am: 4c49f656fb

Change-Id: I297365d186814fe0502f8cf155a650546ce959fd
838e5f04bedac5546950bce8a3db188b29cc2af5 03-May-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "AOD: Pass through pulse reason to DozeUi" into oc-dev
d7b9d10d569438968f75d2453c4293caf89774f2 29-Apr-2017 Adrian Roos <roosa@google.com> AOD: Pass through pulse reason to DozeUi

Fixes an issue where the Ambient Display transition
is too slow in response to double tap / lift, because
we are applying the animation for the notification case.

Bug: 34716110
Test: runtest systemuig
Change-Id: I84f2c59205d157d89baac1688dd6cd97a170a489
ozeMachineTest.java
ozeTriggersTest.java
2324d8578aeddf2cab4cb14e4cf9946f7cf3b107 28-Apr-2017 Adrian Roos <roosa@google.com> AOD: Don't use DOZE screen state on AOD2

Fixes an issue where AOD2 had low color gamut. Instead, we now use
the high-power screen state there.

Bug: 36781008
Test: Receive notification on AOD2, observe that color is not distorted
Change-Id: I370a74c0f1d5cfd49194b53b9e20bf1f0dc5d4d0
ozeMachineTest.java
3b53f90ded135942c17b549ef6e2e14bc861bc17 27-Apr-2017 Jason Monk <jmonk@google.com> Merge "Guard against incorrect context use." into oc-dev am: 2cddbcaa0f
am: d0c1cf630f

Change-Id: Ifb351d1693fe3d283abf78b2eea205f3d0544a0a
2cddbcaa0f271d4a89cb61b017fc7fcde96e4378 27-Apr-2017 Jason Monk <jmonk@google.com> Merge "Guard against incorrect context use." into oc-dev
8955d628685f3b5bfd9024e04c520bc44cc936a3 26-Apr-2017 Adrian Roos <roosa@google.com> Merge "AOD: Remove wake up fully config flag" into oc-dev am: ce83c81b84
am: 95c71928fd

Change-Id: I1d34072cf451c80f414b9cc06a5af4d391c5220f
f06a317039a6502252c2b4b1a878520d166a38c6 25-Apr-2017 Jason Monk <jmonk@google.com> Guard against incorrect context use.

Instead of just having random tests fail, fail all the tests with a
slightly more useful message.

Also remove all the code around acquiring and contention, now that
we have a test rule in place for TestableContext, we can just use
that for cleanup and have a simple copy-on-write provider.

Test: runtest -x frameworks/base/tests/testables && runtest systemui
Change-Id: I907da23730a4a96cfa2bb112100a06980f01b078
Fixes: 37302051
ozeConfigurationTest.java
60a7739798f1637fdae6b50198dad285e162e663 25-Apr-2017 Adrian Roos <roosa@google.com> AOD: Remove wake up fully config flag

Fixes: 37270258
Test: Double tap, make sure device does not wake up to lockscreen, only to ambient display
Change-Id: Iaf0c3bfb5dcf566adae7f37b51c866d92bce7a1d
ozeConfigurationUtil.java
8bb1757531c0269c24d164087f793d638adf9639 20-Apr-2017 Adrian Roos <roosa@google.com> Merge "AOD: Fix broken triggers after failed prox check" into oc-dev am: 017f5df1e7
am: 06c68a68ef

Change-Id: Ifbcaaf8d580e5c55016040e9bdc5afd27ebcefd6
d35d4ca69f06cc53c02036f418275c255dc6ed68 19-Apr-2017 Adrian Roos <roosa@google.com> AOD: Fix broken triggers after failed prox check

Fixes an issue where after a failed prox check
we would not correctly reset mPulsePending and
thus never trigger a pulse again until the
DozeService restarts.

Also adds logging for dropped and canceled pulses
to aid diagnosing similar or different bugs
in the future.

Also adds a regression test.

Fixes: 37477968
Test: runtest -x /frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java
Change-Id: Ic465b7686ae1937a29d07a66fe44cf7ad18419ef
ozeConfigurationUtil.java
ozeHostFake.java
ozeTriggersTest.java
ensorManagerFake.java
a1e6b3157cd5cfc7a3a70f0a9671447d0849c642 29-Mar-2017 Adrian Roos <roosa@google.com> AOD: Use DOZE_SUSPEND screenstate when supported

Bug: 30876804
Bug: 33175018
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeSuspendScreenStatePreventingAdapterTest.java
Change-Id: If4d0cadced1f0ac3e737d78759820858b70081e6
ozeMachineTest.java
ozeSuspendScreenStatePreventingAdapterTest.java
340b0e5216b4fcc435e0459b1ca46155a572100d 08-Mar-2017 Jason Monk <jmonk@google.com> Move out test utilities to a Testables library

Test: runtest --path frameworks/base/tests/testablets/tests
&& runtest systemui

Change-Id: Ideef4aef5f26136b1741c556b9be5884f38842a0
ozeConfigurationTest.java
ozeMachineTest.java
c1b50324a2286b24b691b8a7190743cbc341727e 27-Feb-2017 Adrian Roos <roosa@google.com> AOD: Add wakelock for charging text while dozing

Also refactors the WakeLocks in SystemUI.

Bug: 30876804
Bug: 35850304
Test: runtest systemui
Change-Id: Ie17eedfd266deb3aa46dabd701bc784330b2e030
ozeMachineTest.java
akeLockFake.java
22a905eef16878f7f654497c279bb1d82b7df9a9 07-Mar-2017 Adrian Roos <roosa@google.com> AOD: Fix default for always-on setting

Change Ic35bd3c04d150fd3eb85d76db0043880b31a011f mistakenly
flipped the default to on. Change it back to off.

Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeConfigurationTest.java
Fixes: 36027947
Change-Id: If1619c10f8cc269f2dd852e166ac959e6c9c590a
ozeConfigurationTest.java
0261fb2a190a9eff14ef06efafc468e92829426a 07-Mar-2017 Adrian Roos <roosa@google.com> Revert "Revert "AOD: Refactor always on configuration""

This reverts commit cdcc5c438949ce3d942c95204555680e080c17ed.

Bug: 36027947
Change-Id: Iee23682a9d82f930484c3f4c15d99f21a0f1bc36
ozeMachineTest.java
ba3643290df00210ea0011d7ae294931e2298b7e 06-Mar-2017 Jason Monk <jmonk@google.com> Add version of @UiThreadTest that works at class level

Saves a bunch of lines of tagging every test with @UiThreadTest

Test: runtest systemui
Change-Id: Id565dbe6bf1ae3dd7b3b23c507d1b3c386a36974
ozeMachineTest.java
c45944b68009c319c93d48f1c4df60393f108fff 07-Mar-2017 Adrian Roos <roosa@google.com> Revert "AOD: Refactor always on configuration"

This reverts commit 28d26a821f5fa078af756ceb3e94090a10f73175.

Bug: 36027947
Change-Id: I3d4c2e58b753120ff668a4594f60692abc6a3426
ozeMachineTest.java
28d26a821f5fa078af756ceb3e94090a10f73175 27-Feb-2017 Adrian Roos <roosa@google.com> AOD: Refactor always on configuration

Moves the AOD configuration helper to the framework such that it is
available outside SystemUI

Bug: 30876804
Change-Id: Ic35bd3c04d150fd3eb85d76db0043880b31a011f
ozeMachineTest.java
26d8184d46d48aae37cc739cb548edf891fc2ce1 21-Feb-2017 Adrian Roos <roosa@google.com> AOD: Don't use doze states when unsupported

Bug: 30876804
Test: runtest -x $ANDROID_BUILD_TOP/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenStatePreventingAdapterTest.java
Change-Id: Iff09aef0733e30f13723208ff4e7605d40449bb2
ozeScreenStatePreventingAdapterTest.java
4fb1f519787bb20a724370e7f98df3276f6a315a 14-Feb-2017 Adrian Roos <roosa@google.com> AOD: Refactor DozeMachine to allow waking up

Bug: 30876804
Test: runtest -x $ANDROID_BUILD_TOP/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Change-Id: I1d01ab5d8ba3c1bf7b11b0b4911b25f3416ca6e9
ozeMachineTest.java
ozeServiceFake.java
cd139a6df1c098e7fc65abe6516d70519ebc568a 16-Dec-2016 Adrian Roos <roosa@google.com> Doze: Fix crash when suppressing pulse

Fixes a crash due to an overzealous state validation.

Change-Id: I363c13206c890a2be56615663f89d80ac256a991
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Fixes: 33463320
ozeMachineTest.java
b84dc1866a7f00c5813990e5fd5837c1ba6f26fc 02-Dec-2016 Adrian Roos <roosa@google.com> DozeMachine: Improve resilience against out-of-order pulse requests

Fixes a class of bugs that arise from requesting to pulse at
inopportune times. Also improves logging such that we know what
state transition failed to validate.

Test: runtest -x frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Change-Id: If0bbe003c4805fd180d013dadbc28addc5bb0dd4
Fixes: 32869355
ozeMachineTest.java
ae0c5e8d2c65b84b644150e2774a0dbdeffe82aa 17-Nov-2016 Adrian Roos <roosa@google.com> Doze: Fix WakeLock bug

Change-Id: I3d687bbf82173723c420058867531a970d1f46cb
Fixes: 32857549
Test: runtest -x $(gettop)/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
ozeMachineTest.java
ff2c4563cdee60576847e161678549bc501e8d84 03-Nov-2016 Adrian Roos <roosa@google.com> Doze: Refactor v1

Pulls appart UI, state, power, display and trigger management
into individual components controlled by a state machine.

Also adds tests.

Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/doze/DozeMachineTest.java
Change-Id: I6ee7e79d58a5a3ebeb975775af44ad1e5aaccf93
ozeMachineTest.java
ozeServiceFake.java
akeLockFake.java