Commit Graph

26 Commits

Author SHA1 Message Date
Andy Wickham
46ad0118cb Removes System UI plugin for BC Smartspace.
Uses BcSmartspaceDataProvider directly instead.

Bug: 185416581
Test: Manual and with updated unit tests
Change-Id: I42049c037e95a6c544dc8e841890f8d1981c124a
2021-04-15 07:34:30 +00:00
Matt Pietal
a76c5b2bed Smartspace - Allow primary card colors to be updated
This is largely for both AOD and lockscreen, while may have different
colors than launcher. Particularly for AOD, we need to transition to a
WHITE color. Set a primary text color, with expectations that a
secondary color will later be set in order to support cards with
various background colors.

Fixes: 185211979
Test: manual, change to AOD <-> LS
Change-Id: I36fb8e5cfcbac1ec999b2b9df08f42d47507990f
2021-04-14 09:45:39 -04:00
Matt Pietal
7994f8159a Smartspace - Align large clock
The large clock was not properly set below the new smartspace when the
plugin was activiated. Fix that.

Fixes: 185226009
Test: atest KeyguardClockSwitchControllerTest
Change-Id: Ib9c1f837128524b8a896ed12eee7b70cc145ec28
2021-04-13 19:40:57 -04:00
Shan Huang
e0362426eb Animate LockScreen and AOD clock text for charging events
Test: Manual
Bug: 182719493

Change-Id: I57f7cd834a08d8846a35cdf731611fc7a239b85a
2021-04-12 21:23:26 +08:00
Matt Pietal
b41253b7da Update to latest UX margins for clock... and much more
Remove old style clocks and all related code. Begin unraveling code
supporting multiple layouts. Migrate plugin small/big clock support to
the new clock areas.

Fixes: 184073275
Test: atest KeyguardClockSwitchTest KeyguardClockSwitchControllerTest
Change-Id: I38dc2a6df6a710c6da23cbb17fac8d28f3b84764
2021-04-12 06:48:48 -04:00
Matt Pietal
d4420de0cd Revert^4 "Enable smartspace"
20744ed3b4

Change-Id: I1eba412c6cb31684760af068b86a602cf6a53578
2021-04-10 06:51:42 -04:00
Matt Pietal
20744ed3b4 Revert^3 "Enable smartspace"
3b67a00d95

Change-Id: I4711f24b1ed3535dbf40ffd6ab893e6cd661fe49
2021-04-08 18:16:22 -07:00
Matt Pietal
3b67a00d95 Revert^2 "Enable smartspace"
Address issue with component init and tests

Bug: 184642387
Test: com.android.devicehealthchecks.SystemAppCheck

Change-Id: I51ad3fb2e9df47a8f426a356fc34c8499b94892f
2021-04-07 09:13:09 -04:00
Ulyana Trafimovich
a4fc6da238 Revert "Enable smartspace"
Revert "Enable smartspace"

Revert submission 13984710-smartspace_ls

Reason for revert: Broken test: com.android.devicehealthchecks.SystemAppCheck#system_app_crash on git_master on redfin-userdebug at 7262114

Reverted Changes:
I77a4ef72c:Enable smartspace
I77a4ef72c:Enable smartspace

Bug: 184642387
Change-Id: I299bef5e730c632803c56cf0f1cd858caac4e49f
Test: forrest run for the broken test
2021-04-06 16:34:41 +00:00
Matt Pietal
37d3636c37 Enable smartspace
Allow KeyguardSliceProvider to be replaced by content coming from the
BcSmartspaceDataPlugin, only when the plugin is enabled.

Bug: 172360102
Test: manual
Change-Id: I77a4ef72c7131f955fe37763e02542726c36927b
2021-04-05 20:47:51 -04:00
Matt Pietal
9cc2bce012 AOD/LS - Move clock to start
Move clock to the start, and move smartspace content below
it. Recalibrate burn-in and fully support RTL layouts. Remove extra
top margins.

Bug: 172360102
Test: manual
Change-Id: I2dc4300106c63095ae41f9407b2fe4c053017573
2021-02-19 08:16:25 -05:00
Beverly
f046e8ddd7 Update LS/AOD clock
- only use one paint for hours and minutes
- customize vertical line spacing for Burmese numerals to account for
long ascenders and descenders

Note: Burmese numerals sometimes get cutoff at the bottom, bug filed at
b/179815528

Test: manual
Fixes: 177206446
Bug: 179781576
Change-Id: Iac71eabdcf1ed06962f38414253a2038651168c7
2021-02-09 17:29:14 -05:00
Matt Pietal
17a635e514 AOD/LS - Large clock animations
Match latest specs for large/small clock transitions, including a fade
and y-axis shift.

Bug: 172360102
Test: manual, show/hide all notifications
Change-Id: I8d756bfbc524481d7b8835946acf05aa4893a1d5
2020-12-17 08:54:14 -05:00
Beverly
e1b6d7f819 Update AOD/LS clock
- Update clock sizes (large clock = 200dp, small clock = 100dp)
- Update clock weights (large = 100-400, small = 200-300)
- Update clocks on time zone and time format changes
	(Settings > System > Date & Time)

Test: manual, atest SystemUITests
Bug: 170228350
Change-Id: I446a2625fdd776c15e744f1601b3ea0e2a873cf1
2020-12-03 14:09:35 +00:00
Matt Pietal
60028e89fc AOD - Scale large clock for burn-in protection
Scale the AOD large clock between [0.8, 1.0] in both x,y directions,
in order to keep the clock centered. The large clock will still be
shifted on the y-axis as well.

