SetupWizard: Make sure fragment is attached in callback
Change-Id: Id492defa4c1d9bcad87311250a5f62fa046ee381
This commit is contained in:
parent
ec7edd5154
commit
bce5500e27
@ -127,9 +127,15 @@ public class CyanogenServicesPage extends SetupPage {
|
|||||||
ActivityOptions.makeCustomAnimation(mContext,
|
ActivityOptions.makeCustomAnimation(mContext,
|
||||||
android.R.anim.fade_in,
|
android.R.anim.fade_in,
|
||||||
android.R.anim.fade_out);
|
android.R.anim.fade_out);
|
||||||
|
if (!mFragment.isDetached()) {
|
||||||
mFragment.startActivityForResult(intent,
|
mFragment.startActivityForResult(intent,
|
||||||
SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN,
|
SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN,
|
||||||
options.toBundle());
|
options.toBundle());
|
||||||
|
} else {
|
||||||
|
if (getCallbacks().isCurrentPage(CyanogenServicesPage.this)) {
|
||||||
|
getCallbacks().onNextPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (OperationCanceledException e) {
|
} catch (OperationCanceledException e) {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
} catch (AuthenticatorException e) {
|
} catch (AuthenticatorException e) {
|
||||||
|
@ -203,8 +203,14 @@ public class GmsAccountPage extends SetupPage {
|
|||||||
ActivityOptions.makeCustomAnimation(mContext,
|
ActivityOptions.makeCustomAnimation(mContext,
|
||||||
android.R.anim.fade_in,
|
android.R.anim.fade_in,
|
||||||
android.R.anim.fade_out);
|
android.R.anim.fade_out);
|
||||||
|
if (!mFragment.isDetached()) {
|
||||||
mFragment.startActivityForResult(intent,
|
mFragment.startActivityForResult(intent,
|
||||||
SetupWizardApp.REQUEST_CODE_SETUP_GMS, options.toBundle());
|
SetupWizardApp.REQUEST_CODE_SETUP_GMS, options.toBundle());
|
||||||
|
} else {
|
||||||
|
if (getCallbacks().isCurrentPage(GmsAccountPage.this)) {
|
||||||
|
getCallbacks().onNextPage();
|
||||||
|
}
|
||||||
|
}
|
||||||
} catch (OperationCanceledException e) {
|
} catch (OperationCanceledException e) {
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
} catch (AuthenticatorException e) {
|
} catch (AuthenticatorException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user