Commit Graph

2214 Commits

Author SHA1 Message Date
Robert Horvath
993e82eec7 Merge "Add setting to go to sleep after long user inactivity" 2019-11-15 15:05:15 +00:00
Mady Mellor
53162c13a3 Add Bubble as an option in NotificationInfo longpress menu
- If the content is able to bubble, the bubble option will show in
  the menu
- If that notif is able to bubble (either via bubble metadata or via
  notification contents), then show the menu
- Adds tests for the bubble menu option, also tests selection for alert
  and silence buttons; removes unused test code

Test: atest NotificationInfoTest NotificationGutsManagerTest
Test: manual - post a bubble with bubbles test app, longpress on notif
               and demote it via menu => bubble is gone
             - long press on notif and promote it via menu => bubble is
               created
Bug: 138116133
Bug: 143173197
Change-Id: I2f2767ec12c49e5d3a8d2a7b86db5457d062275c
2019-11-11 16:29:37 -08:00
Robert Horvath
5560f38654 Add setting to go to sleep after long user inactivity
The European Commision prescribes an auto-standby feature for TV panels:
After some hours of inactivity, the device has to go from on-mode to
standby-mode or off-mode, or another condition not exceeding the
applicable requirements for standby-mode or for off-mode.

After a long time of no user activity the device should go to sleep,
even if wakelocks are held (eg. during video playback).

Test: 1. Set attentive timeout low, to 35s:
         `adb shell settings put secure attentive_timeout 35000`
      2. Play a YouTube video
      3. Observe warning dialog appearing after 5s
      4. Verify: Clicking a remote button or changing the setting higher hides
         the warning. Remote button press is consumed.
      5. Verify: After 35s of not pressing a button the device goes to sleep
      6. Verify: If "Stay awake" developer option is enabled, then
         warning is not displayed and device does not go to sleep after 35s
      7. Verify: No warning or sleep if setting is set to -1
Test: `atest frameworks/base/services/tests/servicestests/src/com/android/server/power/PowerManagerServiceTest.java`
Bug: 137633812
Change-Id: I551b6cffc336437fb1c5a00b4102f68ae0e003e9
2019-11-08 15:18:28 +01:00
Matt Pietal
5a19cb6115 Home Controls: Consolidate flags for QS media player/NPV
Use 'adb shell settings put system npv_plugin_flag X' to
enable/disable media player as well as NPV

Test: visual
Change-Id: I0d889300b4b08c2d89ab75983e77ec3ba739783e
2019-10-30 12:33:33 -04:00
Matt Pietal
8d4a635cc3 Reuse NPVPlugin for QS Controls Tile
Enabled reuse for better support/easier flow for user.

adb shell settings put system npv_plugin_flag 3

Test: visual
Change-Id: I9e3e2b02e60bf732ab6e6c1f184b4bdfcf368934
2019-10-24 13:33:32 -04:00
TreeHugger Robot
f1f26c2cad Merge "Plugin interface for PeopleHub" 2019-10-23 16:30:20 +00:00
Steve Elliott
984cfec745 Plugin interface for PeopleHub
This allows for plugins to add additional "people notification"
detection logic, useful for prototyping against apps which do
not post MessagingStyle notifications.

Test: manual
Change-Id: I8b7b824beed50dfb86689f41ff151b3014737ffb
2019-10-23 11:23:59 -04:00
Beth Thibodeau
07d20c3243 Add QS media player options
This adds a mini player in the QQS, and media carousel in QS
Incorporates the WIP layout changes from ag/9415169

To enable: adb shell settings put system qs_media_player 1
then toggle dark mode, or adb shell stop && adb shell start

Known issues with color overlays not updating until you press a button,
and old sessions do not get automatically removed from the carousel.

Test: manual
Change-Id: Iaeda470a920cb115c28ec98f04d74f255e1d5a12
2019-10-22 10:47:30 -04:00
Steve Elliott
58adc21f3c Add PeopleHub to the notification shade
When the people section of the shade is enabled, an additional entry
will appear at the bottom of the section that contains shortcuts to
recent conversations that have appeared as notifications.

