Commit Graph

25 Commits

Author SHA1 Message Date
Sunny Shao
0a1f43a7c9 Merge "Add a dark theme slice" into qt-qpr1-dev am: 713143df37
am: e565a793be

Change-Id: I7b780475a3439d229a8b94e882372f7086bd02ed
2019-11-18 17:41:25 -08:00
Sunny Shao
abcbc79d7d Add a dark theme slice
Fixes: 142476879
Test: make RunSettingsGoogleRoboTests -j ROBOTEST_FILTER=com.android.settings.homepage.contextualcards.slices.DarkThemeSliceTest
Change-Id: I4865c3c4a807bc4ac96762a882b193a3e2595019
2019-11-15 13:41:49 +08:00
Joshua Mccloskey
c4f18bb77c Merge "Adding slice for Face Enrollment" into qt-r1-dev am: 35252d1b9f
am: ef3d1939c8

Change-Id: I3c3b28e6ac2e67a588f970d8eae706390f666bc1
2019-06-25 19:31:34 -07:00
joshmccloskey
6634c159fd Adding slice for Face Enrollment
Fixes: 134965754
Test: Verified slice appears when not enrolled.
Test: Verified slice does not appear when enrolled.
Test: Verified slice disappears after clicking on icon and going back
to settings page.
Change-Id: Id1c4458742ab622df8d5881e926fe54684b36843
2019-06-24 17:41:36 -07:00
Fan Zhang
ec81d6121e Override 2 getSliceUri() instance to return platform slice
Bug: 126222433
Test: robotest
Change-Id: I3f9c8202d9b75b24b80ebcf385abc95f8df851e2
2019-05-30 16:50:43 -07:00
Yi Jiang
7605494cc5 Adds contextual cards for screen attention in Settings Homepage
Bug: 128527964
Test: atest ContextualAdaptiveSleepSliceTest, maually verified.
Change-Id: Ifaea7d8d4391e91cf6cbde38a2506728f55913d8
2019-05-29 10:37:11 -07:00
Fan Zhang
7df6445c3e Clean up DND slice in search.
- Remove the controller in SoundSettings, just use the common one.
- Update a bunch of IDs so ZenModeSliceBuilder maps to the toggle
  button in zen_mode_settings.xml

This is needed so the slice intent (left target when shown in search)
is the same as what we index from search side. Previously the search
indexer is finding zen_mode from sound page but the slice itself is
reporting a deep link into zenModeSettings page.

Fixes: 130437726
Test: robotest

Change-Id: Ic41d2d93afa1f748e3282e23010199a0fa078645
2019-04-12 16:11:31 -07:00
Stanley Wang
bae490bc85 DND should be displayed on search as slice.
Add ZenModeSoundSettingsPreferenceController extends ZenModePreferenceController,
and update availability status to AVAILABLE.

This is cherry-picked from ag/6897872

Change-Id: I8dcb6808cc21c4f5c06548a363c998e369646487
Bug: 129320642
Test: manual & robotests
2019-04-05 02:53:04 +00:00
Yanting Yang
aed7ad5a43 Improve notification slice string on home page
Add ContextualNotificationChannelSlice to show more clear sub title on
notification slice.

Fixes: 128641319
Test: visual, robotests
Change-Id: I650102f4cde7d8d397c7a501ba9ee76c401ba9db
2019-03-20 22:25:59 +08:00
TreeHugger Robot
6ce76c0035 Merge "Sound + Output Switcher on Volume Slice" 2019-03-19 22:49:04 +00:00
hughchen
6feb55546d Sound + Output Switcher on Volume Slice
- Show "play media to" item when Previously Connected device is available
- Click "Play media to" to launch output slice
- Update test case

Bug: 127729340
Test: make -j50 RunSettingsRoboTests
Change-Id: Ic00b309f87bc16f540b22b5a43fecb86f76caeb2
2019-03-16 07:04:43 +08:00
TreeHugger Robot
a63fd33c0b Merge "Tie ContextualWifiSlice to UI instead of garbage collector" 2019-03-15 21:41:29 +00:00
hughchen
9e78737483 Remove parameter from uri when get slice
Slice may added parameter in their uri.
When get slice through uri, removed parameter from uri to get correct slice.

Bug: 128651940
Test: make -j42 RunSettingsRoboTests
Change-Id: Id3cb7b91026384ce4e22c157a2908a5e18bc7993
2019-03-15 15:14:16 +08:00
Fan Zhang
4cb2727989 Tie ContextualWifiSlice to UI instead of garbage collector
- Introduce a static long in SliceFeatureProvider that updates once
  every "session". A session is when user is in an UI (screen rotation,
  going to subpage, etc does not break the continuation of session).

