1 /* 2 * Copyright (C) 2021 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.car.media; 18 19 import android.annotation.SdkConstant; 20 import android.annotation.SuppressLint; 21 22 /** 23 * Defines media related intents (and their extras) for the car. 24 */ 25 public final class CarMediaIntents { 26 27 /** 28 * Activity Action: Provide media playing through a media template app. 29 * <p> Input: these optional extras 30 * <li> {@link #EXTRA_MEDIA_COMPONENT} </li> 31 * <li> {@link #EXTRA_SEARCH_QUERY} </li> 32 * <p> Output: nothing.<p/> 33 * If no extra is specified, the current media source is opened. 34 */ 35 @SuppressLint("ActionValue") // Moved from android.car.Car.java 36 @SdkConstant(SdkConstant.SdkConstantType.ACTIVITY_INTENT_ACTION) 37 public static final String ACTION_MEDIA_TEMPLATE = "android.car.intent.action.MEDIA_TEMPLATE"; 38 39 /** 40 * Used as a string extra field with {@link #ACTION_MEDIA_TEMPLATE} to specify the 41 * MediaBrowserService that user wants to start the media on. 42 */ 43 @SuppressLint("ActionValue") // Moved from android.car.Car.java 44 public static final String EXTRA_MEDIA_COMPONENT = "android.car.intent.extra.MEDIA_COMPONENT"; 45 46 /** 47 * Used as a string extra field with {@link #ACTION_MEDIA_TEMPLATE} to specify the search query 48 * to send either to the current MediaBrowserService or the one specified 49 * with {@link #EXTRA_MEDIA_COMPONENT}. 50 */ 51 public static final String EXTRA_SEARCH_QUERY = "android.car.media.extra.SEARCH_QUERY"; 52 53 /** @hide */ CarMediaIntents()54 private CarMediaIntents() { 55 } 56 } 57