Skip to content

Commit 7b87a81

Browse files
committed
Open protection level of OSObservable for testing
Added to OneSignalPackagePrivateHelper.java to allow for direct testing of this class without making it a public class to the released SDK.
1 parent 4b394e2 commit 7b87a81

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

OneSignalSDK/unittest/src/test/java/com/onesignal/OneSignalPackagePrivateHelper.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,4 +824,18 @@ public OSNotification build() {
824824
}
825825
}
826826
}
827+
828+
public static class OSObservable<ObserverType, StateType> extends com.onesignal.OSObservable<ObserverType, StateType> {
829+
public OSObservable(String methodName, boolean fireOnMainThread) {
830+
super(methodName, fireOnMainThread);
831+
}
832+
833+
public void addObserver(ObserverType observer) {
834+
super.addObserver(observer);
835+
}
836+
837+
public void removeObserver(ObserverType observer) {
838+
super.removeObserver(observer);
839+
}
840+
}
827841
}

0 commit comments

Comments
 (0)