Skip to content

Commit

Permalink
Fix for #1416: set the classloader at Intent creation time. (#1470)
Browse files Browse the repository at this point in the history
This is because the exception happens _before_ we get to
read the FlowParameters from the extras/bundle.
  • Loading branch information
dimipaun authored and samtstern committed Oct 12, 2018
1 parent 687a603 commit b5658c8
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import android.support.annotation.RestrictTo;
import android.support.v7.app.AppCompatActivity;

import com.firebase.ui.auth.AuthUI;
import com.firebase.ui.auth.ErrorCodes;
import com.firebase.ui.auth.IdpResponse;
import com.firebase.ui.auth.data.model.FlowParameters;
Expand All @@ -29,11 +30,13 @@ protected static Intent createBaseIntent(
@NonNull Context context,
@NonNull Class<? extends Activity> target,
@NonNull FlowParameters flowParams) {
return new Intent(
Intent intent = new Intent(
checkNotNull(context, "context cannot be null"),
checkNotNull(target, "target activity cannot be null"))
.putExtra(ExtraConstants.FLOW_BUNDLE,
checkNotNull(flowParams, "flowParams cannot be null").toBundle());
intent.setExtrasClassLoader(AuthUI.class.getClassLoader());
return intent;
}

@Override
Expand Down

0 comments on commit b5658c8

Please sign in to comment.