Commit Graph

1478 Commits

Author SHA1 Message Date
Alison Cichowlas
29c64fb096 Suppress flaky test
Test: This is it
Bug: 118400112
Change-Id: I60be79618f4fd5b22438d47f1b8ce0756d486dee
2018-10-25 11:27:15 -04:00
TreeHugger Robot
beacda215f Merge "Only inflate public view when notif is redacted." 2018-10-24 22:14:57 +00:00
Kevin
38ce6fa2a0 Only inflate public view when notif is redacted.
This CL changes notification inflation behavior to only inflate the
public content view when the notification needs to be redacted in the
first place (i.e. the setting to hide sensitive notifications is on and
the notification would be hidden under the setting). This saves around
.1 MB per notification.

Bug: 111809944
Fixes: 111809944
Test: runtest systemui, manual tests (toggled hide sensitive on and off,
tested ambient pulses under both)

Change-Id: Ia1d00db00c5164f043c999578f0be4b55f223f8e
2018-10-24 11:16:36 -07:00
Lucas Dupin
d9aa3fa6e9 Merge "Restore KeyguardBottomAreaView state" 2018-10-24 17:19:45 +00:00
TreeHugger Robot
366d890f6d Merge "Workaround to safely show ambient/HUN views." 2018-10-24 03:21:18 +00:00
Kevin
47ff478e51 Workaround to safely show ambient/HUN views.
Temporary workaround to get things rolling while a greater fix is
incoming.  This reverts behavior to essentially inflating all
HUN/ambient content views.

Bug: 117933032
Bug: 117894786
Test: manual, runtest systemui
Change-Id: I731ec6e320d1813a8bbca52ceb21c1d8bb4e73ff
2018-10-23 17:25:41 -07:00
Matthew Ng
761562d868 Refactored rotation code from nav bar fragment to its button
Moved the rotation button in nav bar logic to its own button.

Test: atest NavigationBarRotationContextTest
Bug: 116041410
Change-Id: I7bb3c4c4a1637b52a7219c1074c09403c9505734
2018-10-23 15:20:56 -07:00
Jason Monk
297c04ee53 Make StatusBar not be a NotificationPresenter
Break the NotificationPresenter out of the StatusBar and most of
the logic with it.

 - Break RemoteInput Callbacks out of NotificationPresenter
 - Break Environment Callbacks out of NotificationPresenter
 - Add ShadeController interface for StatusBar (abstraction
   layer from StatusBar)
 - Add InitController to allow for post-init tasks (dependency
 resolution should not go here)
 - Make some dependencies (ShadeController, NotificationEntryManager,
 NotificationLockscreenUserManager usually) lazily-resolved to break
 some dependency cycles

 - Lots of other cleanup

Test: Existing tests do not pass
Change-Id: Ic043c6b15a4ffe551fc27f99b25d5c3caa1be582
2018-10-23 11:19:15 -04:00
Lucas Dupin
55c6e809a3 Support for passive interrupts
Bug: 111414690
Test: manual, lift, swipe down, go to shade locked
Test: adb shell setprop persist.sysui.expand_shade_on_wake_up 0
Test: adb shell setprop persist.sysui.go_to_shade_on_wake_up 0
Change-Id: I59018a72b85cfcf75344d83bbf9e3a122a66c018
2018-10-22 14:29:20 -07:00
Aaron Heuckroth
cd944dc665 Clean up interfaces for StackScrollLayout.
Test: Automated tests should pass.
Change-Id: Ibf2718bfaacff0adcfca7ef8ca2f3eb2b867debf
2018-10-18 14:14:58 -04:00
Lucas Dupin
cea7deea4c Restore KeyguardBottomAreaView state
KeyguardBottomAreaView will be re-inflated when the theme changes,
it's necessary to also restore some of its internal state, otherwise
we'll have NPEs.

Test: manual
Test: atest KeyguardBottomAreaTest
Fixes: 117121386
Change-Id: Idac8192877b65f8ad00cd60a2bb0c1ce75476cf1
2018-10-16 12:52:03 -07:00
TreeHugger Robot
6e7ece7e4d Merge changes from topic "heads-up-ambient-inflation"
* changes:
  Fix heads up views freeing too early.
  Inflate ambient + heads up view as necessary
