Commit Graph

37677 Commits

Author SHA1 Message Date
Dave Mankoff
1063eccd69 Merge changes from topic "b141882822-sb-dependency-get"
* changes:
  Inject a time-tick handler.
  Inject DarkIconDispatcher into StatusBar
  Replace Dependency.get() calls with existing member variables.
2019-12-26 19:04:52 +00:00
TreeHugger Robot
60e15a453a Merge "Consolidate Divider Provider" 2019-12-26 18:27:38 +00:00
TreeHugger Robot
a99a969282 Merge changes Ib03aafe9,Ia51a6db6
* changes:
  Abstract content binding into an interface
  Move control logic out of NotificationContentInflater
2019-12-23 22:54:55 +00:00
Dave Mankoff
36403e79d3 Inject a time-tick handler.
Bug: 141882822
Test: atest SystemUITests
Change-Id: I5b01cab803bc58362c22270069200bf7722b4c17
2019-12-23 17:48:21 -05:00
Dave Mankoff
a0da22d0df Inject DarkIconDispatcher into StatusBar
Bug: 141882822
Test: atest SystemUITests
Change-Id: I35427de4bd19b1694a32f95f76bcb71dda349eea
2019-12-23 17:40:30 -05:00
Dave Mankoff
e11ebed031 Replace Dependency.get() calls with existing member variables.
(Very low hanging fruit.)

Bug: 141882822
Test: atest SystemUITests.
Change-Id: I962620261952da37bbc093f44edd4f920c34d2cd
2019-12-23 17:40:28 -05:00
Kevin Han
ec09309521 Abstract content binding into an interface
Introduce NotificationRowContentBinder interface which adds a layer of
abstraction for the underlying binding implementation. Any implementing
class is basically responsible for taking in certain bind parameters and
binding the appropriate content views. This allows us to more easily
shift out the underlying implementation (i.e. whether its asynchronous
or not, whether we use remote views or not).

Currently, NotificationContentInflater concretely implements this by
creating and using the remote views provided in the notification and
asynchronously inflating/applying it.

Bug: 145749521
Test: atest SystemUITests
Change-Id: Ib03aafe9b4322f0625a4a2d5403423a93ea0d9dc
2019-12-23 11:43:53 -08:00
Kevin Han
ce7451cdf3 Move control logic out of NotificationContentInflater
NotificationContentInflater's sole responsibility should be to provide
an API to inflate views based off the inflation parameters set on it.
Currently, this is violated by several setters that automatically
trigger inflations and its secondary role as the inflation flag source
of truth. This blurs the class's responsibility and makes it harder to
use, so we move it out.

Right now, most of this control logic simply went one level up to
ExpandableNotificationRow which realistically also isn't where it should
be ultimately. However, this is the most reasonable place for it to live
in the interim while we slowly migrate inflation/bind logic out of
ExpandableNotificaitonRow piece by piece.

Bug: 145749521
Test: atest SystemUITests
Test: smoke test
Change-Id: Ia51a6db667f0aca5b410ab7f769d061f8e9a617e
2019-12-23 11:43:36 -08:00
Dave Mankoff
71fca1a856 Remove Dependency.get(InitController.class)
Bug: 141882822
Test: atest SystemUITests
Change-Id: I3a7fbee69b08abffefc56b722c1753cb733eb528
2019-12-23 13:04:04 -05:00
Dave Mankoff
b1575f6a52 Merge "Start removing Dependency.get(UiOffloadThread.class)" 2019-12-23 17:58:57 +00:00
TreeHugger Robot
56af3e7f74 Merge "Simplify SystemClock and FakeSystemClock" 2019-12-23 17:53:23 +00:00
Dave Mankoff
c7cf9fc1de Start removing Dependency.get(UiOffloadThread.class)
This actually begins the process of deprecation and removing
UiOffloadThread in favor of using Executors directly.

This CL hits the easiest spots in the code. There are a few
more remaining calls that should be in their own independent CLs.

Bug: 146567476
Test: atest SystemUITests
Change-Id: I2542cc61653f330a1931b15a57e3b7c77d18e2e6
2019-12-23 09:35:44 -05:00
Winson Chung
e0ef4d9196 Merge "Create initial shell package" 2019-12-20 23:22:10 +00:00
Evan Rosky
cf05fd9dba Consolidate Divider Provider
Bug: 146670576
Test: builds/runs
Change-Id: Ib5ca2cb73d7e453940fb2e07dd7a6dcfa12c00ce
2019-12-20 14:10:48 -08:00
Winson Chung
10a9b4b74d Create initial shell package
- It does nothing

