Commit Graph

3699 Commits

Author SHA1 Message Date
Julia Reynolds
bfcda41613 Merge "Addressing conversation info todos" 2020-01-17 17:12:37 +00:00
Julia Reynolds
4c1af24e7b Merge "Fix up bubble actions" 2020-01-17 15:21:46 +00:00
Julia Reynolds
7c267526a1 Addressing conversation info todos
- Linking the conversation notification to the newly created
channel and triggering a ranking update
- Incorporating the flag for whether notifications/channels with
invalid shortcut ids should be allowed

Test: atest
Bug: 137397357
Change-Id: Ice1d545f2405a6c9b9eefaf1fd5481622ad72d7b
2020-01-17 10:20:19 -05:00
TreeHugger Robot
13d3d686cf Merge "Add config for overlaying extra default QS tiles" 2020-01-17 15:09:01 +00:00
Julia Reynolds
c3e922b0d6 Fix up bubble actions
- Remove them from the non-conversation controls
- Make sure to turn on bubbles globally if a person
is bubbled

Test: atest
Bug: 137397357
Change-Id: I5ae102d739acf4d821af8380287cdf21bca7abd9
2020-01-17 09:42:46 -05:00
Fabian Kozynski
1c0e33b103 Add config for overlaying extra default QS tiles
The new config resource allows for an overlay to specify additional QS
Tiles. These tiles will be available on a fresh flash of the device, as
well as when the user resets the tiles in QSCustomizer.

If the tiles are custom tiles and the apk is not installedi or the
TileService is disabled, the tile will just be discarded.

Test: atest QSTileHostTest
Test: add the grayscale custom spec to the config value and check that
the tile appears on reset.
Bug: 147493661
Change-Id: Ifbb8cc8ac7ef16c4b67ebbc776703e9ac8208c43
2020-01-17 08:37:03 -05:00
Julia Reynolds
3bd8c209b1 Merge "Allow conversations to be demoted out of the conversation space" 2020-01-16 22:23:08 +00:00
Ned Burns
5a4ed4ccd8 Merge "Debounce GroupCoalescer instead of using single timeout" 2020-01-16 21:46:10 +00:00
TreeHugger Robot
8ee531e931 Merge "Switched out PhoneConstants.PhoneKey" 2020-01-16 20:41:53 +00:00
Julia Reynolds
dcd70d6ec6 Allow conversations to be demoted out of the conversation space
Also default the flag to allow more notifications into that
space to on.

Test: atest
Bug: 137397357
Change-Id: I225f462879bdb28411cc631a3e259b4c71ba7394
2020-01-16 14:39:46 -05:00
TreeHugger Robot
064c79eebb Merge "Remove some unused / deprecated code" 2020-01-16 13:25:08 +00:00
Automerger Merge Worker
2a7b367d06 Merge "Replace CONNECTIVITY_INTERNAL in SystemUI" am: 3950a24dca am: 8d82c3cbd9 am: 8e92458626
Change-Id: Id94e38dafad3dd6a5316c53ba357a8004a7d7b9e
2020-01-16 07:58:53 +00:00
Automerger Merge Worker
8e92458626 Merge "Replace CONNECTIVITY_INTERNAL in SystemUI" am: 3950a24dca am: 8d82c3cbd9
Change-Id: I0ef7475de6266ac7534e549a89a8418c8ea5bb3d
2020-01-16 07:47:01 +00:00
Paul Hu
3950a24dca Merge "Replace CONNECTIVITY_INTERNAL in SystemUI" 2020-01-16 07:23:17 +00:00
TreeHugger Robot
55a6d9a470 Merge "Rework Notification Sectioning" 2020-01-15 21:59:54 +00:00
Fabian Kozynski
d31226a0a6 Merge "Adding controllers for Controls" 2020-01-15 21:10:00 +00:00
TreeHugger Robot
14133799f6 Merge "Add ListBuilder and NotifCollection to dump" 2020-01-15 20:42:28 +00:00
Ned Burns
69485e3ca0 Debounce GroupCoalescer instead of using single timeout
Previously GroupCoalescer would delay all notifs in a group until some
max time limit had been reached. However, it can take a full group
upwards of 400ms to be delivered, but we don't want to delay ALL group
notifications by 400ms, because updates to individual children would
also have to wait that long.