2018-10-16 00:08:21 +00:00
TreeHugger Robot
d51095555f Merge "Always show transient indication in AOD" 2018-10-15 22:17:27 +00:00
Lucas Dupin
ff6628d45d Always show transient indication in AOD
Test: visual
Test: atest KeyguardIndicationControllerTest
Fixes: 117749848
Change-Id: Ifeb71b7d385764d630bc74e9abed78cc2511c86d
2018-10-15 11:05:25 -07:00
Philip P. Moltmann
3e0f1b46e4 Merge "Rename system-api wm flags to SYSTEM_..." 2018-10-15 16:28:39 +00:00
Selim Cinek
908d785aaa Merge "Fix overlap between operator name and heads-up notification" 2018-10-12 21:04:48 +00:00
Fabian Kozynski
dbc63bff09 Merge "CastTile becomes unavailable when not connected to Wifi" 2018-10-12 19:41:13 +00:00
Lucas Dupin
849935420c Hide back button on bouncer as user swipes down
Test: atest KeyguardBouncerTest
Test: go/sysui-bouncer-tests
Change-Id: I3d0fa71896be1dbe0cb433bf3bd6eecdc64e299a
Fixes: 110852045
2018-10-11 19:23:45 -07:00
Tetsutoki Shiozawa
ce9645b17a Fix overlap between operator name and heads-up notification
The title of heads-up notification was shown incompletely
because it's covered by operator name.
To fix this issue, the operator name should be hidden
when a heads-up notification is shown.

Fixes: b/116533819
Test: atest SystemUITests
Test: manual - enable config_showOperatorNameInStatusBar
               and show a heads-up notification

Change-Id: Id3318cd7cb2c9b6950392fadd11d02ab873d84c5
2018-10-11 21:18:20 +00:00
Fabian Kozynski
4235b2a802 CastTile becomes unavailable when not connected to Wifi
CastTile registers with NetworkController and shows unavailable
status when not connected to WiFi (regardless of internet connectivity).
Includes accessibility context for this state.

Added tests for behavior.

Test: manual && atest
Change-Id: I3004ed18e545d8d8c448f01d33eb70bcfd9831b2
Fixes: 78152102
2018-10-11 16:41:02 -04:00
Kevin
d5022f9728 Fix heads up views freeing too early.
In the previous CL, heads up views were freed while they were still
animating away.  As a result, there could be a sudden shift in the view
the notification uses (most easily reproducible if you tap on a HUN with
actions as the actions disappear).  This CL introduces an API to set a
a listener for when the content view becomes inactive and remove it then.

Bug: 111809944
Test: runtest systemui, manual (HUN with full screen intent, tap, see
that it goes away without visual jank)

Change-Id: Ib27bcf993f6be41aa4fde50b39817004610f5fd4
2018-10-11 10:47:44 -07:00
Kevin
d4660b27bf Inflate ambient + heads up view as necessary
In order to save memory, this CL introduces API to set a subset of the
content views of a notification to inflate instead of all of them.
It also changes the default views to inflate to the contracted,
expanded, and public views.  Heads up and ambient views are only
inflated if the respective notification will heads up or pulse.  In
addition, these views are freed up once the heads up/pulse ends.

This saves a significant amount of memory.  While 50 notifications would
take up around 50 MB before, they take up around 27 MB after this
change.

Bug: 111809944
Test: runtest systemui, manual
Change-Id: I970420943a3ecfac3e53d83a342b29636e32a51d
2018-10-10 17:34:16 -07:00
TreeHugger Robot
bbcfda0d35 Merge "Fix regression where promptReason would dissapear" 2018-10-10 18:25:25 +00:00
Kevin Chyn
ac56f746f0 SensorManager Plugin for trigger events
Bug: 111414690
Bug: 111479454

Test: atest AsyncSensorManagerTest