Bug: 146497807
Test: atest WindowManagerShellTests
Test: SystemUI builds
Change-Id: Ieda77ffdc6a6bed88e55e195a2d9f147e5d4d458
2019-12-20 21:41:11 +00:00
Dave Mankoff
00e8a2fa8d Conslidate @MainHandler and similar to @Main (and similar).
@MainHandler, @MainLooper, @MainResources -> @Main
@BgHandler, @BgLooper -> @Background.

Also, move the providers for Handlers and Loopers into the
ConcurrencyModule.

Bug: 146510722
Test: atest SystemUITests
Change-Id: I991735e1fdca397784427409a2ae696a7374f584
2019-12-20 16:35:42 -05:00
Ned Burns
582ee23ccb Simplify SystemClock and FakeSystemClock
- Remove hidden methods from SystemClock (we shouldn't be using them
anyway).
- Change FakeSystemClock to keep all of its members consistent with one
another.
- Change FakeSystemClock to only be able to move forward in time
- Simplify listener interface for FakeSystemClock

Test: atest
Change-Id: Idd42c03a3f7b992a4c1b4a626f3ad66f457e2d89
2019-12-20 15:57:00 -05:00
Evan Rosky
ac8356bdc2 Merge "Don't monitor private displays" 2019-12-20 18:30:24 +00:00
Winson Chung
afbe32079a Merge "Clean up remote animation definitions when activity is destroyed" 2019-12-20 17:52:36 +00:00
Lucas Dupin
5465b18518 Merge "Enable WCG support for ImageWallpaper" 2019-12-20 17:28:49 +00:00
TreeHugger Robot
0ac9398709 Merge "Don't reanimate volume dialog dismissal" 2019-12-20 17:08:08 +00:00
Miranda Kephart
2f4f8ed4f1 Merge "Separate notifications from saving in background" 2019-12-20 16:14:46 +00:00
Beverly
62f9083012 Don't reanimate volume dialog dismissal
Test: manual
Fixes: 140014312
Change-Id: I7c5589155a3ac499feb980963287b3b54a9933db
2019-12-20 08:44:28 -05:00
Jacky Kao
df5a727aa1 Merge "Making magnified window move to top boundary of screen" 2019-12-20 02:41:41 +00:00
Evan Rosky
e577f78552 Don't monitor private displays
If there are displays marked private that belong to other
processes, it doesn't make sense for systemui to be aware of
them.

Bug: 146566787
Test: Multi-display CTS tests pass
Change-Id: I8f6c3e3159bb008ba451cd280ee379f313e0629a
2019-12-19 17:43:32 -08:00
Jacky Kao
15b5105416 Making magnified window move to top boundary of screen
Set the cutout mode of the magnified window to
LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES,
then this window is allowed to extend into the
cutout areas on the short edges of the screen.

Bug: 145252526
Test: manual test
Change-Id: I7952bd8e0069994d90d3ea207095c827c33c06be
2019-12-20 08:17:52 +08:00
Winson Chung
10fc25dadd Clean up remote animation definitions when activity is destroyed
- Remove the remote animation definition when the associated process dies
- Also expose method to unregister any registered animation defs

Bug: 139137636
Test: Kill launcher, ensure the remote animation ref is removed
Change-Id: Ia38d037397703221c17c8258ec1a245055d5896d
2019-12-19 15:01:50 -08:00
Hongwei Wang
41df8e465c Merge "Move rotation bounds calculation into SysUI" 2019-12-19 22:19:49 +00:00
Jayachandran Chinnakkannu
34824d8167 Merge "SytemUI: Remove usage of IccCardConstants hidden API" 2019-12-19 22:03:19 +00:00
TreeHugger Robot
4ce772dbcd Merge "Suppress unchecked cast warnings because they're upsetting mankoff@." 2019-12-19 21:13:05 +00:00
Josh Tsuji
5978f56db4 Merge "Fix occassional CME in physics tests." 2019-12-19 20:57:26 +00:00
Joshua Tsuji
ba5f0fe3d4 Fix occassional CME in physics tests.
Test: atest SystemUITests
Change-Id: I93748f7efa2dc4ea69854c17d62d048159a8b03d
2019-12-19 15:54:17 -05:00
Hongwei Wang
ebf1808abc Move rotation bounds calculation into SysUI
Also included in this CL
- Cleanup all bounds calculation in PinnedStackController
- Move PipSnapAlgorithm to SysUI

