File tree 1 file changed +8
-1
lines changed
acra-core/src/main/java/org/acra/sender
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 17
17
18
18
import android .app .IntentService ;
19
19
import android .content .Intent ;
20
+ import android .os .Handler ;
21
+ import android .os .Looper ;
20
22
import android .support .annotation .NonNull ;
21
23
import android .support .annotation .Nullable ;
22
24
import android .widget .Toast ;
@@ -94,7 +96,12 @@ protected void onHandleIntent(@Nullable final Intent intent) {
94
96
}
95
97
final int toastRes = reportsSentCount > 0 ? config .resReportSendSuccessToast () : config .resReportSendFailureToast ();
96
98
if (toastRes != ACRAConstants .DEFAULT_RES_VALUE ) {
97
- ToastSender .sendToast (this , toastRes , Toast .LENGTH_LONG );
99
+ new Handler (Looper .getMainLooper ()).post (new Runnable () {
100
+ @ Override
101
+ public void run () {
102
+ ToastSender .sendToast (SenderService .this , toastRes , Toast .LENGTH_LONG );
103
+ }
104
+ });
98
105
}
99
106
} catch (Exception e ) {
100
107
ACRA .log .e (LOG_TAG , "" , e );
You can’t perform that action at this time.
0 commit comments