Commit Graph

6965 Commits

Author SHA1 Message Date
Dave Mankoff
346a71da4c Merge changes from topic "change-13630081" into sc-dev
* changes:
  Revert^2 "Remove final calls to Dependency.get from keyguard."
  Revert^2 "Remove Dependency.get from KeyguardStatusView."
  Revert^2 "Add injection to ClockProvider."
  Revert^2 "Remove Dependency.get from KeyguardSliceTextView."
  Revert^2 "Add Controller for Emergency Button."
  Revert^2 "Add ViewController to CarrierText."
  Create central TelephonyListenerManager.
2021-03-23 20:01:13 +00:00
Matt Casey
e8b5b6fbc4 Merge "Make ScrollCaptureControllerTest stricter" into sc-dev 2021-03-23 20:00:06 +00:00
Lucas Dupin
ced0e5a10b Merge "SystemUI: SecureSetting: Allow specifying a non-zero default" into sc-dev 2021-03-23 19:52:27 +00:00
Flavio Fiszman
5785c5c68f Merge "Show messages count in People Tile" into sc-dev 2021-03-23 16:42:53 +00:00
Luca Stefani
3eaf8ee6a4 SystemUI: SecureSetting: Allow specifying a non-zero default
* Some Setting while empty should be assumed to be
  non-zero by default ( ex AmbientDisplay )

Test: m, atest SystemUITests:SecureSettingTest
Fixes: 183498544
Change-Id: I44e1c4296be4e1a1f549d52d4dc0f5b2b7cef855
2021-03-23 15:34:32 +00:00
Dave Mankoff
23e9e5373c Revert^2 "Remove final calls to Dependency.get from keyguard."
bfec35b4f4

Change-Id: I423b0aa056a5f6ad601874f4bff41299b35f0a7f
2021-03-23 10:48:27 -04:00
Dave Mankoff
db4ee91dce Revert^2 "Add Controller for Emergency Button."
f23acf33ff

Change-Id: Id555c35af9a5ed2570504cd6b4e3ca3b5892c340
2021-03-23 10:48:27 -04:00
Dave Mankoff
78418476c4 Revert^2 "Add ViewController to CarrierText."
831715fdc2

Change-Id: I4df58754737d1badccecc97bc3b27d8c3c09bbc8
2021-03-23 10:48:27 -04:00
Dave Mankoff
deca9ea898 Create central TelephonyListenerManager.
The TelephonyManager doesn't like have "too many" listeners
registered on int at any given time. It will actually throw
exceptions when this happens. To lighten the load from the SystemUI
side, TelephonyListenerManager now ensures that only one listener is
ever subscribed at any point.

SystemUI can now use this class instead, piggy-backing on the
possibly already subscribed listener to retrieve the events it cares
about.

Also, use Executors in CarrierTextController instead of Handlers.

Bug: 179775696
Test: atest SystemUITests
Change-Id: I626e80a91396161022e1fc6387598521f77bf4fc
2021-03-23 10:48:18 -04:00
Flavio Fiszman
87eec50482 Show messages count in People Tile
Change-Id: I85b262dda92227cbea2672d9725bda163a5bb42a
Test: manual
Bug: 183382000
2021-03-23 11:25:29 +00:00
Jeff DeCew
2a12cfadb4 Merge "New MediaStyle template:" into sc-dev 2021-03-23 02:14:06 +00:00
Evan Laird
a725858e64 Add a block list to IconManager
Things are always a little wonky with the status bar icons, but
basically there is one (1) StatusBarIconController which funnels status
icon information to all IconManagers, of which there are typically three
(3) - Regular status bar, keyguard status bar, and quick settings

This CL implements a simple blockList at the IconManager level, so that
icons can be excluded for a given manager (and thus a given UI), and
blocks the following icons from keyguard and status bar: alarm, vibrate/mute

More can easily be added by adding them to the blocklist

Test: manual; atest SystemUITests
Bug: 177323724
Bug: 179830434
Change-Id: I01a9df748f92c086a6e86f1449cae8b4c9c092ca
2021-03-22 18:06:42 +00:00
TreeHugger Robot
f43e3cabec Merge "Update showing udfps keyguard affordance logic" into sc-dev 2021-03-22 17:07:31 +00:00
Anna Zappone
b7a2c8bd18 Merge "Implement 2x2 layout and text resizing" into sc-dev 2021-03-22 17:01:12 +00:00
Lucas Dupin
c1615dffe1 Merge "Update system palette APIs" into sc-dev 2021-03-22 16:57:17 +00:00
Jeff DeCew
ff165814e1 New MediaStyle template:
* Remove all media-specific color extraction and colorization logic
* Remove all 'large icon' gradienting logic
* Simplify base (headerless) style to use a LinearLayout instead of tweaking margins
* Make compact media layout a tweak of the base (headerless) layout
* Make big_media layout a tweak of the big_base layout
* Fix an unnecessary swooping animation that happened on expand
* Ensure RTL layout also works