Instead, switch to a debounce system where each time a grouped
notification is posted, it sets a timer for a relatively short amount of
time (~50ms). If another notification from the same group comes in, the
timer is reset. And there's still a max of 500ms for safety purposes.

This way, something that is truly a large group post can take up to
500ms by constantly resetting its timer, but a one-off group update can
take place almost immediately.

Test: atest SystemUITests:GroupCoalescerTest
Change-Id: I9808258069c00e7d994035edcfb154b93f75d15a
2020-01-15 15:37:07 -05:00
Daniel Bright
63514be238 Switched out PhoneConstants.PhoneKey
Test: FrameworksTelephonyTests TeleServiceTests TelephonyProviderTests
Bug: 147465477
Change-Id: I2e147c9dc4383f7979740f2fd3ded44cd7d060e4
2020-01-15 12:17:52 -08:00
Mady Mellor
881d2ec38a Remove some unused / deprecated code
Test: atest BubbleControllerTest
Change-Id: I5a5973e253799bb5ce089fd668aba9ef2c09890b
2020-01-15 11:29:31 -08:00
TreeHugger Robot
458fbcba7f Merge "Add conversation-centric inline controls" 2020-01-15 19:09:53 +00:00
Josh Tsuji
2ffa2788ce Merge changes I55b0db82,Ic3cea392
* changes:
  Adds 'flinging-then-springing' to the PhysicsAnimator.
  Fix isPropertyAnimating to include flings, and add tests.
2020-01-15 19:09:40 +00:00
Fabian Kozynski
f10b6ab522 Adding controllers for Controls
This CL adds the following controllers for dealing with Controls in
SystemUI:

* ControlsController - Handles favorites and communication with other
controllers
* ControlsBindingController - Handles binding to the different services
and comunication with them.
* ControlsProviderLifecycleManager - Handles binding with one service
and forwards API calls to it.
* ControlsListingController - Handles finding and listing apps that
satisfy the service requirement

Additionally, this CL adds first versions of the management screen to
add or remove favorites. These are persisted.

To enable:
* adb shell settings put secure systemui.controls_available 1
* restart

To launch management activity:
* Enable controls
* adb shell am start
com.android.systemui/.controls.management.ControlsProviderSelectorActivity

Missing from this CL:
* Multi user support
* Documentation in the controller classes
* Graceful rebinding
* Throttling of Binder calls
* Better dumps

Test: atest com.android.systemui.controls
Test: manual testing of favorite management activities
Bug: 147732882

Change-Id: Ib4932b7f8fd3f2e3ee0ef1c28ddda1bec66c41e4
2020-01-15 10:27:32 -05:00
Julia Reynolds
12ba4cf7a8 Add conversation-centric inline controls
Round one - needs polish, and actions may be added or removed
in the future, and demote isn't working yet.

Bug: 137397357
Test: atest
Change-Id: Ia52598bec58fc54b8bde29168cd419a24d1e4dab
2020-01-15 10:20:29 -05:00
Automerger Merge Worker
cc4a17a501 Merge "Replace usages of ServiceState#getDataNetworkType" am: 922ec35d28 am: 6875770a4e am: 3173e5db01
Change-Id: Ifefddf01b24283bdeca54a8cc9442f69b1949cb7
2020-01-15 04:46:46 +00:00
Automerger Merge Worker
3173e5db01 Merge "Replace usages of ServiceState#getDataNetworkType" am: 922ec35d28 am: 6875770a4e
Change-Id: Ibf29269e9e0514fe3604f6fa0a2056b0a44c211b
2020-01-15 04:28:09 +00:00
Treehugger Robot
922ec35d28 Merge "Replace usages of ServiceState#getDataNetworkType" 2020-01-15 04:05:36 +00:00
Beverly
4822097e1c Rework Notification Sectioning
To create a notification section:
- Override Coordinator#getSection to return your desired NotifSection
- Ensure your new section is added in the correct order to
NotifCoordinators.mOrderedSections