Test: manual
Change-Id: Iac94cabe3dd4233510ddc50b3a1923ed42c552e0
2019-10-18 17:14:27 -04:00
Matt Pietal
b6da00e69a Home Controls: Add a new Controls tile for prototyping
Must edit the QS area to add the new Controls tile and have set:

adb shell settings put system qs_controls_tile_enabled 1

Test: visual
Change-Id: I7359d394d6d0a5eb408de7049bf0b3051c83e361
2019-10-16 11:18:49 -04:00
Dave Mankoff
0cf8dfce9b Create controller for StatusBarWindowView.
This moves most of the logic out of the view and into
StatusBarWindowViewController. It is not beautiful, but
it is cleaner than before.

This removes the final call to Dependency.get(FalsingManager.class).

This also fixes a small, old bug in
StatusBarWindowView.onInterceptTouchEvent where the results
of calling hte super method were being unintentionally ingored.
(This bug would have been introduced nearly seven years ago.)

Bug: 141751146,136279712
Test: atest SystemUITests
Change-Id: I5e09c1c0f2a3098db1a47837ddce3d382099f483
2019-10-07 11:05:40 -04:00
Kevin Chyn
8110ebb57c 16/n: Add PIN/Password
Bug: 140127687

Make AuthCredentialView abstract, and have the following subclasses
 1) AuthCredentialPatternView
 2) AuthCredentialPasswordView

Back button cancels password authentication

Test: manual test with pattern, pin, password
Test: atest com.android.systemui.biometrics

Change-Id: I95e42144616a59827da25d10d063990452714f76
2019-10-04 13:13:12 -07:00
Kevin Chyn
8cbb488b9a 13/n: persist device credential across configuration changes
1) AuthContainerView can be started in either `biometric` or `credential`
   views. This is to potentially support an API where only credential
   is allowed/requested.
2) When onSaveState, AuthContainerView saves both the states of
   `biometric` and `credential` visibility. In the case of configuration
   change, AuthController is responsibile for checking the visibility
   and creating a AuthContainerView with the correct initial view.
3) When AuthCredentialView is the initial view, it owns the panel
   expansion.
4) Added landscape layout

Bug: 140127687

Test: atest com.android.systemui.biometrics
Test: BiometricPromptDemo, use pattern, rotate device. auth, cancel,
      demo logs are correct.

Change-Id: I1f501cf13b924353f251a69757fdb9d7e0bf1d21
2019-10-03 14:00:16 -07:00
Kevin Chyn
ff168dc49d 12/n: Add LockPatternView for setDeviceCredentialAllowed(true)
Includes lock icon, title, subtitle, description, lock pattern view.
Corner radius and padding animates nicely from !=0 --> 0.

Support for password/pin will come in a subsequent CL.
Unit tests for AuthCredentialView will be added when
password/pin are implemented.

Support for persisting across configuration changes
and landscape view will also be added in a subsequent
change.

Test: BiometricPromptDemo with the following:
      1) Confirm pattern, callback received
      2) Rejected, error string shown
      3) Lockout (5 attempts), countdown string shown,
         pattern view disabled until countdown is over
      4) Cancel pattern auth, callback received
Test: atest BiometricServiceTest
Test: atest com.android.systemui.biometrics

Change-Id: Idc01e33be0074a6c8a43f60b172a4391bfbe5e8a
2019-10-03 14:00:16 -07:00
Sergey Nikolaienkov
976722f373 Merge "Add audio recording disclosure plate on TV" 2019-10-01 13:38:32 +00:00
Fabian Kozynski
71428f7944 Merge "Fix size and gravity of carrier text" 2019-09-30 15:02:31 +00:00
Sergey Nikolaienkov
c7a95ac67f Add audio recording disclosure plate on TV
Implementing a piece of SystemUI (TvStatusBar) for notifying users when
audio recording is conducted by applications (other than Assistant,
which is the only exception for now).

