mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-11 11:45:01 -05:00
Fix set/remove OnUpdateBlocklistListener
This commit is contained in:
parent
dd964077b9
commit
e9d7d7e12a
@ -1347,17 +1347,17 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
|
|||||||
switchToForeground();
|
switchToForeground();
|
||||||
}
|
}
|
||||||
this.mOnUpdateBlocklist = listener;
|
this.mOnUpdateBlocklist = listener;
|
||||||
if (this.newKeysAvailableListenerCount < 2) {
|
if (this.updateBlocklistListenerCount < 2) {
|
||||||
this.newKeysAvailableListenerCount++;
|
this.updateBlocklistListenerCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeOnUpdateBlocklistListener() {
|
public void removeOnUpdateBlocklistListener() {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
this.newKeysAvailableListenerCount--;
|
this.updateBlocklistListenerCount--;
|
||||||
if (this.newKeysAvailableListenerCount <= 0) {
|
if (this.updateBlocklistListenerCount <= 0) {
|
||||||
this.newKeysAvailableListenerCount = 0;
|
this.updateBlocklistListenerCount = 0;
|
||||||
this.mOnUpdateBlocklist = null;
|
this.mOnUpdateBlocklist = null;
|
||||||
if (checkListeners()) {
|
if (checkListeners()) {
|
||||||
switchToBackground();
|
switchToBackground();
|
||||||
|
Loading…
Reference in New Issue
Block a user