- public AudioStreamFocusState RecordingFocusState {
- get {
- AudioStreamFocusState stateForPlayback;
- AudioStreamFocusState stateForRecording;
- int ret = Interop.AudioStreamPolicy.GetFocusState(_streamInfo, out stateForPlayback, out stateForRecording);
- if(ret != 0) {
- Tizen.Log.Info(AudioStreamPolicyLog.Tag, "Unable to get focus state" + (AudioManagerError)ret);
- return AudioStreamFocusState.Released;
- }
- return stateForRecording;
+ /// <param name="options">The focus mask that you want to release.</param>
+ /// <param name="behaviors">The requesting behaviors.</param>
+ /// <param name="extraInfo">The extra information for this request. This value can be null.</param>
+ /// <exception cref="ArgumentException"><paramref name="options"/> is zero.</exception>
+ /// <exception cref="ArgumentOutOfRangeException">
+ /// <paramref name="options"/> contain a invalid bit.<br/>
+ /// -or-<br/>
+ /// <paramref name="behaviors"/> contain a invalid bit.
+ /// </exception>
+ /// <exception cref="InvalidOperationException">The focus has not been acquired.</exception>
+ /// <exception cref="ObjectDisposedException">The <see cref="AudioStreamPolicy"/> has already been disposed of.</exception>
+ /// <since_tizen> 3 </since_tizen>
+ public void ReleaseFocus(AudioStreamFocusOptions options, AudioStreamBehaviors behaviors, string extraInfo)
+ {
+ if (options == 0)
+ {
+ throw new ArgumentException("options can't be zero.", nameof(options));
+ }
+
+ if (options.IsValid() == false)
+ {
+ throw new ArgumentOutOfRangeException(nameof(options), options, "options contains a invalid bit.");
+ }
+
+ if (behaviors.IsValid() == false)
+ {
+ throw new ArgumentOutOfRangeException(nameof(behaviors), behaviors, "behaviors contains a invalid bit.");