1 /*
2  * Copyright (c) 2019, 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 com.android.car.media.testmediaapp;
18 
19 /**
20  * Copy of constants defined in com.android.car.media.common.MediaConstants until they can be moved
21  * to a shared location available to all media apps. This makes un-bundling TestMediaApp easier.
22  */
23 public class MediaKeys {
24 
25     /** Integer extra indicating the recommended size (in pixels) for media art bitmaps. */
26     public static final String EXTRA_MEDIA_ART_SIZE_HINT_PIXELS =
27             "android.media.extras.MEDIA_ART_SIZE_HINT_PIXELS";
28 
29     /**
30      * Bundle extra holding the Pending Intent to launch to let users resolve the current error.
31      * See {@link #ERROR_RESOLUTION_ACTION_LABEL} for more details.
32      */
33     static final String ERROR_RESOLUTION_ACTION_INTENT =
34             "android.media.extras.ERROR_RESOLUTION_ACTION_INTENT";
35 
36 
37     /**
38      * Bundle extra indicating the label of the button users can tap to resolve an error state.
39      */
40     static final String ERROR_RESOLUTION_ACTION_LABEL =
41             "android.media.extras.ERROR_RESOLUTION_ACTION_LABEL";
42 
43     /**
44      * Bundle extra indicating the presentation hint for playable media items. See {@link
45      * #CONTENT_STYLE_LIST_ITEM_HINT_VALUE} or {@link #CONTENT_STYLE_GRID_ITEM_HINT_VALUE}
46      */
47     static final String CONTENT_STYLE_PLAYABLE_HINT =
48             "android.media.browse.CONTENT_STYLE_PLAYABLE_HINT";
49 
50     /**
51      * Bundle extra indicating the presentation hint for browsable media items. See {@link
52      * #CONTENT_STYLE_LIST_ITEM_HINT_VALUE} or {@link #CONTENT_STYLE_GRID_ITEM_HINT_VALUE}
53      */
54     static final String CONTENT_STYLE_BROWSABLE_HINT =
55             "android.media.browse.CONTENT_STYLE_BROWSABLE_HINT";
56 
57     /**
58      * Value for {@link #CONTENT_STYLE_PLAYABLE_HINT} and {@link #CONTENT_STYLE_BROWSABLE_HINT} that
59      * hints the corresponding items should be presented as lists.
60      */
61     static final int CONTENT_STYLE_LIST_ITEM_HINT_VALUE = 1;
62 
63     /**
64      * Value for {@link #CONTENT_STYLE_PLAYABLE_HINT} and {@link #CONTENT_STYLE_BROWSABLE_HINT} that
65      * hints the corresponding items should be presented as grids.
66      */
67     static final int CONTENT_STYLE_GRID_ITEM_HINT_VALUE = 2;
68 
69     /**
70      * Value for {@link #CONTENT_STYLE_BROWSABLE_HINT} that hints the corresponding items should be
71      * presented as a "category" list, where media items are browsable and represented by a
72      * meaningful icon.
73      */
74     public static final int CONTENT_STYLE_CATEGORY_LIST_ITEM_HINT_VALUE = 3;
75 
76     /**
77      * Value for {@link #CONTENT_STYLE_BROWSABLE_HINT} that hints the corresponding items should be
78      * presented as a "category" grid, where media items are browsable and represented by a
79      * meaningful icon.
80      */
81     public static final int CONTENT_STYLE_CATEGORY_GRID_ITEM_HINT_VALUE = 4;
82 }
83