Skip to content

Commit

Permalink
Bundle NPE in RestoreJobService.onHandleWork
Browse files Browse the repository at this point in the history
* Fixes reported NPE from RestoreJobService.onHandleWork. Issue #591
* Issue maybe related to bug in Android 6.0.1 with BaseBundle.java:127
   - This works around any possible issue here.
  • Loading branch information
jkasten2 committed Sep 25, 2018
1 parent 494c01b commit e1399bb
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ protected final void onHandleWork(Intent intent) {
if (intent == null)
return;

final Bundle extras = new Bundle(intent.getExtras());
// Null check for https://github.com/OneSignal/OneSignal-Android-SDK/issues/591
final Bundle extras = intent.getExtras();
if (extras == null)
return;

NotificationBundleProcessor.ProcessFromGCMIntentService(
getApplicationContext(),
Expand Down

0 comments on commit e1399bb

Please sign in to comment.