Fixes: 172652345
Test: manual testing w/ updated notify2
Change-Id: I11c1494c0ac32aaf3e9d2010560cc8f1d8c50037
2021-03-22 11:13:08 -04:00
Anna Zappone
ac9e0f9162 Implement 2x2 layout and text resizing
Expand text to best-fit the layout by calculating maxLines for medium
and large layout.

Bug: 182377480
Test: PeopleSpaceUtils
Change-Id: I980ef776dfdf6e3007b8761ec7e1db3ec5fe5b7d
2021-03-22 15:00:16 +00:00
paulhu
3ce12e7b65 Fix CS external dependencies on SystemUI
- Use formal API getSystemService to get ConnectivityManager.
- Use formal API PackageManager#hasSystemFeature(
  PackageManager#FEATURE_TELEPHONY) to know whether device
  supports telephony.
- Use formal API TelephonyManager#isDataCapable() to know
  whether device has mobile ability.
- Replace NetworkCapabilities#equalsTransportTypes with
  comparing two NetworkCapabilities' transport types directly.
- Replace ConnectivityManager#INET_CONDITION_ACTION by listening
  onCapabilitiesChanged() network callback.

Bug: 183068713
Test: atest SystemUITests
Change-Id: I4a53223f36ea09a062a9ddea668a9d0662f0dbbc
2021-03-22 19:28:40 +08:00
Roshan Pius
2322c835cb NetworkControllerWifiTest: Fix unit test
WifiInfo.makeCopy(boolean) was changed to WifiInfo.makeCopy(long).

Bug: 156867433
Bug: 162602799
Test: Compiles
Change-Id: Idec6165f6cf9819c56513a65c6958f2390cddbfe
2021-03-21 17:56:42 +00:00
Lucas Dupin
6110d25881 Update system palette APIs
UX landed on a format where we have 2 neutral palettes, and 3 accent
palettes. It's the ideal format to play with elevation and hue rotation,
in order to have a more vibrant and less muddy UI.

Fixes: 181986389
Bug: 173553055
Test: atest SystemPalette
Test: atest ThemeOverlayControllerTest
Test: atest ThemeOverlayApplierTest
Test: atest DeviceDefaultThemeTest
Change-Id: I80d3f7d1cc92e97efcb40fe6dc9f09918321d273
2021-03-20 14:50:26 -07:00
Beverly
4797761f1d Update showing udfps keyguard affordance logic
- Don't show if QS is expanded

Test: manual
Bug: 183112863
Bug: 175717712
Change-Id: I9836e391d32982613e7a04b4e97bc9f4d8bbf986
2021-03-19 20:45:28 +00:00
Ying Xu
5a34763729 Merge "Use different slots for no_calling and call_strength icons" into sc-dev 2021-03-19 19:06:41 +00:00
Matt Casey
8cc0ab9cfa Make ScrollCaptureControllerTest stricter
- Ensure requested rect overlaps with total rect.
- Ensure sequential tiles are adjacent

Test: atest ScrolCaptureControllerTest
Change-Id: Ib722b7b65a81df30930467cd5758d8e37bb71f4d
2021-03-19 13:24:07 -04:00
Sally Yuen
f463575980 Merge "Reduce Bright Colors feature name update" into sc-dev 2021-03-19 17:18:26 +00:00
Flavio Fiszman
560acb653b Remove People Tile flag and clean up
Change-Id: Ia4d3f72933bd624fbc414354f8cdca7003737687
Test: manual
Bug: 170396074
2021-03-19 09:27:41 +00:00
Shan Huang
b2e08e976a Merge "Add the charging ripple effect, currently guarded by flag_charging_ripple." into sc-dev 2021-03-19 08:00:23 +00:00
Winson Chung
d3d61ffefe Merge changes from topic "shell_feature_interfaces_reland" into sc-dev
* changes:
  2/ Add mechanism to expose other features directly
  1/ Add mechanism to expose shell feature directly (for Pip)
2021-03-19 06:55:31 +00:00
jasonwshsu
e24d701f4c Handle the phone get booted case to show accessibility floating menu
* AccessibilityManager might not ready when the phone just got booted.

Cherry picked from commit bf0ab7163d

