Commit Graph

34 Commits

Author SHA1 Message Date
TreeHugger Robot
4def911641 Merge "Migrate KeyguardClockSwitch to dagger." 2019-03-22 22:09:31 +00:00
Robert Snoeberger
be35b76a9a Migrate KeyguardClockSwitch to dagger.
Bug: 122448325
Test: atest KeyguardClockSwitchTest
Change-Id: I1e68e3ba0cc92cd4fda9597d2c9c296b80298dc7
2019-03-22 14:33:24 -04:00
TreeHugger Robot
94eb144f77 Merge "Call ClockPlugin#onTimeTick on lock screen" 2019-03-22 16:09:30 +00:00
Robert Snoeberger
ae926733b6 Call ClockPlugin#onTimeTick on lock screen
Fixes: 129056419
Test: atest frameworks/base/packages/SystemUI/tests/src/com/android/keyguard/
Change-Id: If4cabc696a0ac5a02514634aa7670ef1f9db4b72
2019-03-21 11:40:16 -04:00
Robert Snoeberger
98312398ea Prevent, again, custom clock view from being visible on Home screen.
Bug: 124133570
Test: manual testing, and created b/128691778 to add regression tests.
Change-Id: I00dcb8b2a8acf6adfbcc77a1e6987824027d300c
2019-03-18 16:33:19 -04:00
TreeHugger Robot
47bfb774af Merge "Fix issue where clock scale would be wrong" 2019-03-05 04:31:23 +00:00
Lucas Dupin
4349952a3c Fix issue where clock scale would be wrong
Fixes: 127345346
Test: manual
Test: adb shell dumpsys activity service com.android.systemui
Change-Id: Icfd7b659e8ee1b088fbca5bd9c4a7d99c1e2b6d9
2019-03-04 16:50:41 -08:00
Robert Snoeberger
d747025c74 Fixes IllegalStateException caused by child already having parent
Detaches custom clock during onDetachFromWindow. This removes the
custom clock view from the keyguard during configuration changes.

The root cause for this issue is that the clock plugins remain in
memory after ag/6576777. There needs to be a way to communicate
to the clock plugin that it is done being used (something like
an onDestroyViews method). I'm leaving this work for a follow up
change.

Fixes: 127289716
Test: IllegalStateException not seen in logcat when performing repro
steps.

Change-Id: I184c52b25cb61325a920067dfc415b163f6a6b6d
2019-03-04 16:05:36 -05:00
Robert Snoeberger
9ad03f4ed0 Show installed clock plugins in picker app.
Added methods to ClockPlugin to provide information to picker app.
Due to this change, I bumped the api number of the ClockPlugin
interface.

Bug: 125370285
Test: atest ClockManagerTest
Test: checked clock from plugin apk appears in picker app
Change-Id: I0dc3d5a450f7d352900b077b28c670ebadb874e7
2019-02-28 15:12:00 -05:00
Lucas Dupin
e570af67de Restore keyguard status area header
Fixes: 123340905
Fixes: 123958307
Test: atest KeyguardSliceViewTest
Test: manual, playing media
This reverts commit ed00262486.

Change-Id: I1cc60346f9176b913ee0404b2b31981f736664ce
2019-02-12 15:21:24 -08:00
Robert Snoeberger
a1df7fb8f3 Prevent, again, custom clock view from being visible on Home screen.
Bug: 124133570
Test: Added to KeyguardClockSwitchTest.
Change-Id: Id697fc8d25de2842c06d777047ce627a8b7793eb
2019-02-11 14:11:30 -05:00
Lucas Dupin
de86b3754b Merge "Apply colors extracted from wallpaper to clock faces." 2019-02-10 18:12:46 +00:00
Robert Snoeberger
0397c843a3 Apply colors extracted from wallpaper to clock faces.
Bug: 122301289
Test: Looked at clock faces with various wallpapers.
Change-Id: I5c0bda2fa1f3da783315a10e1c2f8047d63e1e6d
2019-02-07 15:12:00 -05:00
Beverly
8fdb533e08 Make StatusBarStateController available to plugins
Test: atest SystemUITests
Bug: 115322193
Change-Id: I46e4b23c9839720a3eb10e381d7aaf79a74c6b33
2019-02-07 14:44:54 -05:00
Robert Snoeberger
15b4af1943 Move plugin and settings logic out of KeyguardClockSwitch.
This is in preparation for adding more logic related to docked state.

Bug: 122301289
Test: Used adb to switch between custom clock faces.
Change-Id: I0a13ef4e5894df1280a04c5a9df8bbed8054557b
2019-01-22 11:32:40 -05:00
TreeHugger Robot
be35c16844 Merge "Add custom typographic clock face." 2019-01-18 00:52:29 +00:00
Robert Snoeberger
ce8c204eac Add custom typographic clock face.
Bug: 122301289
Test: Used adb to enable clock face.
Change-Id: I052367c9671697f621cba4ecb7e6b21c0cec784c
2019-01-17 14:27:37 -05:00
Robert Snoeberger
7a529440c4 Simplify KeyguardClockSwitch 1/N.
End goal is to move clock switching logic out of this view class.
To do that, first need to make this class look less like a TextClock.

