From 39b9fb373c8da878199e0da39647db6fca53b4de Mon Sep 17 00:00:00 2001 From: Jason Monk Date: Tue, 27 Mar 2018 10:45:23 -0400 Subject: [PATCH] Slices: Fix up some formatting and add examples Test: TH Change-Id: Ia95306d9a44e6a9861958bd7f2b3b697a7ecb4cc Fixes: 76462142 Fixes: 76461933 --- core/java/android/app/slice/SliceManager.java | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/core/java/android/app/slice/SliceManager.java b/core/java/android/app/slice/SliceManager.java index 1afe53d8a7b50..88b198b40be98 100644 --- a/core/java/android/app/slice/SliceManager.java +++ b/core/java/android/app/slice/SliceManager.java @@ -81,6 +81,17 @@ public class SliceManager { * An activity can be statically linked to a slice uri by including a meta-data item * for this key that contains a valid slice uri for the same application declaring * the activity. + * + *
+     * {@literal
+     * 
+     *     
+     *  }
+     * 
+ * + * @see #mapIntentToUri(Intent) + * @see SliceProvider#onMapIntentToUri(Intent) */ public static final String SLICE_METADATA_KEY = "android.metadata.SLICE_URI"; @@ -257,16 +268,17 @@ public class SliceManager { *

* This goes through a several stage resolution process to determine if any slice * can represent this intent. - * - If the intent contains data that {@link ContentResolver#getType} is - * {@link SliceProvider#SLICE_TYPE} then the data will be returned. - * - If the intent with {@link #CATEGORY_SLICE} added resolves to a provider, then + *

    + *
  1. If the intent contains data that {@link ContentResolver#getType} is + * {@link SliceProvider#SLICE_TYPE} then the data will be returned.
  2. + *
  3. If the intent with {@link #CATEGORY_SLICE} added resolves to a provider, then * the provider will be asked to {@link SliceProvider#onMapIntentToUri} and that result - * will be returned. - * - Lastly, if the intent explicitly points at an activity, and that activity has + * will be returned.
  4. + *
  5. Lastly, if the intent explicitly points at an activity, and that activity has * meta-data for key {@link #SLICE_METADATA_KEY}, then the Uri specified there will be - * returned. - * - If no slice is found, then {@code null} is returned. - * + * returned.
  6. + *
  7. If no slice is found, then {@code null} is returned.
  8. + *
* @param intent The intent associated with a slice. * @return The Slice Uri provided by the app or null if none exists. * @see Slice