Commit Graph

17 Commits

Author SHA1 Message Date
Jason Monk
20210122bd Updates to match prebuilts drop
Test: build
Bug: 77482321
Change-Id: I65a2cffb0a921ef6acb58ff500a7da8a8f870e76
2018-04-04 16:08:17 -04:00
Matthew Fritze
fcdfc2d83f Return back-up slices for unavailable settings
When an inline slice is requested, and the setting is unavailable,
we should present more useful information to the user. This CL handles:
- Unsupported: return intent slice to Settings home page
- Disabled for user: intent to the setting page
- Unknown reason: intent to setting page
- Disabled dependency: Create intent-based Slice rather
than the requested inline slice.

Bug: 71640747
Test: robotests
Change-Id: I9c1a0ee36119d4f9f3b205e0824c251f4356db55
2018-03-23 12:47:36 -07:00
Jason Monk
f6edc7c80a Add option for settings to push to a device index
The index implementation is optional and left up to the OEM.

Test: Open settings, see content in index
Test: robo tests
Bug: 68378569
Bug: 76102600
Change-Id: Idb8bb1e0cabbbe92e7a852e2eadbdcd8c2ab7d56
2018-03-23 09:36:57 -04:00
Matthew Fritze
ad6678f9fc Add Slider template for Slices
Add the Seekbar preference equivalent
to the TwoStatePreference (toggle) preference
controller abstract controller.

Change-Id: I6ff91f2f72a7f72c18ddbc27b2b1fda4b6ce6ca9
Fixes: 67996707
Test: Robotests
2018-03-22 11:46:47 -07:00
Alan Viverette
4734b3448a Restore "Update for 1.0.0-beta1"
This reverts commit b4fe52343c.

Bug: 74950017
Test: manual
Change-Id: I9749b9ae8f2f75b1bbdf7c6686a036db1f6f8a74
2018-03-16 02:13:11 +00:00
Alan Viverette
b4fe52343c Revert "Update for 1.0.0-beta1"
This reverts commit 6b1fd5cfa9.

Reason for revert: broke Settings

Bug: 74950017
Test: revert only
Change-Id: If56a4dcac4671d8e2c5f2c0de30d13e3cf58666a
2018-03-15 18:48:00 +00:00
Alan Viverette
6b1fd5cfa9 Update for 1.0.0-beta1
Bug: 74449147
Test: make
Change-Id: I664b5f29efbb5d6c40420c0d8aaa8629ddfcd31b
2018-03-12 23:08:35 +00:00
Matthew Fritze
a4a3dfffa2 Declare official platform slice
Create the notion of an official platform slice.
This includes:
- Adding a second authority to the provider
- tagging slices in xml with a platform slice flag
- Including authority in the getUri method

Bug:73359139
Test: robotests
Change-Id: I5382be138a262dbc5a8324c34aab131c5d0d5516
Merged-In: I581ee6dfcdf935f452a15e89e5d055e375ff1877
2018-03-09 18:04:06 +00:00
Alan Viverette
24ac51ce3a Revert "Revert "Update to match now slice APIs""
This reverts commit 80c806abd6.

Bug: 73250914
Test: make && make checkbuild, manual testing
2018-02-27 22:12:02 +00:00
Alan Viverette
80c806abd6 Revert "Update to match now slice APIs"
This reverts commit 2d96005aba.

Reason for revert: prebuilt revert

Bug: 73903252
Bug: 73876473
Bug: 73875529
Bug: 73866916
Change-Id: I5d47a7c5ddebc16c1c508f5bb48ace809cbaf273
2018-02-27 22:07:12 +00:00
Jason Monk
2d96005aba Update to match now slice APIs
Test: make
Change-Id: Ie74e1b179f80e1d0faf259bd22b3ae4e953a0726
2018-02-22 16:33:51 -05:00
Matthew Fritze
64aa50c006 Add bluetooth as a supported Slice
To add bluetooth as a valid slice requires adding
support for Context-only preference controller
constructors, which was already planned work.

Fixes: 67997327
Test: robotests
Change-Id: I7efd20a05d5796c3327a26b1fc535d5436d1070f
2018-01-23 16:16:28 -08:00
Matthew Fritze
0cb918a1de Asynchronously load SliceData from SliceProvider
The slices paradigm is to return a slice as soon as possible
whith whatever information is currently available. Then, load the
longer information in the background and broadcast on the Uri when
the changes are ready.

This CL incorprates a cache system for SettingsSliceProvider to
load that data in the background to solve the issues of multiple
simultaneous callers.

Bug: 67996923
Test: robotests
Change-Id: I0e3f9984181e1c989fed139707cdb27956cf6de6
2018-01-17 16:31:58 -08:00
Jason Monk
5ef0a604a9 Follow slice refactor
Test: make
Bug: 68378561
Change-Id: Ifb35d39e54b2c292017b7866d7a52b120b4f6685
2018-01-12 09:19:14 -05:00
Matthew Fritze
8c96843fe3 Build slice from indexed data in SliceProvider
Connect the SliceIndexing data to the SliceProvider,
such that a query to SliceProvider can build a Slice
via the indexed data from SlicesIndexingManager.

We take the key from the Uri supplied to the SettingSliceProvider
and find a potential matching row in the indexed data. The
matched data is then used to Build a slice for the caller.

Bug: 67996923
Test: robotests
Change-Id: If51bfd1a05c3f3817ae720554f95a98fc7b002e1
2018-01-10 10:58:33 -08:00
Mady Mellor
ca5304413a Update settings slice provider to use new API
Test: build with new API
Change-Id: I2513b23166848d7729547dc56987766aab48b016
2017-12-15 11:36:42 -08:00
Matthew Fritze
7fddfebf6c Add Slices Data object and DB Contract
Add in a Data object used to represent one row
in a new SQLite database used for building Slices.

The database has the following schema:
- Key
- Title
- Subtitle
- Screentitle
- Icon
- Fragment
- Controller

The key is the preference key.
Title, subtitle and Icon are for UI info.
Screentitle and fragment are for the intent.
Controller is used to get dynamic ui info (like summary),
and to take actions on the slice (like a toggle).

The actual indexing and a Slice will be handled in a subsquent CL,
but a prototype can be found here: ag/3324435

Test: robotests
Bug: 67996923
Change-Id: Id91deb58a3ab89ce1dab5a3f34cdb9ade6263aa8
2017-12-13 10:59:47 -08:00