Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f09c8c16 authored by Jason Monk's avatar Jason Monk Committed by Android (Google) Code Review
Browse files

Merge "Move metadata key from Slice to SliceManager"

parents cfd17093 3267ed8f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7267,6 +7267,7 @@ package android.app.slice {
    method public void registerSliceCallback(android.net.Uri, java.util.List<android.app.slice.SliceSpec>, java.util.concurrent.Executor, android.app.slice.SliceManager.SliceCallback);
    method public void unpinSlice(android.net.Uri);
    method public void unregisterSliceCallback(android.net.Uri, android.app.slice.SliceManager.SliceCallback);
    field public static final java.lang.String SLICE_METADATA_KEY = "android.metadata.SLICE_URI";
  }
  public static abstract interface SliceManager.SliceCallback {
+0 −10
Original line number Diff line number Diff line
@@ -70,16 +70,6 @@ public final class Slice implements Parcelable {
    @Retention(RetentionPolicy.SOURCE)
    public @interface SliceHint {}

    /**
     * The meta-data key that allows an activity to easily be linked directly to a slice.
     * <p>
     * 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.
     * @hide
     */
    public static final String SLICE_METADATA_KEY = "android.metadata.SLICE_URI";

    /**
     * Hint that this content is a title of other content in the slice. This can also indicate that
     * the content should be used in the shortcut representation of the slice (icon, label, action),
+9 −0
Original line number Diff line number Diff line
@@ -60,6 +60,15 @@ public class SliceManager {
    public static final String ACTION_REQUEST_SLICE_PERMISSION =
            "android.intent.action.REQUEST_SLICE_PERMISSION";

    /**
     * The meta-data key that allows an activity to easily be linked directly to a slice.
     * <p>
     * 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.
     */
    public static final String SLICE_METADATA_KEY = "android.metadata.SLICE_URI";

    private final ISliceManager mService;
    private final Context mContext;
    private final ArrayMap<Pair<Uri, SliceCallback>, ISliceListener> mListenerLookup =