Bug: 134942150
Change-Id: I57b50816e9b4379c22e4281568ef990d96fd2498
Test: build, flash, run any app that records audio
2019-09-30 14:41:55 +02:00
Fabian Kozynski
082aaf91c4 Fix size and gravity of carrier text
Test: manual
Fixes: 141654596
Change-Id: If5a4d794c6316149e752a94f7eed83a10d15b3b8
2019-09-27 08:59:24 -04:00
Matt Pietal
d43e133a08 Use proper margins for NPV plugin and set the offset
Set the offset to the size of the QS area and add margin after that to
visually separate the QS and NPVPlugin areas

Test: visual
Change-Id: I9dc676eef0a49f1648723cdd91043b839c880ee5
2019-09-26 11:11:06 -04:00
shawnlin
87af538d38 Move assist handles from ScreenDecorations to navigation bar
To improve the performance of display cutouts, we need to first move the
assist handles out of ScreenDecorations so that we can remove the layer
of ScreenDecorations later.

Bug: 140781914
Test: atest ScreenDecorationsTest, atest AssistHandleBehaviorControllerTest
Change-Id: I7c7cf8e0590d92aa32758c2983fc49387d18f7ad
2019-09-24 21:35:03 +08:00
Kevin Chyn
62db716f7f Merge "Take optional fields into consideration when measuring" 2019-09-19 00:27:03 +00:00
Kevin Chyn
c2ea8f264f Take optional fields into consideration when measuring
Also, move the padding to the icon so it's not dependent on an optional
view.

Bug: 123378871
Test: Do not set subtitle/description. Dialog layout looks normal now.
Change-Id: Ia6ae768660442aeaadeb09aa7117780b8a97d56f
2019-09-18 11:47:36 -07:00
Kevin Chyn
4266d333eb Merge "Remove lingering resources from old BiometricPrompt" 2019-09-17 16:35:27 +00:00
Kevin Chyn
d6aae0f528 Remove lingering resources from old BiometricPrompt
Bug: 123378871

Test: Builds
Change-Id: Ib9ec339110c166619310371a269a4295aabd1d09
2019-09-16 18:34:48 -07:00
Lucas Dupin
5ef1f82919 Merge "Remove enterprise disclosure from lock screen" 2019-09-16 15:52:04 +00:00
Lucas Dupin
f955a2fe90 Remove enterprise disclosure from lock screen
There's duplication and the persistent field is already on quick
settings, it's also taking up space and confusing users, since
it's too close to where we put error messages.

Fixes: 140939386
Fixes: 139966195
Fixes: 140053632
Test: visual
Change-Id: I06100e0e44db03e4998885ecfa0ffa301d1f5c65
2019-09-12 22:49:11 +00:00
Matt Pietal
b3e8cbd2a6 QS - Prototype visual affordance for detail panels
Builds on ag/9335278 to show "..." below tiles that support direct to
detail view on touch.

Test: manual
Change-Id: I1c192656505bac228a3935f0aa498c37a468d973
2019-09-12 12:09:31 -04:00
Fabian Kozynski
053c2ebeaa Merge "Fix incorrect text when on Airplane Mode" 2019-09-12 12:59:25 +00:00
Kevin Chyn
e9744e406e 8/n: Ensure accessibility works on new implementation
Bug: 123378871
Test: manual test with talkback enabled

Change-Id: I7f4da76ef7ebcbb74f1984b2859b85aa72e8d946
2019-09-11 15:54:09 -07:00
Kevin Chyn
889de4c680 6/n: Add fingerprint support to the refactored UI
Bug: 123378871

Test: atest com.android.systemui.biometrics
Test: manual test of fingerprint auth

Change-Id: Iac308557d5715c2450a2486d84a5a8292e4d3e42
2019-09-11 11:17:38 -07:00
Fabian Kozynski
0f49f207c6 Fix incorrect text when on Airplane Mode
Only generate missing sim text if there are no CarrierName present AND
no sims READY. This was an issue when airplane mode with WFC.

Also, replace using mCarrierGroups[0] for its text when the sims are
missing. Instead use a different view that is made visible when all the
QSCarrierGroups should be invisible.

Test: manual, using APM
Test: atest
Fixes: 139556559

