• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 com.android.car.internal.annotation;
18 
19 import static android.media.AudioAttributes.USAGE_ALARM;
20 import static android.media.AudioAttributes.USAGE_ANNOUNCEMENT;
21 import static android.media.AudioAttributes.USAGE_ASSISTANCE_ACCESSIBILITY;
22 import static android.media.AudioAttributes.USAGE_ASSISTANCE_NAVIGATION_GUIDANCE;
23 import static android.media.AudioAttributes.USAGE_ASSISTANCE_SONIFICATION;
24 import static android.media.AudioAttributes.USAGE_ASSISTANT;
25 import static android.media.AudioAttributes.USAGE_CALL_ASSISTANT;
26 import static android.media.AudioAttributes.USAGE_EMERGENCY;
27 import static android.media.AudioAttributes.USAGE_GAME;
28 import static android.media.AudioAttributes.USAGE_MEDIA;
29 import static android.media.AudioAttributes.USAGE_NOTIFICATION;
30 import static android.media.AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_DELAYED;
31 import static android.media.AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_INSTANT;
32 import static android.media.AudioAttributes.USAGE_NOTIFICATION_COMMUNICATION_REQUEST;
33 import static android.media.AudioAttributes.USAGE_NOTIFICATION_EVENT;
34 import static android.media.AudioAttributes.USAGE_NOTIFICATION_RINGTONE;
35 import static android.media.AudioAttributes.USAGE_SAFETY;
36 import static android.media.AudioAttributes.USAGE_UNKNOWN;
37 import static android.media.AudioAttributes.USAGE_VEHICLE_STATUS;
38 import static android.media.AudioAttributes.USAGE_VOICE_COMMUNICATION;
39 import static android.media.AudioAttributes.USAGE_VOICE_COMMUNICATION_SIGNALLING;
40 
41 import android.annotation.IntDef;
42 
43 import java.lang.annotation.Retention;
44 import java.lang.annotation.RetentionPolicy;
45 
46 /**
47  * Tells the audio attribute usage (i.e. what type of audio source to use for playback)
48  *
49  * Copied from frameworks/base/media/java/android/media/AudioAttributes.java
50  */
51 @IntDef({
52         USAGE_UNKNOWN,
53         USAGE_MEDIA,
54         USAGE_VOICE_COMMUNICATION,
55         USAGE_VOICE_COMMUNICATION_SIGNALLING,
56         USAGE_ALARM,
57         USAGE_NOTIFICATION,
58         USAGE_NOTIFICATION_RINGTONE,
59         USAGE_NOTIFICATION_COMMUNICATION_REQUEST,
60         USAGE_NOTIFICATION_COMMUNICATION_INSTANT,
61         USAGE_NOTIFICATION_COMMUNICATION_DELAYED,
62         USAGE_NOTIFICATION_EVENT,
63         USAGE_ASSISTANCE_ACCESSIBILITY,
64         USAGE_ASSISTANCE_NAVIGATION_GUIDANCE,
65         USAGE_ASSISTANCE_SONIFICATION,
66         USAGE_GAME,
67         USAGE_ASSISTANT,
68         USAGE_CALL_ASSISTANT,
69         USAGE_EMERGENCY,
70         USAGE_SAFETY,
71         USAGE_VEHICLE_STATUS,
72         USAGE_ANNOUNCEMENT,
73 })
74 @Retention(RetentionPolicy.SOURCE)
75 public @interface AttributeUsage {}
76