Skip to content
Snippets Groups Projects
Commit c985b369 authored by Alexandre Lision's avatar Alexandre Lision
Browse files

fix:- do not route audio to speakers when headset is on

    - one liner bug in call UI
parent 7d058331
No related branches found
No related tags found
No related merge requests found
......@@ -575,7 +575,6 @@ public class HomeActivity extends Activity implements DialingFragment.Callbacks,
}
} else {
createNotRegisteredDialog().show();
;
}
}
......@@ -629,10 +628,10 @@ public class HomeActivity extends Activity implements DialingFragment.Callbacks,
@Override
public void toggleDrawer() {
if (!mContactDrawer.isExpanded())
mContactDrawer.expandPane(0.3f);
else if (mContactDrawer.isAnchored())
if (mContactDrawer.isAnchored())
mContactDrawer.expandPane();
else if (!mContactDrawer.isExpanded())
mContactDrawer.expandPane(0.3f);
else
mContactDrawer.collapsePane();
}
......
......@@ -90,7 +90,7 @@ public class BubbleModel {
// to avoid garbage collection glitches caused by iterator objects.
for (int i = 0, n = bubbles.size(); i < n; i++) {
if (i > bubbles.size()) { // prevent updating a bubble already removed
if (i >= bubbles.size()) { // prevent updating a bubble already removed
return;
}
Bubble b = bubbles.get(i);
......
......@@ -38,7 +38,7 @@ public class MediaManager implements OnAudioFocusChangeListener {
public void obtainAudioFocus(boolean requestSpeakerOn) {
mAudioManager.requestAudioFocus(this, Compatibility.getInCallStream(false), AudioManager.AUDIOFOCUS_GAIN_TRANSIENT);
mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION);
if(requestSpeakerOn){
if(requestSpeakerOn && !mAudioManager.isWiredHeadsetOn()){
RouteToSpeaker();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment