History log of /packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d9613b2742bdb8441b8050edfdf0a9772f7d45c9 23-May-2018 Matthew Fritze <mfritze@google.com> Return null when setting can't be changed.

If a Slice cannot be changed, return null instead of
an error slice.

Bug: 80155832
Test: robotests
Change-Id: I843fee76cf19d49cc994062059cb231f222120b2
Merged-In: Ib94136c449c6d9c1911f89833bba62fd2263daa4
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
f9c13fc305fc2139db6df04a6596a1f5ff77ba4d 16-May-2018 Matthew Fritze <mfritze@google.com> Set slice summary text to screentitle first

To improve context on search surfaces where the
setting may be ambiguous, we set the screentitle
as the summary text as the top priority. If there is
no screentitle or the it matches the title, then we
try to use the controller summary. If the controller
summary is not valid, then we show nothing.

Bug: 79780762
Test: robotests
Change-Id: If4f7f8d4a072125604ede14e3df2afd667fa24b7
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
bd376296cd5b5a41c421b4d831036957915336ce 04-May-2018 Matthew Fritze <mfritze@google.com> Establish permanently unavailable settings

Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.

The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.

Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.

Bug: 78910582
Fixes: 79245656
Test: robotests
Change-Id: I42c2cedab66be2d76999795f46470a079cc1ec71
Merged-In: I58821a6cfd6134b3b351657b6edf5f74ead00643
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
c301964167145dbc0051df401f091ea946003c7b 08-May-2018 Matthew Fritze <mfritze@google.com> Prevent crashes on null intent in Slice Builder

Change-Id: Ia429dd00fce785bc9d23ac8cf15f6855d7fca7c2
Fixes: 79147458
Test: Robotests
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
47a44e8fa4974193d692cc1d86201b18ba7adbfe 19-Apr-2018 Matthew Fritze <mfritze@google.com> Add keywords to Slices

Attach the keywords used for Settings search to Slices.
Their primary use is helping match synonyms for presenters
which display slices without explicit Uri requests, like a launcher.

This changes:
- Updates database scheme
- Adds to SliceData object
- Grab keywords in the SliceDataConverter
- Set keywords on all slices

Test: robotests
Change-Id: I16c40d2380ffddaf0a87fb1b9cd58e95573b308f
Fixes: 78306195
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
bc4c392ff4f79d9fde654aa77c2df51b231d5f24 18-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add A11y Slices" into pi-dev
1257466d0bc7d51512cea2a455584589427b4276 17-Apr-2018 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Add getDescendants to Settings Slice Provider" into pi-dev
6730a061b1c297eca8f38ab3cfff620da10cbdb3 27-Mar-2018 Matthew Fritze <mfritze@google.com> 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
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
7acd13f3e463575e6338dada36c1bf9d188aade3 13-Apr-2018 Matthew Fritze <mfritze@google.com> Update a Slice Uri when unavailable

When a slice becomes unavailable, it should not update the
underlying data even if the view has not changed.

When we receive a change from an unavailable slice, notifychange
on the Uri and do not change the underlying data.

Change-Id: I91851ab668e4aece669fd65c14e0dc4ec2edefdf
Fixes: 77980406
Test: robotests
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
a711ed833099de30f589733cbb2c9b03a19097a6 02-Mar-2018 Matthew Fritze <mfritze@google.com> Add A11y Slices

Add AccessibilityPreferenceController, which wraps all a11y settings
since they are share common infrastructure for enabling, current value,
and availability.

We add an overlay for OEMs to declare their bundled a11y services.
This is the only list of services that will be possible to enabled via
Settings slices.

Accessibility Slices are built by getting a list of valid services,
and indexing the service names as a key in the Slices DB. When they are
built at runtime, they use the generic A11yPrefController to get the status
and enable/disable the service.

Bug: 67997836
Bug: 67997672
Test: robotests
Change-Id: I66f905bf1c55eecb937945c4675c12bcbc96d698
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
59e2d1fff968696aef3ea6e4944a8855e22de0fe 10-Apr-2018 Matthew Fritze <mfritze@google.com> Uniquely identify Slice intents

PendingIntents were being cached because they had the same
targets and would not differentiate on extras - thus all Slice
intents would go to the same destination as the first intent fired.

Adding the data stops the system from caching the intents.

Change-Id: Ifccab72ed482e22750422c5c36aa6d205c20ae3d
Fixes: 77650727
Test: robotests
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
dba7d1c4b3f1cc8ae48c7b86b2259377d2fe6fbc 06-Apr-2018 Matthew Fritze <mfritze@google.com> Unavailable Slices includes DISABLED_DEPENDENT settings