Change-Id: I9d83b0eb2a21b786d50c243903bf32b6e761dc77
2019-09-10 17:00:34 +00:00
Fabian Kozynski
ab2c31a31f Merge "Adding a Plugin to attach things under QQS" 2019-09-06 13:05:32 +00:00
Kevin Chyn
90df5c81ac Merge "5/n: Restore biometric dialog state across configuration changes" 2019-09-06 02:41:10 +00:00
Kevin Chyn
9cf899162e 5/n: Restore biometric dialog state across configuration changes
Bug: 123378871

Test: manual test, rotating device during various stages of
      authentication
Test: atest com.android.systemui.biometrics

Change-Id: I4130f79975f58e5141c9d69e2689680ceaa419ed
2019-09-05 17:48:40 -07:00
Fabian Kozynski
3bf518dd98 Adding a Plugin to attach things under QQS
This plugin responds to expansion and changes in theme, ui, etc.

Test: manual

Change-Id: I5d866a4fff491aa6273edfb765e538864b270534
2019-09-05 12:26:13 -04:00
Kevin Chyn
b63ff32f53 Merge changes from topic "biometric-ui-refactor"
* changes:
  4/n: Rename files to make more sense
  3/n: Tapping outside of the dialog should cancel authentication
  2/n: Start plumbing authentication signals to the UI
  1/n: Refactor BiometricPrompt UI hierarchy
2019-09-03 17:49:46 +00:00
Kevin Chyn
f8688a0a1e 4/n: Rename files to make more sense
Also flatten the directory, there isn't much point in having a sub package
right now.

Bug: 123378871
Test: atest com.android.systemui.biometrics

Change-Id: I598f1909f6e6940d73da37921d9b5cd2c02f4331
2019-08-30 18:41:41 -07:00
Kevin Chyn
504f77d837 2/n: Start plumbing authentication signals to the UI
Test: Authentication in both small/medium dialog
Test: Negative button, Cancel button, Try again button
Test: atest AuthBiometricFaceViewTest
Test: atest AuthBiometricViewTest
Test: atest AuthContainerViewTest

Bug: 123378871

Change-Id: Iab5edf863d0ef26855a65585c73e2d495b2ab6e9
2019-08-30 18:19:15 -07:00
Kevin Chyn
fc46826f0a 1/n: Refactor BiometricPrompt UI hierarchy
The UI is split into a few components now
 1) BiometricPromptContainerView - top level, contains the work profile
    background view, the panel (rounded background)
 2) BiometricPromptBiometricView - nested within, displays contents for
    biometric auth

The panel must be one level higher (in hierarchy) than the biometric
dialog to allow future non-biometric views to be added cleanly, and to
allow separate animations for the background/foreground.

Bug: 123378871
Test: Demo app with text that requires scrolling; dialog bounds are correct,
      view elements are contained within the dialog bounds
Test: atest BiometricDialogImplTest
Test: atest BiometricDialogViewTest
Test: atest AuthBiometricViewTest
Test: atest AuthBiometricFaceViewTest

Change-Id: Ie4e5a8641a10229154a1011afefacb823aadf565
2019-08-30 17:43:27 -07:00
Mady Mellor
06b770cf14 qt-r1-bubbles-dev @ build 5835883
Test: presubmit setup on source branch

Bug: 126945401
Bug: 128932906
Bug: 129158983
Bug: 130237686
Bug: 130250809
Bug: 130442248
Bug: 131267438
Bug: 131609280
Bug: 131692350
Bug: 131849856
Bug: 133444037
Bug: 134064116
Bug: 134064858
Bug: 134070807
Bug: 134077101
Bug: 134090085
Bug: 134155107
Bug: 134423445
Bug: 134512898
Bug: 134514210
Bug: 134514227
Bug: 134734945
Bug: 134960381
Bug: 134989736
Bug: 135214687
Bug: 135280077
Bug: 135472021
Bug: 135475155
Bug: 135487618
Bug: 135488406
Bug: 135518045
Bug: 135633218
Bug: 136034310
Bug: 136150954
Bug: 136199542
Bug: 136538998
Bug: 137201711
Bug: 137213469
Bug: 137214359
Bug: 137214536
Bug: 137233453
Bug: 137876221
Bug: 138301618
Bug: 138445026
Bug: 138659213
Bug: 138749133
Bug: 138799651
Bug: 138801505
Bug: 138941969
Bug: 139002444
Bug: 139025304
Bug: 139816141
Change-Id: Ic271a6a0f0803941dd5a84124dabf4d8c5fcc755
2019-08-29 20:24:52 -07:00
Matt Pietal
50c8b50b37 Controls: Add a temporary space for home controls integration
This space will only be visible by setting a flag to enable split
status-bar functionality:

