Commit Graph

11 Commits

Author SHA1 Message Date
Jason Monk
4913183def Fix settings slice caching
Previously if there were multiple clients it would trigger an infinite
loop as the cache gits dropped after the first bind, and the second
client would trigger another load. Instead now cache as long as slices
are pinned since thats the intended behavior of caching.

Test: make RunSettingsRoboTests
Change-Id: I7d29fab87573120b34cd55e1696c4c5b70fc891c
Fixes: 78471335
2018-04-24 17:08:26 -04:00
Matthew Fritze
6730a061b1 Add getDescendants to Settings Slice Provider
getDescendants allows another app to collect a list
of all valid Uris for Settings Slices. Important for search,
assistant or launcher apps.

This means searching our database for all valid keys and building
a list of Uris for each of those keys.

Fixes: 77808328
Test: robotests
Change-Id: I3ae27e4661a7dcaab50b091ae2730013118af8a2
2018-04-17 10:48:53 -07:00
Matthew Fritze
79c6395295 Index SliceType and Official Platform flag
Extend slices_index.db to include SliceType and platform flag.
This will be used when we generate a list of all available slices
for different authorities & separated intent/action paths.

Bug: 62807132
Test: robotests
Change-Id: I1cce49d077c02ab79153db9bfdfc894dbab5e16a
2018-03-19 14:51:31 -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
James Lemieux
22a39c2b93 Use external/robolectric-shadows/run_robotests.mk
This allows Settings to test against the latest framework changes.

Also replaced TestConfig with traditional robolectric.properties.

Bug: 73173204
Bug: 73892008
Test: make -j56 RunSettingsRoboTests
Change-Id: I3135b4fa5f095ba79b282a76f45dd9baa2584bc7
2018-03-04 03:50:08 -08:00
Matthew Fritze
700c113218 Add Toggle Controllers to XML
Autobrightness preference controller was accidentally removed from
display_settings.xml. Given that no tests were broken and this would
be a disaster for phone buddy & inline actions, I have added another
test which keeps a list of valid controllers that should exist in xml.

When more inline controllers types are added, they will be included
in this test.

Fixes: 72564979
Test: robotests
Change-Id: I40fe18f9118af9cec1c201632742d2949ff64be5
2018-02-07 17:09:05 -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
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