Bug: 122301289
Test: keyguard tests pass
Change-Id: Iccd7b0d02d1ec756d4e37f3d4ab47d0bcb55e566
2019-01-16 16:39:59 -05:00
TreeHugger Robot
b1c41456a5 Merge "Add custom stretch clock face." 2019-01-16 15:33:32 +00:00
Robert Snoeberger
496916b12f Add custom stretch clock face.
Bug: 122301289
Test: Used adb to set secure setting for this clock.
Change-Id: I6a55e991dca47be302de43e5da74671843925427
2019-01-16 09:09:56 -05:00
TreeHugger Robot
a9f50e954d Merge "Add custom bubble clock face." 2019-01-15 21:51:35 +00:00
Robert Snoeberger
046ee9ceca Add custom bubble clock face.
Bug: 122301289
Test: Using adb to set the settings value switches to bubble clock.
Change-Id: I9b5ab62796204cfdce7b9beb147f34f80b0db167
2019-01-15 13:03:26 -05:00
Lucas Dupin
7fc9dc16c2 AOD notification icons placement
Whenever there's a custom clock, notification icons should be on the top
left. The default clock will just show the dark shelf.

Test: atest NotificationStackScrollLayoutTest
Test: atest CollapsedStatusBarFragmentTest
Test: visual - with and w/o clock plugin
Test: visual - with and w/o RTL layout
Bug: 122301289
Bug: 111405682
Fixes: 120563185
Change-Id: I4c513d347f656262ee6f91bd208ab9f219e4419c
2019-01-12 04:57:20 +00:00
Robert Snoeberger
58f2315865 Initialize dark amount when a new plugin is connected.
Bug: 119756967
Test: Added test to KeyguardClockSwitchTest.
Change-Id: I716a92f72afcfb51bea80757eedc8797364b95c7
2019-01-10 15:51:32 -05:00
Robert Snoeberger
8bf1a3c125 Move to Extension for handling plugins plus default.
Bug: 118761043
Test: KeyguardClockSwitchTest adapted and passes.
Change-Id: I747274af894845a867b0d1ca38b2fd3338798e01
2019-01-10 13:44:00 -05:00
Robert Snoeberger
60854080d3 Fix custom clock face showing up outside of lock screen.
Bug: 122349591
Test: Added tests to KeyguardClockSwitchTest
Change-Id: Ie5f39ab598e993759ec628a071af81a52629a574
2019-01-04 13:19:53 -05:00
Robert Snoeberger
6a0140ab95 Add container for big clock behind NSSL and KeyguardStatusView.
Bug: 120497585
Test: Added tests to KeyguardClockSwitchTest, pass locally.
Change-Id: Icc1199a67b9a4728e4d0f0b50ea98f5221de904d
2018-12-20 13:20:39 -05:00
Robert Snoeberger
e3b3e783b1 Add option for plugins to hide KeyguardSliceView.
Option defaults to showing the slice view so that it doesn't break
existing plugins.

Test: SystemUIGoogleTests pass.
Test: SystemUITests pass.
Test: slice view is hidden when using example plugin.
Bug: 118496011
Change-Id: I574009170da4703e84fd392e327e1cb84ada6cd0
2018-12-18 10:38:23 -05:00
Robert Snoeberger
9c1074fbaa Send time zone changed event to clock plugin.
This prevents plugins from needing to register for time zone
changed broadcasts. The event can be relayed from
KeyguardUpdateMonitor.

Bug: 120666411
Test: example plugin updates when time zone is changed
Change-Id: I84732887527db8575504af27cc8ed537118696c6
2018-12-10 09:33:38 -05:00
Robert Snoeberger
e32efd76af Add setDarkAmount method to ClockPlugin interface.
setDarmAmount implementations provided by clock plugins
should use the dark amount to transition into and out
of the doze state on AOD. For example, the size of the
clock could shrink in the Y direction when leaving doze
to make room for the notification stack scroller.

Bug: 119035943
Test: KeyguardClockSwitchTest passes locally.
Change-Id: I9968dc2cc5ab8000ff525f3d1d06ffbf73359086
2018-11-12 09:29:59 -05:00
Robert Snoeberger
ffbe315d43 Add dozeTimeTick method to ClockPlugin interface.
dozeTimeTick implementations provided by clock plugins
should update the time of the clock while the device
is dozing and deal with burn-in related issues.

Bug: 119035943
Test: KeyguardClockSwitchTest passes locally.
Test: Custom clock updates with time on AOD screen.
Change-Id: I5c31e6d856c5a80dc3e501831dda5a62c0be5ba0
2018-11-09 14:21:11 +00:00
Robert Snoeberger
33ce6d97fd Remove view from existing clock plugin when new plugin connects.
Assuming that the most recently connected plugin is the active
clock face. This should be updated when it is possible for
the user to select a clock face.

Bug: 118440898
Test: Added tests to KeyguardClockSwitchTest.
Change-Id: I1c38005b4d7d32a27a8d41806390338ebcab458b
2018-10-30 11:29:14 -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
Kunhung Li
29007e6d69 Add clock plugin function
Use clock plugin interface to replace current TextClock in keyguard

Bug: 111971817
Test: atest SystemUITests
Change-Id: Ib6920844700445d9cd3ffa4159cd7f630eaa853b
2018-08-09 18:12:17 +08:00