4646 */
4747@ RestrictTo (RestrictTo .Scope .LIBRARY_GROUP )
4848public class PhoneActivity extends AppCompatBase {
49+ private PhoneNumberVerificationHandler mPhoneVerifier ;
50+
4951 public static Intent createIntent (Context context , FlowParameters params , Bundle args ) {
5052 return createBaseIntent (context , PhoneActivity .class , params )
5153 .putExtra (ExtraConstants .PARAMS , args );
@@ -72,10 +74,10 @@ protected void onFailure(@NonNull Exception e) {
7274 }
7375 });
7476
75- final PhoneNumberVerificationHandler phoneVerifier =
76- ViewModelProviders . of ( this ). get ( PhoneNumberVerificationHandler . class );
77- phoneVerifier . init ( getFlowParams () );
78- phoneVerifier .getOperation ().observe (this , new ResourceObserver <PhoneVerification >(
77+ mPhoneVerifier = ViewModelProviders . of ( this ). get ( PhoneNumberVerificationHandler . class );
78+ mPhoneVerifier . init ( getFlowParams () );
79+ mPhoneVerifier . onRestoreInstanceState ( savedInstanceState );
80+ mPhoneVerifier .getOperation ().observe (this , new ResourceObserver <PhoneVerification >(
7981 this , R .string .fui_verifying ) {
8082 @ Override
8183 protected void onSuccess (@ NonNull PhoneVerification verification ) {
@@ -121,6 +123,12 @@ protected void onFailure(@NonNull Exception e) {
121123 .commit ();
122124 }
123125
126+ @ Override
127+ protected void onSaveInstanceState (Bundle outState ) {
128+ super .onSaveInstanceState (outState );
129+ mPhoneVerifier .onSaveInstanceState (outState );
130+ }
131+
124132 @ Override
125133 public void onBackPressed () {
126134 if (getSupportFragmentManager ().getBackStackEntryCount () > 0 ) {
0 commit comments