File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
core/src/main/java/io/snabble/sdk/payment Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 11# Changelog
22All notable changes to this project will be documented in this file.
33
4+ ## [ 0.16.9]
5+
6+ ### Fixed
7+ - Notify payment updates on main thread instead of caller thread
8+
49## [ 0.16.8]
510
611### Added
Original file line number Diff line number Diff line change 55import android .content .Context ;
66import android .content .SharedPreferences ;
77import android .os .Build ;
8+ import android .os .Handler ;
9+ import android .os .Looper ;
810
911import com .google .gson .Gson ;
1012
@@ -188,9 +190,15 @@ private void validate() {
188190 }
189191
190192 private void notifyChanged () {
191- for (Callback cb : callbacks ) {
192- cb .onChanged ();
193- }
193+ Handler handler = new Handler (Looper .getMainLooper ());
194+ handler .post (new Runnable () {
195+ @ Override
196+ public void run () {
197+ for (Callback cb : callbacks ) {
198+ cb .onChanged ();
199+ }
200+ }
201+ });
194202 }
195203
196204 public void addCallback (Callback cb ) {
You can’t perform that action at this time.
0 commit comments