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

Commit 3267ed8f authored by Mady Mellor's avatar Mady Mellor
Browse files

Move metadata key from Slice to SliceManager

Bug: 73741418 
Test: make -j20
Change-Id: Ia22b47d8b6d278944566641b07fcfb0fb7662d07
parent 6ef5bbc9
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -7266,6 +7266,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 =