Test: atest SystemUiTests
Change-Id: Ia3f83f4b662cdfb198981e94fba67f97eab767b8
2020-01-14 16:23:36 -05:00
Daniel Bright
f16dc0708a Merge "Rewriting phone constants for mainline" 2020-01-14 21:14:35 +00:00
Joshua Tsuji
aaace7f27c Adds 'flinging-then-springing' to the PhysicsAnimator.
See http://go/physics-animator-design#heading=h.ib2uxhal5wrq and http://go/physics-animator-design#heading=h.fu8468xbcwxo

Test: atest SystemUITests
Change-Id: I55b0db822c9468de239dc5d2aa9fa080ad7131ab
2020-01-14 16:03:32 -05:00
Joshua Tsuji
bdb6b20a8a Fix isPropertyAnimating to include flings, and add tests.
Test: atest SystemUITests
Change-Id: Ic3cea392d1da6a7cbe2e2131f488f07196c22290
2020-01-14 16:03:32 -05:00
Beverly
b6f4dc2245 Add ListBuilder and NotifCollection to dump
For easier debugging

Test: atest SystemUiTests
Change-Id: I8af3065ef10230607b67f9605f3b73a871759c3a
2020-01-14 11:29:54 -05:00
Ned Burns
c0cd28332f Rename NotifListBuilderImpl and NewNotifPipeline
Minor cleanup to better reflect their reponsibilities:

NotifListBuilderImpl -> ShadeListBuilder
NewNotifPipeline -> NotifPipelineInitializer

Test: atest
Change-Id: Ib4cd5f06567129e5720fdcd17ef9a9bc0dcf577b
2020-01-13 22:35:22 -05:00
Daniel Bright
4bcbfce5fc Rewriting phone constants for mainline
* Exposing Emergency extra constants through TelephonyManager
* Always reading or writing PhoneConstants.SubscriptionKey
with SubscriptionManager.EXTRA_SUBSCRIPTION_KEY

Bug: 147465477
Test: FrameworksCoreTests, FrameworksServicesTest, CarrierTests
Change-Id: I84d6687ca6cab86c8c68dc2dd2679cfee0919c1e
2020-01-13 16:07:48 -08:00
Ned Burns
8172d3ab6e Unify pipeline under NotifPipeline wrapper
Hides NotifCollection and NotifListBuilder behind a unified API for
clients.

Test: atest
Change-Id: Ib03cf9fed198c93adaf81bff1967ac1ff607c177
2020-01-13 17:31:20 -05:00
Ned Burns
012048d04e Move various pipeline classes into packages
Keep the base statusbar.notification.collection package *only* for
classes that need to access package-private members of
NotificationEntry/GroupEntry/etc.

At some point, we should move NotifEntry et al into their own package
like "core" but that will involve a massive scary CL.

Test: atest
Change-Id: I10808f8ce6bd4ae4ce8c1ac194bde6b8a6fea758
2020-01-13 17:30:51 -05:00
Automerger Merge Worker
e7575f77ce Merge "mainline:Replace serviceState.getDataRegState and getVoiceRegState" am: a5dd35d6c0 am: 8ccf79a098
Change-Id: I70ed56af355b7bd18d31f053fe009727d15b69c8
2020-01-13 15:15:13 +00:00
Fabian Kozynski
ce03848dce Merge "Prevent sending early termination of appop use" 2020-01-13 14:52:36 +00:00
Kevin Han
5182c9f5d7 Move a bunch of row setters into an init method.
We have a bunch of setters for stuff that is only initialized once on a
row. So let's just go ahead and move these into an initialize method so
it's more readable and harder to mis-use.

There are a few others that are used in tests that should probably be
moved into this method or just moved out of ExpandableNotificationRow
entirely.

