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