Change-Id: I141d756e9184418d494285ad1a6ce801c00581c0
2018-10-09 20:09:57 -07:00
Lucas Dupin
c6b50c6601 Fix regression where promptReason would dissapear
Bug: 111850911
Test: visual
Test: atest KeyguardPatternViewTest
Change-Id: I10dc09e369f962786dd108bafca3c21ed21a8481
2018-10-09 20:00:35 -07:00
Philip P. Moltmann
66ce2386a3 Rename system-api wm flags to SYSTEM_...
Also add a special API to set them. Internally they are still just
regular private flags

Test: Built
Bug: 116798569
Change-Id: I687b751fa18c7fbcc9bf95aa44d94d8a5614a88f
2018-10-09 14:08:22 -07:00
Tony Wickham
e83a96c89a Merge "Refactor code to PluginEnabler" 2018-10-08 18:16:56 +00:00
Tony Wickham
32c554373d Refactor code to PluginEnabler
SystemUI uses PackageManager to enable/disable plugin components.
Launcher cannot do this, so we abstract this logic into an interface;
Launcher will have a different implementation.

Test: "atest com.android.systemui.shared.plugins"
  build succeeds and all tests pass

Bug: 115877296
Change-Id: Ie6f11572026dafa369c99722d63d4daa0ea44fb5
2018-10-05 14:32:04 -07:00
Evan Laird
8a1707e021 Fix DozeConfigurationTest
Settings.Secure.putString() was failing to remove the setting for
config_dozeAlwaysOnEnabled, so the test would only pass if the default
setting matched what was currently set on the device.

The fix seems to be to use
Settings.Secure.putStringForUser(UserHandle.USER_CURRENT), because
systemui tests are now running as the system

Test: atest com.android.systemui.doze.DozeConfigurationTest#alwaysOn_followsConfigByDefault
Change-Id: I482e1b72b4a3567d5448ded0aa110f2e3e05c515
2018-10-05 13:16:50 -04:00
Gus Prevas
cda0e83faf Merge "Fixes icons in shelf scrolled due to exposed menu." 2018-10-04 13:26:35 +00:00
Issei Suzuki
495de00e0a Merge "Refactor DisplayCutout to use Rect instead of Region." 2018-10-04 08:43:54 +00:00
Gus Prevas
99ba4bac9e Fixes icons in shelf scrolled due to exposed menu.
This change modifies NotificationStackScrollLayout to reset the exposed
menu state in the following cases:

- transitioning to AOD
- scrolling via a touch on the exposed notification
- shade height changing, causing footer to clip the exposed notification

This prevents the notification's icon from having its scrollX set (which
is how we keep it lined up with the translated notification) when it's
in the shelf.

Test: manual
Change-Id: Ie2d179c9275ec457ee46c6a40859310610a6d9d8
Fixes: 112304611
2018-10-03 15:29:11 -04:00
Issei Suzuki
43190bdf40 Refactor DisplayCutout to use Rect instead of Region.
Test: unittest
Bug: 112296834

Change-Id: I4245543c26f99afa59a34f5b6e6650b93d052a6e
2018-10-03 18:52:33 +09:00
Salvador Martinez
25041bcec8 Merge "Update triggering to not double trigger at severe threshold" 2018-10-02 19:52:17 +00:00
Salvador Martinez
88b0d501de Update triggering to not double trigger at severe threshold
If the low threshold is not shown for any reason and we reach the
severe threshold and it does show it will double trigger. This CL
just makes it so both are marked as "shown" if the severe warning
is shown regardless of whether the low warning was shown or not.

Test: runtest systemui
Bug: 116716293
Change-Id: I7fff2d7beba7b37312b9a4c4951a68c3d1f1ba3f
2018-10-01 14:48:41 -07:00
Fabian Kozynski
cca4ee0895 Merge "Fixes NPE when trying to expand QSPanel with wrong name of tile" 2018-10-01 20:16:35 +00:00
Fabian Kozynski
e3137e35a4 Fixes NPE when trying to expand QSPanel with wrong name of tile
Fixes promise of StatusBarManager#expandSettingsPanel to document what
happens on invalid tile name.

Added test to verify correct behavior.