In the change to mark disabled_dependent as available,
it did not change the check in SliceBuilderUtils for the
unavailable Slices. In the case of DISABLED_DEPENDENT, the
setting is available but the Slice is not.

Though it is a simple change, we can now properly test the contents
of Slices, so this change includes tests which should have been in
place earlier and would have caught this bug - duh.

Bug: 71640747
Test: Robotests
Change-Id: I8db5bc80edb337cbf907ce3669aa2bfd9c72f74a
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
8db4358f7606c3c0dbee580842c2370d8738aa37 05-Apr-2018 Matthew Fritze <mfritze@google.com> Prioritize dynamic summaries

If both Xml and a controller provide a summary,
the controller's should be prioritized.

Change-Id: I030746b0f253ce4884a7868e385069b208f63082
Fixes: 77602860
Test: robotests
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
87b2634fc0c1c0ab8280f9af12d7cdbd00375480 03-Apr-2018 Fan Zhang <zhfan@google.com> Log when settings slice is requested/updated.

Change-Id: Ie6b7000729b3a414a29e3dfc25a29e1f2f939ddd
Fixes: 71503986
Test: robotests
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
fcdfc2d83fe3ff4fd2e75676023cbab895941151 28-Feb-2018 Matthew Fritze <mfritze@google.com> 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
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
ad6678f9fc08b26bdcbe26e8394551b9c5fb0457 06-Feb-2018 Matthew Fritze <mfritze@google.com> 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
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
79c6395295fa2361901ed94bd5ee035418626d81 02-Mar-2018 Matthew Fritze <mfritze@google.com> 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
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
4734b3448aadad5cd36d48efb50b4b8051f75184 15-Mar-2018 Alan Viverette <alanv@google.com> Restore "Update for 1.0.0-beta1"

This reverts commit b4fe52343c7df00cd4801c2d712a377d473b2a17.

Bug: 74950017
Test: manual
Change-Id: I9749b9ae8f2f75b1bbdf7c6686a036db1f6f8a74
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
b4fe52343c7df00cd4801c2d712a377d473b2a17 15-Mar-2018 Alan Viverette <alanv@google.com> Revert "Update for 1.0.0-beta1"

This reverts commit 6b1fd5cfa9e6ff2a1b7cdc5190ec844dacec7a72.

Reason for revert: broke Settings

Bug: 74950017
Test: revert only
Change-Id: If56a4dcac4671d8e2c5f2c0de30d13e3cf58666a
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
6b1fd5cfa9e6ff2a1b7cdc5190ec844dacec7a72 10-Mar-2018 Alan Viverette <alanv@google.com> Update for 1.0.0-beta1

Bug: 74449147
Test: make
Change-Id: I664b5f29efbb5d6c40420c0d8aaa8629ddfcd31b
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
a4a3dfffa20e317f4236349e4717f9da312b8ee1 28-Feb-2018 Matthew Fritze <mfritze@google.com> 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
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
22a39c2b93bc66db71238274a7683d329232d124 26-Feb-2018 James Lemieux <jplemieux@google.com> 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
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
906572b127e57aac01bfe1a45ddcc7f053883f47 27-Feb-2018 Fan Zhang <zhfan@google.com> Change PreferenceController#getSummary return type.

Return CharSequence instead of String.

All user visible string should be modeled as CharSequence.

Bug: 73950519
Test: robotest
Change-Id: I30befef0c33f94351d4a2774e283bd1ed804aa8b
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
700c113218b9f360e47dd8631ee0a62ef7ef8e0f 26-Jan-2018 Matthew Fritze <mfritze@google.com> 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
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
64aa50c006dd3d2be51241f837436ec3713753e0 15-Jan-2018 Matthew Fritze <mfritze@google.com> 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
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java
82254b08fd4d74c6a707fe20cec8c68a3e54b329 10-Jan-2018 Matthew Fritze <mfritze@google.com> Add dynamic summaries to Slices

Summary on slices will now determined by checking that
summaries in the following order are valid:
1) SliceData summary
2) Preference Controller summary
3) SliceData screen title

Valid is currently defined as:
- Not empty / null
- Not whitespace
- Not sumamry placeholder

Fixes: 71640678
Test: robotests
Change-Id: I5e699e8566ece80742d311617b7dc4e9a9bda8cf
/packages/apps/Settings/tests/robotests/src/com/android/settings/slices/SliceBuilderUtilsTest.java