Merge "Adds flag argument to setMasterMute." into ics-aah
This commit is contained in:
@@ -911,9 +911,18 @@ public class AudioManager {
|
||||
* @hide
|
||||
*/
|
||||
public void setMasterMute(boolean state) {
|
||||
setMasterMute(state, FLAG_SHOW_UI);
|
||||
}
|
||||
|
||||
/**
|
||||
* set master mute state with optional flags.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void setMasterMute(boolean state, int flags) {
|
||||
IAudioService service = getService();
|
||||
try {
|
||||
service.setMasterMute(state, mICallBack);
|
||||
service.setMasterMute(state, flags, mICallBack);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "Dead object in setMasterMute", e);
|
||||
}
|
||||
|
||||
@@ -779,13 +779,13 @@ public class AudioService extends IAudioService.Stub {
|
||||
}
|
||||
|
||||
/** @see AudioManager#setMasterMute(boolean, IBinder) */
|
||||
public void setMasterMute(boolean state, IBinder cb) {
|
||||
public void setMasterMute(boolean state, int flags, IBinder cb) {
|
||||
if (state != AudioSystem.getMasterMute()) {
|
||||
AudioSystem.setMasterMute(state);
|
||||
// Post a persist master volume msg
|
||||
sendMsg(mAudioHandler, MSG_PERSIST_MASTER_VOLUME_MUTE, 0, SENDMSG_REPLACE, state ? 1
|
||||
: 0, 0, null, PERSIST_DELAY);
|
||||
sendMasterMuteUpdate(state, AudioManager.FLAG_SHOW_UI);
|
||||
sendMasterMuteUpdate(state, flags);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ interface IAudioService {
|
||||
|
||||
boolean isStreamMute(int streamType);
|
||||
|
||||
void setMasterMute(boolean state, IBinder cb);
|
||||
void setMasterMute(boolean state, int flags, IBinder cb);
|
||||
|
||||
boolean isMasterMute();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user