Test: builds
Test: atest SystemUITests
Change-Id: Ifa55ca19fa2fd1f2030caa0676e6aa3e1713f134
2020-01-10 15:24:14 -08:00
Kevin Han
0f98a6d114 Convert NotificationContentInflater to singleton
Convert NotificationContentInflater into a singleton since it has
almost no state, making it easier to inject and re-use.

Move the only per-row state it has, cached remote views, to a separate
class NotifRemoteViewCacheImpl that manages the lifetime of the cached
remote views based off the notification's lifecycle. This has the added
benefit of being re-usable for content recycling later on.

Bug: 145749521
Test: atest SystemUITests
Test: atest NotificationContentInflaterTest w/o @Suppress locally
Test: smoke test (add, remove, cancel, expand, groups, HUN)
Change-Id: I7c05b19a0e12bced02bfdaa21e0243f35d64029f
2020-01-10 15:18:37 -08:00
Dave Mankoff
869d1accbc Merge "Make NotificationRowBinder injectable." 2020-01-10 22:26:37 +00:00
Shuo Qian
2f1b6c4162 Merge "Make hidden API isDataCapable for Telephony" 2020-01-10 22:17:43 +00:00
Dave Mankoff
02dcaf5347 Make NotificationRowBinder injectable.
Part of prepatory work for changes coming to
ActivatableNotificationView.

Bug: 147245740
Test: atest SystemUITests
Change-Id: Id85767ab3365e0da659941f267b5d925d6da9dd9
2020-01-10 13:39:04 -05:00
Fabian Kozynski
34e85c9613 Prevent sending early termination of appop use
If a package starts a particular appop both as active and noted, once
one of them is finished (usually noted after 5s), a message will be sent
to callbacks indicating the end of the use. However, the app op may
still be active. This could result in the removal of indicators
prematurely from notifications.

This change prevents that from happening by checking if the app op is
still in use by that combination uid/package (either active or noted)
and not notifying listeners if that's the case.

Also removed user sensitive checks.

Test: atest AppOpsControllerTest
Test: use app from bug report. Observe that notification does not lose
the microphone indicator
Bug: 144092031
Change-Id: I180e7c257e6171e7686ba7eda9bf02249358ed00
2020-01-10 13:28:26 -05:00
Fabian Kozynski
c69089b8f7 Merge "BroadcastDispatcher can use Executors now" 2020-01-10 15:31:27 +00:00
TreeHugger Robot
78081b493e Merge "Move HighPriority variable out of Notif/ListEntry" 2020-01-10 13:43:36 +00:00
SongFerngWang
798d0baa26 mainline:Replace serviceState.getDataRegState and getVoiceRegState
Replace serviceState.getVoiceRegState with getState
Replace serviceState.getDataRegState with getDataRegistrationState

Bug: 146637978
Test: atest NetworkControllerBaseTest (PASS)
atest CarrierTextControllerTest (PASS)

Change-Id: I0cbdfd5d3de3a78326703ede1640f01430bae18a
Merged-In: I0cbdfd5d3de3a78326703ede1640f01430bae18a
2020-01-10 13:09:51 +08:00
Fabian Kozynski
5e92c6fd9f BroadcastDispatcher can use Executors now
registerReceiver takes an optional Executor parameter. The old
registerReceiver that takes a Handler has been renamed and @Deprecated

Test: SystemUITests
Change-Id: I43b97f720b2b153d1019ed3cf19e1533558e380f
2020-01-09 15:31:14 -05:00
Beverly
e558f1dd00 Move HighPriority variable out of Notif/ListEntry
Test: atest SystemUiTests
Change-Id: Id69301091fc74cf0ff7136f8ccd51901f6c8017f
2020-01-09 10:22:32 -05:00
Dan Sandler
dc4c1003a8 Revert "Convert NotificationContentInflater to singleton"
This reverts commit 8b6968328d.

Bug: 147407617
Change-Id: I6208344a26069239e47665710dd2fea93136ab95
2020-01-09 15:18:23 +00:00