[IMPR] AudioProductStrategy: add getName system hidden API
As volume group, being able to retrieve strategy name helps clients (e.g. CarAudioService) to refer strategies by name. Bug: 260298113 Test: build Change-Id: I8c01f31d715c754f1449b75fa7c754fe61b04d4a Signed-off-by: François Gaffie <francois.gaffie@renault.com>
This commit is contained in:
committed by
Eric Laurent
parent
9d5c349737
commit
212af5e0fe
@@ -7125,6 +7125,7 @@ package android.media.audiopolicy {
|
|||||||
method public int describeContents();
|
method public int describeContents();
|
||||||
method @NonNull public android.media.AudioAttributes getAudioAttributes();
|
method @NonNull public android.media.AudioAttributes getAudioAttributes();
|
||||||
method public int getId();
|
method public int getId();
|
||||||
|
method @NonNull public String getName();
|
||||||
method public boolean supportsAudioAttributes(@NonNull android.media.AudioAttributes);
|
method public boolean supportsAudioAttributes(@NonNull android.media.AudioAttributes);
|
||||||
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
method public void writeToParcel(@NonNull android.os.Parcel, int);
|
||||||
field @NonNull public static final android.os.Parcelable.Creator<android.media.audiopolicy.AudioProductStrategy> CREATOR;
|
field @NonNull public static final android.os.Parcelable.Creator<android.media.audiopolicy.AudioProductStrategy> CREATOR;
|
||||||
|
|||||||
@@ -231,6 +231,16 @@ public final class AudioProductStrategy implements Parcelable {
|
|||||||
return mId;
|
return mId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @hide
|
||||||
|
* @return the product strategy ID (which is the generalisation of Car Audio Usage / legacy
|
||||||
|
* routing_strategy linked to {@link AudioAttributes#getUsage()}).
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
@NonNull public String getName() {
|
||||||
|
return mName;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @hide
|
* @hide
|
||||||
* @return first {@link AudioAttributes} associated to this product strategy.
|
* @return first {@link AudioAttributes} associated to this product strategy.
|
||||||
|
|||||||
Reference in New Issue
Block a user