Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/quite/humla.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Comminos <andrew@morlunk.com>2015-04-29 05:30:33 +0300
committerAndrew Comminos <andrew@morlunk.com>2015-04-29 05:30:33 +0300
commitc2593788110f5be88c36c4f5bfd9187a18e0181a (patch)
tree108ea349bc55c00501d4826d23478f667876a3c7
parentbde7d112383d4e2e2080db60ccab583dd79a7700 (diff)
Fixed silly channel insertion issue, added local mute AIDL method.
-rw-r--r--src/main/aidl/com/morlunk/jumble/model/IUser.aidl2
-rw-r--r--src/main/java/com/morlunk/jumble/model/Channel.java15
2 files changed, 11 insertions, 6 deletions
diff --git a/src/main/aidl/com/morlunk/jumble/model/IUser.aidl b/src/main/aidl/com/morlunk/jumble/model/IUser.aidl
index 1a64334..aa0f71a 100644
--- a/src/main/aidl/com/morlunk/jumble/model/IUser.aidl
+++ b/src/main/aidl/com/morlunk/jumble/model/IUser.aidl
@@ -38,5 +38,7 @@ interface IUser {
boolean isRecording();
boolean isLocalMuted();
boolean isLocalIgnored();
+ void setLocalMuted(boolean localMuted);
+ void setLocalIgnored(boolean localIgnored);
TalkState getTalkState();
} \ No newline at end of file
diff --git a/src/main/java/com/morlunk/jumble/model/Channel.java b/src/main/java/com/morlunk/jumble/model/Channel.java
index 0a0ee2c..7edc95f 100644
--- a/src/main/java/com/morlunk/jumble/model/Channel.java
+++ b/src/main/java/com/morlunk/jumble/model/Channel.java
@@ -51,13 +51,14 @@ public final class Channel extends IChannel.Stub implements Comparable<Channel>
* @see User#setChannel(Channel)
*/
protected void addUser(User user) {
- for (int i = 0; i < mUsers.size() + 1; i++) {
+ for (int i = 0; i < mUsers.size(); i++) {
User u = mUsers.get(i);
- if (u == null || user.compareTo(u) <= 0) {
+ if (user.compareTo(u) <= 0) {
mUsers.add(i, user);
return;
}
}
+ mUsers.add(user);
}
/**
@@ -132,13 +133,14 @@ public final class Channel extends IChannel.Stub implements Comparable<Channel>
}
public void addSubchannel(Channel channel) {
- for (int i = 0; i < mSubchannels.size() + 1; i++) {
+ for (int i = 0; i < mSubchannels.size(); i++) {
Channel sc = mSubchannels.get(i);
- if (sc == null || channel.compareTo(sc) <= 0) {
+ if (channel.compareTo(sc) <= 0) {
mSubchannels.add(i, channel);
return;
}
}
+ mSubchannels.add(channel);
}
public void removeSubchannel(Channel channel) {
@@ -150,13 +152,14 @@ public final class Channel extends IChannel.Stub implements Comparable<Channel>
}
public void addLink(Channel channel) {
- for (int i = 0; i < mLinks.size() + 1; i++) {
+ for (int i = 0; i < mLinks.size(); i++) {
Channel sc = mLinks.get(i);
- if (sc == null || channel.compareTo(sc) <= 0) {
+ if (channel.compareTo(sc) <= 0) {
mLinks.add(i, channel);
return;
}
}
+ mLinks.add(channel);
}
public void removeLink(Channel channel) {