Bug: 139016833
Bug: 139016576
Bug: 145133340
Test: atest PinnedStackTests
Test: atest MultiDisplayActivityLaunchTest
Test: atest MultiDisplaySystemDecorationTests
Change-Id: Ifa0621a1cb69e76498e020aef7d8fa815df4ce48
2019-12-19 12:36:53 -08:00
Miranda Kephart
9bbecf3f16 Separate notifications from saving in background
Pulls screenshot notification management into its own class rather
than having notifications handled in SaveImageInBackgroundTask.
(Most of) the notifications code is no longer relevant for the new
corner flow.

Bug: 137153302
Test: manual -- no user-visible changes; tested that flow remains
the same in both old and new versions

Change-Id: I9cdf900f867776d97a339ea65f21e893efc4645e
2019-12-19 15:22:10 -05:00
Jayachandran C
0173df8a37 SytemUI: Remove usage of IccCardConstants hidden API
This CL uses alternate system API

Bug: 111498835
Test: Build
Change-Id: Id0b9b0bc5b26e696f84fdc87ac77c60d5ed6bb8f
2019-12-19 12:11:03 -08:00
Joshua Tsuji
569b5dc4c3 Suppress unchecked cast warnings because they're upsetting mankoff@.
Test: atest SystemUITests
Change-Id: I13a11a931e013f585f80057fea59b4d6ea531fe3
2019-12-19 14:15:05 -05:00
Josh Tsuji
c117d0ebb5 Merge "Decrease stiffness for one test to reduce flakes." 2019-12-19 19:10:19 +00:00
Joshua Tsuji
8972dd0b6e Decrease stiffness for one test to reduce flakes.
Test: atest SystemUITests
Change-Id: Id8a7ea26af7dfc0f15cf961cd734d15eec5453f0
2019-12-19 13:55:38 -05:00
Jayachandran Chinnakkannu
98a858fe51 Merge "Move emergency callback related intents to TelephonyManager" 2019-12-19 18:38:07 +00:00
Joshua Mccloskey
0cf243eafd Merge "Add builder method to check DevicePolicyManager" 2019-12-19 18:21:44 +00:00
Dave Mankoff
20cc19de8f Merge "Remove all Dependency.get(ActivityStarterDelegate.class) calls." 2019-12-19 17:39:09 +00:00
TreeHugger Robot
29ac92a2e8 Merge "Controls API - Adding service impl" 2019-12-19 16:53:14 +00:00
Dave Mankoff
d5cf4cf73f Remove all Dependency.get(ActivityStarterDelegate.class) calls.
It was only called in StatusBar so that StatusBar could pass itself in.
Instead, inject StatusBar directly (as an Optional).

If we ever want a different implementation, we can handle that in the
future, but right now, StatusBar was the only one ever set.

Bug: 141882822
Test: atest SystemUITests
Change-Id: Ia23b8f678ea2ac0eb4e8114f700bf703f48740e7
2019-12-19 11:11:51 -05:00
TreeHugger Robot
cbb570901c Merge "Change media projection permission dialog." 2019-12-19 12:38:27 +00:00
TreeHugger Robot
37555b1d3b Merge "Do not show Bluetooth icon when headset is not active" 2019-12-19 07:27:41 +00:00
Jayachandran C
142eae0776 Move emergency callback related intents to TelephonyManager
This CL also renames to have android.telephony prefix for
one of the intents used internally. Also suppresses the lint
errors for keeping android.intent.* which is needed for app
compatiblily as 3rd party may have hardcoded in their manifest.

Bug: 146240041
Test: Build
Change-Id: Ib3e786b73af614d5ef0d8cf3e5a6642273060f68
2019-12-18 19:17:39 -08:00
TreeHugger Robot
12eed538bd Merge "Set CarSysUI unprovisioned state depending on SUW progress." 2019-12-19 02:32:47 +00:00
TreeHugger Robot
a1d5731beb Merge "Move SystemUI to /system_ext" 2019-12-19 02:17:02 +00:00
TreeHugger Robot
712a45f03e Merge "FlingAnimationUtils now takes DisplayMetrics, not Context." 2019-12-19 02:13:36 +00:00
Abhijoy Saha
ee51369bda Set CarSysUI unprovisioned state depending on SUW progress.
Use a controller to monitor KEY_SETUP_WIZARD_IN_PROGRESS and USER_SETUP_COMPLETE
flags to know when to set CarSysUI bars in an unprovisioned state and prevent
interactions with notification shade.

Bug: 145616123
Test: Manual
Change-Id: Ie035f049e3e9e7cb411fc9553a20e4c09078c121
2019-12-18 16:21:55 -08:00