- Use session token in ContextualWifiSlice to determine when to refresh,
  instead of relying on WeakHashMap from CustomSliceManager.
  WeakHashMap can be cleaned up at any time by gc so it doesn't match
  what we want on the UI.

- Also as a side fix, merged CustomSliceManager into
  SliceFeatureProvider.

Fixes: 123937830
Test: robo
Change-Id: I199bceceb208b99a32f3f08e624787b5a03e73a9
2019-03-14 14:45:59 -07:00
Fan Zhang
2fe7e9fc45 Refactor CustomSliceManager.
- Make everything that can be static, static.
- Also removed a unused slice for battery info.

Next step - going to make CustomSliceManager into a regular class
instead of getting it from FeatureProvider. This way it's no longer an
application level singleton, then we can do things like attaching
lifecycle to it. It will be easier to deal with "session" based use case
after the refactor

Bug: 123937830
Test: manual
Change-Id: I384761a6894fa907f72a3610437835c4dd4d1944
2019-03-12 16:42:12 -07:00
jackqdyulei
dd00274967 Add SliceWorker for remote volume controller
Also update some methods to fix issues in panel.

Bug: 126199571
Test: RunSettingsRoboTests
Change-Id: I9b93ae594d41cb71b984b06267161455373bf121
2019-03-06 11:31:40 -08:00
Matthew Fritze
1138218abe Create special case mobile data slice
Build the special case mobile data slice for general use,
and for the Internet Connectivity Panel. The Slice controls
the default data subscription, and links to the subscriptions
page.

Bug: 117804089
Fixse: 119411534
Test: robotests & test app.

Change-Id: I31b524a8fe3182a244d940848090e97250632f39
2019-02-08 13:13:28 -08:00
hughchen
2177813531 Add entry point to launch media output slice
Add media output panel type to launch media output slice.

Bug: 121083246
Test: make -j RunSettingsRoboTests
Change-Id: Ibf706146430e309fef6cbf0e1e86c2d5b78b50d5
2019-01-28 12:02:08 +08:00
Matthew Fritze
3f743aecb4 Add NFC Panel
NFC Panel only shows the NFC setting slice, for now.

Title is "NFC", and See More takes you to the Advanced Device Connectivity
page.

Possibly use cases would be for apps that need to enable NFC for their
peripheral, or accessory.

Test: Manual App
Test: robotest
Change-Id: I8538fd0e4501fb83672418591616f28bf2436645
Fixes: 120142616
2019-01-24 12:53:56 -08:00
Yanting Yang
aa29da44d8 Add Notification Channel slice to Contextual Settings Homepage
Bug: 119831690
Test: visual, robotests
Change-Id: Ia8d020dcdab181497d4ae4bf968ea641b6908622
2019-01-19 17:09:25 +08:00
Fan Zhang
0db4ead2b3 Hide wifi card sometimes.
When there is a connected wifi, we now hide the wifi slice card.

However, if we initially shows this card but later wifi is connected
while the card is visible, we keep showing this card to avoid janky
animation. The card will be gone if user nagivates to a different UI and
comes back.

- Create a new slice ContextualWifiSlice for homepage use case, all
  special logic for homepage are added here.
- Change reference for WIFI_SLICE to CONTEXTUAL_WIFI_SLICE where make
  sense.

Change-Id: Ibd87f88058f357aabef0f7d68a5bf48350d75b06
Fixes: 121040746
Test: robotests
2018-12-18 10:18:08 -08:00
Yanting Yang
09b130529c Rename ConnectedDeviceSlice to BluetoothDevicesSlice
Bug: 120029006
Test: robotests
Change-Id: I7e39f52a87ebd017bf0635cd5a76945b39eee6fc
2018-12-10 18:33:51 +08:00
Fan Zhang
8a4d854603 Add action/ or intent/ to all custom slice uri path.
Test: rebuild, robotests
Change-Id: Ibb4a071cffb458a9f871aa11ff2737cd40328574
2018-12-04 16:07:40 -08:00
Matthew Fritze
c999b088d2 Add Volume panel
Volume panel hosts each volume stream, including:
- Media volume
- Call Volume
- Ring volume
- Alarm volume

Change-Id: I1801d10d2304c57615e9499386c638c74ffcd7c3
Screenshot: https://screenshot.googleplex.com/m764j65ECto
Bug: 117804161
Test: Manual app
Test: robolectric
2018-12-03 11:26:58 -08:00
Fan Zhang
53f75f0df9 Move all custom slice uris to a registry class.
Change-Id: I192320f95ac81d14c8891ce2531d603912e59f56
Fixes: 119776308
Test: robotests
2018-11-29 16:41:21 -08:00