* #33827: mute working
diff --git a/src/org/sflphone/fragments/CallFragment.java b/src/org/sflphone/fragments/CallFragment.java
index b14e189..5c98237 100644
--- a/src/org/sflphone/fragments/CallFragment.java
+++ b/src/org/sflphone/fragments/CallFragment.java
@@ -361,11 +361,19 @@
if (contact_bubble != null) {
contact_bubble.attractor.set(x, y);
((BubbleUser) contact_bubble).setConference(conf);
+
return contact_bubble;
}
contact_bubble = new BubbleUser(getActivity(), CallContact.ContactBuilder.buildUserContact(getActivity().getContentResolver()), conf, x, y, BUBBLE_SIZE);
+ try {
+ ((BubbleUser) contact_bubble).setMute(mCallbacks.getService().isCaptureMuted());
+ } catch (RemoteException e) {
+ e.printStackTrace();
+ } catch (NullPointerException e1){
+ e1.printStackTrace();
+ }
model.addBubble(contact_bubble);
return contact_bubble;
}
diff --git a/src/org/sflphone/model/BubbleUser.java b/src/org/sflphone/model/BubbleUser.java
index 77616a7..465d025 100644
--- a/src/org/sflphone/model/BubbleUser.java
+++ b/src/org/sflphone/model/BubbleUser.java
@@ -19,11 +19,13 @@
float expanded_radius;
+ private boolean mMuted;
+
public BubbleUser(Context context, CallContact m, Conference conf, float x, float y, float size) {
super(context, m, x, y, size);
isUser = true;
associated_call = conf;
-
+ mMuted = false;
expanded_radius = (float) (size * 1.5);
setDrawer(new ActionDrawer(0, 0));
@@ -287,4 +289,19 @@
}
return false;
}
+
+ public boolean getMute() {
+ return mMuted;
+ }
+
+ public void toggleMute() {
+ mMuted = !mMuted;
+ act.generateBitmap(Bubble.actions.NOTHING);
+
+ }
+
+ public void setMute(boolean captureMuted) {
+ mMuted = captureMuted;
+
+ }
}
diff --git a/src/org/sflphone/model/BubblesView.java b/src/org/sflphone/model/BubblesView.java
index 6c2923f..df124b0 100644
--- a/src/org/sflphone/model/BubblesView.java
+++ b/src/org/sflphone/model/BubblesView.java
@@ -380,7 +380,12 @@
// TODO
return true;
case Bubble.actions.MUTE:
-
+ try {
+ callback.mCallbacks.getService().setMuted(!((BubbleUser) expand).getMute());
+ ((BubbleUser) expand).toggleMute();
+ } catch (RemoteException e1) {
+ e1.printStackTrace();
+ }
return true;
case Bubble.actions.HANGUP:
try {