Commit Graph

1469 Commits

Author SHA1 Message Date
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
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
Gus Prevas
533836ac72 Checks keyguard earlier when blocking notifications.
This change modifies NotificationInfo to call the provided keyguard
callback when the "Stop notifications" button is tapped, rather than
when trying to save the new importance value after the undo timeout.

Test: updated test cases in NotificationInfoTest.
Bug: 111416533
Change-Id: I89b4715d0d41be4587753f554862e51c4e1d43c3
2018-09-24 17:28:31 -04:00
TreeHugger Robot
4d2eeb5bf9 Merge "Refactored the contextual group of buttons that appear on the nav bar" 2018-09-22 02:26:30 +00:00
Selim Cinek
4a38f23240 Fixed an issue where a notification may not be updated
When timing out, we need to update the notifications in
case any of the updates have been blocked.

Change-Id: Idea862f7faae136feea650d292694475973fd3cf
Fixes: 80571494
Test: use test app provided
Test: runtest -x packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/ActivityLaunchAnimatorTest.java
2018-09-21 19:05:00 -07:00
TreeHugger Robot
a48d662edd Merge "Allow whitelisted plugins on user builds" 2018-09-22 01:12:30 +00:00
Matthew Ng
25593cc9b8 Refactored the contextual group of buttons that appear on the nav bar
Refactored NavigationBarView's contextual buttons to keep track of just
one button's visiblity with its container group. The visiblity is
determined by the priority of the buttons. For example, accessibility
has the highest priority, if that is visible, no other buttons can take
its place, however if menu button is visible, then rotation can appear
instead.

Bug: 116041410
Test: atest NavigationBarContextTest
Change-Id: Ic0762c7b7121a313b7c08989f9ab761426372c5c
2018-09-21 17:40:27 -07:00
Aaron Heuckroth
b981efa912 Merge "Remove references to SwipeHelper from NotificationMenuRow." 2018-09-21 15:30:30 +00:00
Aaron Heuckroth
266cb3485c Remove references to SwipeHelper from NotificationMenuRow.
The intent here is to move gesture processing out of NotificationMenuRow and into NotificationSwipeHelper.

Test: Automated tests should pass, and manual experimentation with dismissing/tapping/replying to notifications should work as expected.
Change-Id: Icd32f14769f1b494ecc1dedb2cc37ee129ed21f7
2018-09-20 15:54:16 -04:00
TreeHugger Robot
7f1d0dc731 Merge "Split ambient pulse notif logic from heads up." 2018-09-20 17:42:46 +00:00
Kevin
a97ea059b5 Split ambient pulse notif logic from heads up.
This CL aims to split the ambient pulse logic from the heads up logic as
a lot of the logic is specific to one or the other.  This CL introduces
the following major changes.

1. Introduces AmbientPulseManager which manages notifications that pulse
while the screen is dozing or on AOD and manages their lifetime.

2. Ties pulse duration for notifications more tightly with the lifetime.
This means DozeScrimController does not control the pulse time but
instead AmbientPulseManager.  This is because previously, having two
separate lifetimes (one for the pulse, one for the notification) caused
some strange issues to occur if one ended before the other.

3. Divide out logic for heads up and ambient pulse, so they are no
longer both tied to shouldPeek in NotificationEntryManager.

4. Multiple naming refactors for readability (e.g. contains ->
isAlerting, mShowAmbient -> mOnAmbient, etc.).

Although this is a refactor, some of the behavior does change in some
places where I thought the current behavior was not intended.  In
particular:

* Ambient notifications are no longer marked as seen immediately on
pulsing.  We should reserve this for when we are confident the user has
seen the notification.
* Ambient notifications are no longer disabled or snoozed when heads up
notifications are disabled or snoozed respectively.
* Removing/cancelling a notification that is pulsing no longer keeps
the pulse going awkwardly with no notification in the middle.  Instead,
the pulse ends (provided it was shown for a minimum amount of time).

Change-Id: I26af6f7e7ad7fa71d2d43f7c4d86fb34551151b0
Test: manual, runtest systemui
2018-09-19 17:48:03 -07:00