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
This commit is contained in:
Matthew Fritze
2018-02-28 10:31:06 -08:00
parent 80bf63a2dd
commit fcdfc2d83f
6 changed files with 187 additions and 18 deletions

View File

@@ -90,6 +90,12 @@ public class SettingsSliceProvider extends SliceProvider {
*/
public static final String EXTRA_SLICE_KEY = "com.android.settings.slice.extra.key";
/**
* Boolean extra to indicate if the Slice is platform-defined.
*/
public static final String EXTRA_SLICE_PLATFORM_DEFINED =
"com.android.settings.slice.extra.platform";
// TODO -- Associate slice URI with search result instead of separate hardcoded thing
@VisibleForTesting