post from activityResult to avoid transaction error

Was getting crash with "Can not perform this action after
onSaveInstanceState". This lets the back stack get back into shape so it
can put up another alert.
This commit is contained in:
Eric House 2017-04-25 07:37:12 -07:00
parent 52ea395ad6
commit 6fbb701dbe

View file

@ -81,6 +81,7 @@ public class SMSInviteDelegate extends InviteDelegate {
m_activity = delegator.getActivity();
}
@Override
protected void init( Bundle savedInstanceState )
{
String msg = getString( R.string.button_invite );
@ -119,12 +120,17 @@ public class SMSInviteDelegate extends InviteDelegate {
@Override
protected void onActivityResult( RequestCode requestCode, int resultCode,
Intent data )
final Intent data )
{
if ( Activity.RESULT_CANCELED != resultCode && data != null ) {
switch ( requestCode ) {
case GET_CONTACT:
addPhoneNumbers( data );
post ( new Runnable() {
@Override
public void run() {
addPhoneNumbers( data );
}
} );
break;
}
}