Lines Matching refs:state
49 void AudioPolicyManager::setPhoneState(int state) {
50 ALOGV("setPhoneState() state %d", state);
52 if (state < 0 || state >= AudioSystem::NUM_MODES) {
53 ALOGW("setPhoneState() invalid state %d", state);
57 if (state == mPhoneState) {
58 ALOGW("setPhoneState() setting same state %d", state);
62 // if leaving call state, handle special case of active streams
65 ALOGV("setPhoneState() in call state management: new state is %d", state);
71 // store previous phone state for management of sonification strategy below
73 mPhoneState = state;
77 if (!isStateInCall(oldState) && isStateInCall(state)) {
82 } else if (isStateInCall(oldState) && !isStateInCall(state)) {
87 } else if (isStateInCall(state) && (state != oldState)) {
94 // check for device and output changes triggered by new phone state
112 if (isStateInCall(state) && oldState == AudioSystem::MODE_RINGTONE) {
120 if (isStateInCall(state)) {
139 if (state == AudioSystem::MODE_IN_CALL && oldState == AudioSystem::MODE_RINGTONE) {
146 // if entering in call state, handle special case of active streams
148 if (isStateInCall(state)) {
149 ALOGV("setPhoneState() in call state management: new state is %d", state);
161 if (state == AudioSystem::MODE_RINGTONE &&