analysis: full official-app reverse artifacts (jadx sources, ghidra libcxsdk decomp, authoritative protocol conclusions) + docs
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
package cn.com.magnity.magnitycx.sdk;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/* loaded from: classes.dex */
|
||||
public abstract class Observable<T> {
|
||||
protected final ArrayList<T> observers_ = new ArrayList<>();
|
||||
|
||||
public void registerObserver(T observer) {
|
||||
if (observer != null) {
|
||||
synchronized (this.observers_) {
|
||||
if (!this.observers_.contains(observer)) {
|
||||
this.observers_.add(observer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void unregisterObserver(T observer) {
|
||||
if (observer != null) {
|
||||
synchronized (this.observers_) {
|
||||
int index = this.observers_.indexOf(observer);
|
||||
if (index != -1) {
|
||||
this.observers_.remove(index);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void unregisterAll() {
|
||||
synchronized (this.observers_) {
|
||||
this.observers_.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user