Skip to content

Commit b5658c8

Browse files
dimipaunsamtstern
authored andcommitted
Fix for #1416: set the classloader at Intent creation time. (#1470)
This is because the exception happens _before_ we get to read the FlowParameters from the extras/bundle.
1 parent 687a603 commit b5658c8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

auth/src/main/java/com/firebase/ui/auth/ui/HelperActivityBase.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import android.support.annotation.RestrictTo;
99
import android.support.v7.app.AppCompatActivity;
1010

11+
import com.firebase.ui.auth.AuthUI;
1112
import com.firebase.ui.auth.ErrorCodes;
1213
import com.firebase.ui.auth.IdpResponse;
1314
import com.firebase.ui.auth.data.model.FlowParameters;
@@ -29,11 +30,13 @@ protected static Intent createBaseIntent(
2930
@NonNull Context context,
3031
@NonNull Class<? extends Activity> target,
3132
@NonNull FlowParameters flowParams) {
32-
return new Intent(
33+
Intent intent = new Intent(
3334
checkNotNull(context, "context cannot be null"),
3435
checkNotNull(target, "target activity cannot be null"))
3536
.putExtra(ExtraConstants.FLOW_BUNDLE,
3637
checkNotNull(flowParams, "flowParams cannot be null").toBundle());
38+
intent.setExtrasClassLoader(AuthUI.class.getClassLoader());
39+
return intent;
3740
}
3841

3942
@Override

0 commit comments

Comments
 (0)