Merge "AudioService: more communication mode fix" into rvc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
4ffe2081e8
@@ -6490,14 +6490,17 @@ public class AudioService extends IAudioService.Stub
|
|||||||
if (msg.obj == null) {
|
if (msg.obj == null) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// If the app corresponding to this mode death handler object is not
|
// If no other app is currently owning the audio mode and
|
||||||
// capturing or playing audio anymore after 3 seconds, remove it
|
// the app corresponding to this mode death handler object is still in the
|
||||||
// from the stack. Otherwise, check again in 3 seconds.
|
// mode owner stack but not capturing or playing audio after 3 seconds,
|
||||||
|
// remove it from the stack.
|
||||||
|
// Otherwise, check again in 3 seconds.
|
||||||
SetModeDeathHandler h = (SetModeDeathHandler) msg.obj;
|
SetModeDeathHandler h = (SetModeDeathHandler) msg.obj;
|
||||||
if (mSetModeDeathHandlers.indexOf(h) < 0) {
|
if (mSetModeDeathHandlers.indexOf(h) < 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (mRecordMonitor.isRecordingActiveForUid(h.getUid())
|
if (getModeOwnerUid() != h.getUid()
|
||||||
|
|| mRecordMonitor.isRecordingActiveForUid(h.getUid())
|
||||||
|| mPlaybackMonitor.isPlaybackActiveForUid(h.getUid())) {
|
|| mPlaybackMonitor.isPlaybackActiveForUid(h.getUid())) {
|
||||||
sendMsg(mAudioHandler,
|
sendMsg(mAudioHandler,
|
||||||
MSG_CHECK_MODE_FOR_UID,
|
MSG_CHECK_MODE_FOR_UID,
|
||||||
|
|||||||
Reference in New Issue
Block a user