Bug: 13129102
Test: manual, burn in tests
Change-Id: I86235d39b199a1a10cfb40e474f1e1e58b9c11d8
2020-12-01 11:00:58 -05:00
Matt Pietal
217dba4c10 AOD - Large clock
Support large clock when no notifications are present. Remove
immediately when a HUN appears.

Bug: 172360102
Test: manual
Change-Id: I7ed4689b4d1d4176e0a4a29fc61150905037f484
2020-11-19 14:41:42 -05:00
Beverly
741c6e367d Update spacing/layout of LS clock
- Only use the burn-in offsets on AOD. This means the clock will be in a
different position on LS compared to AOD.
- Align the top of the KeyguardSliceView (smart space) with the top of
the text of the clock (as opposed dto the top of the clock's view)
- Decrease bottom padding on KeyguardSliceTextView so that the DND icon
doesn't get cutoff when there's a large smart space info

Test: atest SystemUITests, manual
Bug: 170228350
Change-Id: I332300616e4218b6fcd24f837127a7eee487d4e7
2020-11-17 19:32:00 +00:00
Beverly
192b7c9eaa Add support for LS Clock to use > 1 Paint object
Updated TextInterpolator and TextAnimator to support a
Paint object for each line of text. Now we can interpolate between
the colors when animating.

Clock colors are now based on the theme (for now, wallpaper text
color). ie: first line (of vertical clock) is one color, second line is
another color.

Also adjusted Keyguard clock logic to animate on doze changes instead of
animating incrementally on setDarkAmount.

Test: atest TextInterpolatorTest TextAnimatorTest
Bug: 170228350
Change-Id: Ia62f2de48534be2007afc5a95eac46b3c44ec880
2020-11-17 14:20:02 -05:00
Matt Pietal
6a350b53cf AOD - Burn in adjustments
Move both the clock and keyguard slice area towards the middle for x
adjustments, and retain the current Y adjustments.

Bug: 172360102
Test: follow burn in instructions here:
/frameworks/base/packages/SystemUI/docs/clock-plugins.md

Change-Id: Id22d777724bf9be58758b1a2b260a7933af8e999
2020-11-04 09:12:50 -05:00
TreeHugger Robot
f4f55f6c3b Merge "Uncenter aod icons for new lockscreen" 2020-10-23 20:27:57 +00:00
Beverly
0d1743124d Uncenter aod icons for new lockscreen
Also moves setup of aod icons to KeyguardStatusViewController
instead of through Status Bar => NotificationPanelViewController.

To enable the new lockscreen (value = 0 is disabled, value = 1 is enabled):
    adb shell settings put global show_new_lockscreen <value>

Test: atest NotificationIconControllerTest
Test: atest SystemUITests
Bug: 170228350
Change-Id: I93d19823620051e969e8790c8946bdc15a5ab379
2020-10-23 14:25:59 -04:00
Dave Mankoff
a2d4ed196c Change ViewController#initInternal to #onInit
Bug: 171472009
Test: manual
Change-Id: Iddc6c0240486b0d3005216bba0c40bfb481b94b3
2020-10-23 09:14:58 -04:00
Dave Mankoff
dd1341ec62 Add initInternal to ViewController.
ViewController's init method was not ideal to override. On the one hand,
if you put a call super.init() first your onViewAttach method is called
before you're subclass's init.

Further, if you put your own code befer super.init(), you are still left
with the problem that your init is not automatically idempotent, and
multiple calls to #init() could result in multiple executions of your
code unless you handle it yourself.

With this change, #initInternal() is introduced, giving ViewControllers
a place to put their run-once code such that it runs before any
view-attachment callbacks are fired.

Fixes: 171472009
Test: manual
Change-Id: I2e284024c82e3f7c7b6f29f22a1ffa3c8aae9fcb
2020-10-22 10:49:13 -04:00
Beverly
a086c40910 Add KeyguardStatusViewController
Refactor KeyguardStatusView so that it has a controller that
NotificationPanelViewController can use to manipulate the view. This
CL untangles some of the logic in KeyguardStatusView that should be in
KeyguardClockSwitchController.

No functionality changes.

Test: atest KeyguardClockSwitchControllerTest
Test: atest NotificationPanelViewTest
Test: atest KeyguardStatusViewControllerTest
Test: atest SystemUITests
Change-Id: I52d0d887cb4ce734ec265b6357644ba1d1368460
Bug: 170228350
2020-10-16 09:31:18 -04:00
Dave Mankoff
cd42c08702 Add KeyguardSliceViewController.
This removes view injection from KeyguardSliceView.

It also creates a KeyguardStatusView Dagger Subcomponent should be
initilialized whenever a KeyguardStatusView is inflated. From that
subcomponent, KeyguardClockSwitchController and
KeyguardSliceViewController can both be created and initialized,
passing their related views into their constructor.

This fixes a bug introduced earlier where a
KeyguardClockSwitchController was not being created in one place
where it was needed.

Bug: 162525274
Test: atest SystemUITests
Change-Id: Ie571cb0ca2b793c363e3c8ab397828f0ee939763
2020-08-24 12:57:19 -04:00
Dave Mankoff
9705b01b4d Remove View Injection from KeyguardClockSwitch.
Adds a controller for the KeyguardClockSwitch, and
moves some of its logic over.

Fixes: 162500959
Test: atest SystemUITests
Change-Id: Ib606ec727e5d005a0668a96dc823a7d1d1a53c79
2020-07-30 16:33:05 -04:00