Bug: 173940864
Test: atest AccessibilityFloatingMenuControllerTest
Change-Id: I0339597cd53ca5daade427fef257bfddb3b86bd8
Merged-In: I0339597cd53ca5daade427fef257bfddb3b86bd8
2021-03-19 13:40:49 +08:00
jasonwshsu
5154c4cfae Handle the basic logic to show or hide accessibility floating menu
* AccessibilityFloatingMenuController will listen to the changes from AccessibilityButtonTargetsObserver and AccessibilityButtonModeObserver then handle the visibility of FloatingMenu
* Add abstract class SecureSettingsContentObserver to handle a registry of listeners of specific types and dispatch changes to child

Cherry picked from commit 523514fd24

Bug: 173940864
Test: atest AccessibilityButtonTargetsObserverTest AccessibilityButtonModeObserverTest AccessibilityFloatingMenuControllerTest
Change-Id: I07fded55340644bce84a3f17a7a4da950268d2d2
Merged-In: I07fded55340644bce84a3f17a7a4da950268d2d2
2021-03-19 13:40:45 +08:00
jasonwshsu
c1e28cc20e Observer for the accessibility button mode and notify its listeners for the changes
* Update accessibility button state (visibility) in navigationbar when
accessibility button mode listener receive the changes.

Cherry picked from commit 2c60295be9

Bug: 173938894
Bug: 173940864
Test: atest AccessibilityButtonModeObserverTest
Change-Id: I03b961c95a20e4698491443012beb3ab73333199
Merged-In: I03b961c95a20e4698491443012beb3ab73333199
2021-03-19 13:40:40 +08:00
TreeHugger Robot
62d3178166 Merge changes from topic "accessibility_floating_menu_widget" into sc-dev
* changes:
  Add new floating action menu for Accessibility targets. (5/n)
  Add new floating action menu for Accessibility targets. (4/n)
  Add new floating action menu for Accessibility targets. (3/n)
  Add new floating action menu for Accessibility targets. (2/n)
  Add new floating action menu for Accessibility targets. (1/n)
2021-03-19 05:26:47 +00:00
Haining Chen
82a38b099e Merge "Add biometric component info and face type into SensorPropertiesInternal" into sc-dev 2021-03-19 03:49:10 +00:00
Peter_Liang
1b682704fd Add new floating action menu for Accessibility targets. (5/n)
Action:
AccessibilityFloatingMenu has two shape types, one is oval style, the other is half oval style.
- Half oval shape when dragging.
- Oval shape when dropping.
The patch will provide the capability of switch shape type by dragging into the screen edge or out.

Cherry picked from commit 0a2e8f9a56

Bug: 173958541
Test: atest AccessibilityFloatingMenuTest
AccessibilityFloatingMenuViewTest AccessibilityTargetAdapterTest

Change-Id: Ib86713cd6a48e102cb9088beb6353391caeadc83
Merged-In: Ib86713cd6a48e102cb9088beb6353391caeadc83
2021-03-19 11:35:39 +08:00
Peter_Liang
2f5db39366 Add new floating action menu for Accessibility targets. (4/n)
Patch action:
1. Drag and drop anywhere on the screen.
2. Stick on the closest left side or right side of the screen when dropping.
3. Apply the different styles.
 - Half oval style when dropping.
 - Oval style when dragging.

Cherry picked from commit adad00ef6f

Bug: 173958541
Test: atest AccessibilityFloatingMenuTest
AccessibilityFloatingMenuViewTest AccessibilityTargetAdapterTest

Change-Id: I5f207b86b9ca4342f1414230c4d7524c59f48953
Merged-In: I5f207b86b9ca4342f1414230c4d7524c59f48953
2021-03-19 11:35:26 +08:00
Peter_Liang
596c9fab0a Add new floating action menu for Accessibility targets. (3/n)
Patch action:
Obsevers the settings key and update the corresponding status.

Cherry picked from commit ff5466d31a

Bug: 173958541
Test: atest AccessibilityFloatingMenuTest AccessibilityFloatingMenuViewTest AccessibilityTargetAdapterTest
Change-Id: Ic3a499f48613519313802298ee09b1e06abf1b1d
Merged-In: Ic3a499f48613519313802298ee09b1e06abf1b1d
2021-03-19 11:35:22 +08:00
Peter_Liang
1b38ff82bc Add new floating action menu for Accessibility targets. (2/n)
Patch action:
1. Update the style depends on the settings icon and size key.
2. Under half circle shape mode, the menu will enlarge touch area.

Cherry picked from commit c26ac8c638

Bug: 173958541
Test: atest AccessibilityFloatingMenuTest AccessibilityFloatingMenuViewTest AccessibilityTargetAdapterTest
Change-Id: Iec53ef71d7e0abe5c7619d4e5f67862ca56dfd1f
Merged-In: Iec53ef71d7e0abe5c7619d4e5f67862ca56dfd1f
2021-03-19 11:35:09 +08:00
Peter_Liang
cd10a1bc49 Add new floating action menu for Accessibility targets. (1/n)
Goals:
- Trigger actions of accessibility features would be grouped into the floating menu.

