1 /*
2  * Copyright 2024 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.service.chooser;
18 
19 import android.annotation.FlaggedApi;
20 
21 /**
22  * Specifies constants used by Chooser when interacting with the additional content provider,
23  * see {@link android.content.Intent#EXTRA_CHOOSER_ADDITIONAL_CONTENT_URI}.
24  */
25 @FlaggedApi(android.service.chooser.Flags.FLAG_CHOOSER_PAYLOAD_TOGGLING)
26 public interface AdditionalContentContract {
27 
28     interface Columns {
29         /**
30          * Content URI for this item.
31          * <p>
32          * Note that this content URI must have a different authority from the content provided
33          * given in {@link android.content.Intent#EXTRA_CHOOSER_ADDITIONAL_CONTENT_URI}.
34          */
35         String URI = "uri";
36     }
37 
38     /**
39      * Constants for {@link android.database.Cursor#getExtras} keys.
40      */
41     interface CursorExtraKeys {
42         /**
43          * An integer, zero-based cursor position that corresponds to the URI specified
44          * with the {@link android.content.Intent#EXTRA_CHOOSER_FOCUSED_ITEM_POSITION} index into
45          * the @link android.content.Intent#EXTRA_STREAM} array.
46          */
47         String POSITION = "position";
48     }
49 
50     /**
51      * Constants for method names used with {@link android.content.ContentResolver#call} method.
52      */
53     interface MethodNames {
54         /**
55          * A method name Chooser is using to notify the sharing app about a shared items selection
56          * change.
57          */
58         String ON_SELECTION_CHANGED = "onSelectionChanged";
59     }
60 }
61