Change-Id: I057210eb47411cf2a7dfefdd4efe49b96fd33f69
Fixes: 111128728
Test: runtest && manual
2018-10-01 12:21:30 -04:00
Tony Wickham
023cb195be Move plugin support to shared lib
In addition to changing imports, this required some changes to use java
7, since that's what the shared lib needs to be for launcher.

See bug for more details on this project.

Test: "atest com.android.systemui.shared.plugins"
  build succeeds and all tests pass

Bug: 115877296
Change-Id: Ib79ede0a61664df0ba1a194632a345d2229777fc
2018-09-28 10:04:09 -07:00
TreeHugger Robot
7913b20eb0 Merge "Fix test failure in NonPhoneDependencyTest.java." 2018-09-27 22:32:23 +00:00
TreeHugger Robot
328099b0ad Merge "Extract NotificationSwipeHelper and related state from NSSL." 2018-09-27 20:54:28 +00:00
Aaron Heuckroth
45d20bed1d Extract NotificationSwipeHelper and related state from NSSL.
Change-Id: Ic0a1178e4f3d6f2addd9bae1c31ec57dffee8eba
Test: Automated tests should pass. Manual testing should also show that notifications behave the same as before (swiping, tapping, dismissing, snapping/unsnapping menu, etc.)
2018-09-27 15:25:42 -04:00
Kevin
c87a66b1cc Fix test failure in NonPhoneDependencyTest.java.
The recent change to NotificationGroupManager to use
HeadsUpManager.isAlerting over the row causes a NPE to occasionally
surface if NonPhoneDependencyTest runs long enough.  When it sets up
the listener, it eventually gets a callback that adds a notification and
calls into NotificationGroupManager even though it hasn't had its
dependencies properly set up.  This CL fixes that by setting its
HeadsUpManager to the mock.

Test: ensure in all tests that NotificationGroupManager has its
dependencies set when NotificationEntryManager adds a notification
Fixes: 116495228

Change-Id: I7b82eedbf46fde5c8709dd03fdd36059041ef911
2018-09-26 16:28:57 -07:00
Winson Chung
67f5c8b2d0 Removing dependencies on recents-specific code in SysUI
- Removing references to SystemServicesProxy (to be removed) for
  AM/WMWrapper
- Removing unused code for old nav bar swiping logic, and also unused
  and quickstep-incompatible code for dragging in recents
- Removing all event bus logic from outside recents subpackage
- Exposing PipUI component for bridge caller

Bug: 114137554
Test: Can still swipe up
Change-Id: Ibcfbe06acae06ea5950615cabd52243279fee16d
2018-09-26 14:14:08 -07:00
Lucas Dupin
e0f7f211d5 Merge "Debug hook for changing display brightness" 2018-09-25 22:46:15 +00:00
Lucas Dupin
92e6c89fbb Debug hook for changing display brightness
adb command that allows the AOD brightness to be changed:
adb shell am broadcast -p com.android.systemui
-a com.android.systemui.doze.AOD_BRIGHTNESS
--ei brightness_bucket {BUCKET_HERE}

Fixes: 116060647
Test: adb shell am broadcast -p com.android.systemui -a com.android.systemui.doze.AOD_BRIGHTNESS --ei brightness_bucket 2
Test: atest DozeScreenBrightnessTest
Change-Id: I57de0801aac17a3df466899aec2cf4f37a017d33
2018-09-25 09:43:38 -07:00
Lucas Dupin
b16030f305 Merge "Clear pattern message when showing it again" 2018-09-25 16:19:27 +00:00
TreeHugger Robot
deaeae425d Merge "Checks keyguard earlier when blocking notifications." 2018-09-25 15:40:26 +00:00
TreeHugger Robot
d79170be26 Merge "Remove updatePublicMode from StatusBar.java" 2018-09-25 14:48:29 +00:00
Lucas Dupin
1fc01dcd49 Clear pattern message when showing it again
Change-Id: Ic68d78babbbd5f2c3fa2b97f49847c7f028c4210
Fixes: 111850911
Test: atest KeyguardPatternViewTest
Test: manual
2018-09-24 16:46:50 -07:00
Selim Cinek
63cc5a6466 Merge "Fixed an issue where a notification may not be updated" 2018-09-24 22:39:22 +00:00