Merge "Add recommendation to use MediaActionSound class in a background thread since it relies on binder." am: 23398e75a3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2025024 Change-Id: I3d560d996fba6d50f55959797b20c4a8a0599fb0
This commit is contained in:
@@ -25,7 +25,8 @@ import android.util.Log;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>A class for producing sounds that match those produced by various actions
|
* <p>A class for producing sounds that match those produced by various actions
|
||||||
* taken by the media and camera APIs. </p>
|
* taken by the media and camera APIs. It is recommended to call methods in this class
|
||||||
|
* in a background thread since it relies on binder calls.</p>
|
||||||
*
|
*
|
||||||
* <p>This class is recommended for use with the {@link android.hardware.camera2} API, since the
|
* <p>This class is recommended for use with the {@link android.hardware.camera2} API, since the
|
||||||
* camera2 API does not play any sounds on its own for any capture or video recording actions.</p>
|
* camera2 API does not play any sounds on its own for any capture or video recording actions.</p>
|
||||||
@@ -109,7 +110,7 @@ public class MediaActionSound {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>Returns true if the application must play the shutter sound in accordance
|
* <p>Returns true if the application must play the shutter sound in accordance
|
||||||
* to certain regional restrictions. </p>
|
* to certain regional restrictions.</p>
|
||||||
*
|
*
|
||||||
* <p>If this method returns true, applications are strongly recommended to use
|
* <p>If this method returns true, applications are strongly recommended to use
|
||||||
* MediaActionSound.play(SHUTTER_CLICK) or START_VIDEO_RECORDING whenever it captures
|
* MediaActionSound.play(SHUTTER_CLICK) or START_VIDEO_RECORDING whenever it captures
|
||||||
|
|||||||
Reference in New Issue
Block a user