Patch action:
1. Use current Accessibility Target functions to get the corresponding data.
2. The position of the floating menu is at the bottom-right corner of the screen initially.
3. Support dark theme.

Bug: 173958541
Test: atest AccessibilityFloatingMenuTest AccessibilityFloatingMenuViewTest
Change-Id: I28e729520d4eb8ecb0bcc41d4de9d1499380e7f5
Merged-In: I28e729520d4eb8ecb0bcc41d4de9d1499380e7f5
(cherry picked from commit 2be49c9be9)
2021-03-19 11:33:56 +08:00
yinxu
00db3e0cdd Use different slots for no_calling and call_strength icons
Bug: 179830434
Test: Manual tests
Change-Id: Ie0ffc5096af0f841aba4683cc9b017e849304704
2021-03-18 15:41:34 -07:00
Ilya Matyukhin
2ce0a3739d Merge changes from topic "implement-lhbm" into sc-dev
* changes:
  Introduce IUdfpsHbmListener
  Implement LHBM/GHBM switch
2021-03-18 21:27:21 +00:00
Mady Mellor
651be19f5c Merge "Remove the explicit callback, not all of them" into sc-dev 2021-03-18 20:29:50 +00:00
Winson Chung
2b72add7fd 1/ Add mechanism to expose shell feature directly (for Pip)
- Also split impl and controller for ShellInit/ShellCommandHandler
  (as with ag/13502602)
- Example implementation of exposing a subset of the Pip interface to
  Launcher directly.  This has the benefit of reducing unnecessary code
  in SysUI just to pipe calls to the Shell.

  The controller implements the binder interface which is collected
  and exposed to Launcher when it binds to the overview  service
  and Launcher can call through the binders directly.

  Note: this requires the shared lib to also build with the Shell
  interfaces so changes to the Shell aidls will still require updating
  the shared lib (until the shared lib prebuilt can removed).

Bug: 180074017
Test: atest WMShellUnitTests
Test: Verify Pip calls from Launcher work
Change-Id: Id74114da6a6a73d32c957f84fce5bbe23e87ba01
2021-03-18 20:04:49 +00:00
Matt Casey
0defed2f0d Merge "Properly handle empty response rect in ScrollCaptureController" into sc-dev 2021-03-18 18:25:07 +00:00
Dave Mankoff
0f06e1069a Merge "Add more logging for falsing." into sc-dev 2021-03-18 18:05:57 +00:00
Jamie Garside
c5b1339d29 Merge "Make KeyguardBouncer react to device config changes." into sc-dev 2021-03-18 17:23:22 +00:00
Alex Florescu
85789d59d1 Merge "Cache value of shouldUseSplitNotificationShade" into sc-dev 2021-03-18 17:02:46 +00:00
Shan Huang
3a13219bac Add the charging ripple effect, currently guarded by flag_charging_ripple.
The effect is drawn in a full screen view in StatusBar, using a shader adapted from graphics/java/android/graphics/drawable/RippleShader.java. It plays whenever a phone is plugged in and wired charging begins.

Next steps:
- Add distortion effect to the first half of the animation.
- More API to support the UDFPS reveal effect.

Videos: https://drive.google.com/drive/folders/1c_QduSrELp4-Y4oJdHIllnypQkguDd-x?usp=sharing

Test: atest SystemUITests
Test: Manually
Bug: 182719493

Change-Id: If8885022a906f617332ca21132c3194ab26c09a4
2021-03-19 00:43:11 +08:00
Michel Comin Escude
34c1dd4508 Merge "Added exposure effect on ImageWallpaper" into sc-dev 2021-03-18 16:23:42 +00:00
Anna Zappone
11b1d1259f Merge "Open bubble on Tile click" into sc-dev 2021-03-18 14:41:04 +00:00
Flavio Fiszman
4d37598cbc Merge "Prompt People tile on marking as priority" into sc-dev 2021-03-18 14:22:15 +00:00
Alex Florescu
31eaa2c20a Cache value of shouldUseSplitNotificationShade
This only changes when the flag value changes (which can happen at any
time, but is strictly for development so we can ignore) or the value of
the boolean resource changes, which only happens on configuration
changed. Instead of checking every time, we can cache the last known
value and update on configuration changes.

Bug: 182254944
Test: manual + atest SystemUITests
Change-Id: Iae54b7680ebfc84c48139bd21e3c7670739802a5
2021-03-18 13:40:51 +00:00