adb shell device_config put systemui qs_split_enabled true

To populate the view, you will also need to build and install an
experimental plugin from google3, coming shortly.

Test: manual
Change-Id: Iccf712a0355ebf8d9c6da2dac63874820270d405
2019-08-21 13:40:12 -04:00
Jerry Chang
2dca8798ed Merge "Merge "Extract keyguard indication view overlay" into qt-qpr1-dev am: dff17fc123" into qt-qpr1-dev-plus-aosp
am: 16a61710a6

Change-Id: Ic105a6306d76a6643ee1543c497eefed5b9abd6a
2019-08-07 00:21:08 -07:00
Jerry Chang
930b5ec9a7 Extract keyguard indication view overlay
Bug: 138268879
Test: atest SystemUITests:KeyguardBottomAreaTest
Change-Id: I8729ef8dfa3dbb695b84fd864659486bdb340bf9
2019-08-07 10:21:12 +08:00
Fabian Kozynski
786974f14a Prototype dual panel swipe
This CL only reroutes swipes on the right side of the screen (left side
for RTL) to perform a two-finger swipe, opening QS instead of
notification shade.

Enable: "adb shell device_config put systemui qs_split_enabled false"

Test: manual

Change-Id: I96feed6440121b0c07606b398c9e2bb82570ef11
2019-08-01 15:33:41 -04:00
Robert Snoeberger
5b2dbef2ce Merge "Pad indication text to prevent clipping on side of screen." into qt-r1-dev am: b7098f9d9c
am: f0e95540c1

Change-Id: I564f4e91252c9e37ad5c758e147151b74a980751
2019-07-18 12:03:28 -07:00
Robert Snoeberger
9733bc4159 Merge "Pad indication text to prevent clipping on side of screen." into qt-r1-dev
am: b7098f9d9c

Change-Id: I12bf5f7d7648bf2871eefdf12d59e4c9e164ccb8
2019-07-18 11:48:18 -07:00
Robert Snoeberger
f6e32f079d Pad indication text to prevent clipping on side of screen.
Padding amount is the same as owner_info also shown on AOD screen.

Bug: 137627803
Test: Checked that text with more than 100 characters shown in
indication area wasn't clipped on side of screen. 100 characters was
used because face_acquired_sensor_dirty string has char limit of 100.
Change-Id: I1c4014b4cfbdc2bba84b9974813ca23e6b42cf4c
2019-07-18 10:12:42 -04:00
joshmccloskey
6de1392f4f Talkback announces empty regions after rotation.
Fixes: 137616592
Test: Talkback successfully read the content descriptions of
the empty spaces after rotating.

Change-Id: I59853fbb2678ecc96e8e5ab594e8a426bc26a422
2019-07-17 22:11:40 +00:00
TreeHugger Robot
337b1a5968 Merge "Dismiss target v2" into qt-r1-bubbles-dev 2019-07-02 01:04:20 +00:00
Lyn Han
634483c68f Dismiss target v2
Current dismiss flow
- On bubble drag, show gradient with "X Dismiss"
- When bubbles get close to the gradient, show X-in-circle

This change
- Removes gradient and "X Dismiss"
- Shows X-in-circle (with 70% scrim inside) on bubble drag
- Reduces bubble_dismiss_encircle_size to spec (56dp => 52dp)
- Removes duplicate mDismissContainer in BubbleStackView

Fixes: 136199542
Test: manual (dismiss target has scrim, shows on bubble drag)
Test: manual (dismiss target behaves consistently for consecutive drags)
Test: atest SystemUITests
Change-Id: I21101ca9f2eb1b3c53b613231557f9f7936fddfa
2019-07-01 12:59:53 -07:00