diff options
author | cretin45 <cretin45@gmail.com> | 2015-01-23 15:26:45 -0800 |
---|---|---|
committer | cretin45 <cretin45@gmail.com> | 2015-01-23 15:26:45 -0800 |
commit | 59730c2e7507b4b4f292f6fe968936f328fee503 (patch) | |
tree | b1296f93413d45fc48e54534403d4abdd8c95526 /src/com/cyanogenmod/setupwizard/setup | |
parent | 4e0c85b7ef9b6516d236d517379fb8abe7b74d1c (diff) | |
download | packages_apps_SetupWizard-59730c2e7507b4b4f292f6fe968936f328fee503.zip packages_apps_SetupWizard-59730c2e7507b4b4f292f6fe968936f328fee503.tar.gz packages_apps_SetupWizard-59730c2e7507b4b4f292f6fe968936f328fee503.tar.bz2 |
SetupWizard: Improve some of the transitions
Change-Id: I26a9d20cf429ab137d9877970ea0d6e4eafec0ad
Diffstat (limited to 'src/com/cyanogenmod/setupwizard/setup')
3 files changed, 20 insertions, 2 deletions
diff --git a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java index 70630f7..09286c1 100644 --- a/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/ChooseDataSimPage.java @@ -161,12 +161,14 @@ public class ChooseDataSimPage extends SetupPage { @Override public void onSignalStrengthsChanged(SignalStrength signalStrength) { + if (isDetached()) return; mSignalStrengths.put(subInfoRecord.slotId, signalStrength); updateSignalStrength(subInfoRecord); } @Override public void onServiceStateChanged(ServiceState state) { + if (isDetached()) return; mServiceStates.put(subInfoRecord.slotId, state); updateSignalStrength(subInfoRecord); } @@ -174,12 +176,14 @@ public class ChooseDataSimPage extends SetupPage { } private void updateSignalStrengths() { + if (isDetached()) return; for (int i = 0; i < mSubInfoRecords.size(); i++) { updateSignalStrength(mSubInfoRecords.get(i)); } } private void setDataSubChecked(SubInfoRecord subInfoRecord) { + if (isDetached()) return; for (int i = 0; i < mCheckBoxes.size(); i++) { mCheckBoxes.get(i).setChecked(subInfoRecord.slotId == i); @@ -187,6 +191,7 @@ public class ChooseDataSimPage extends SetupPage { } private void updateCurrentDataSub() { + if (isDetached()) return; for (int i = 0; i < mSubInfoRecords.size(); i++) { SubInfoRecord subInfoRecord = mSubInfoRecords.get(i); mCheckBoxes.get(i).setChecked(SubscriptionManager.getDefaultDataSubId() @@ -196,6 +201,7 @@ public class ChooseDataSimPage extends SetupPage { } private void updateCarrierText(SubInfoRecord subInfoRecord) { + if (isDetached()) return; String name = mPhone.getNetworkOperatorName(subInfoRecord.subId); ServiceState serviceState = mServiceStates.get(subInfoRecord.slotId); if (TextUtils.isEmpty(name)) { @@ -211,6 +217,7 @@ public class ChooseDataSimPage extends SetupPage { } private void updateSignalStrength(SubInfoRecord subInfoRecord) { + if (isDetached()) return; ImageView signalView = mSignalViews.get(subInfoRecord.slotId); SignalStrength signalStrength = mSignalStrengths.get(subInfoRecord.slotId); if (!hasService(subInfoRecord)) { diff --git a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java index 7d7b433..8ff74aa 100644 --- a/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/CyanogenServicesPage.java @@ -22,6 +22,7 @@ import android.accounts.AccountManagerFuture; import android.accounts.AuthenticatorException; import android.accounts.OperationCanceledException; import android.app.Activity; +import android.app.ActivityOptions; import android.app.Fragment; import android.app.FragmentManager; import android.content.Context; @@ -299,8 +300,13 @@ public class CyanogenServicesPage extends SetupPage { Bundle result = future.getResult(); Intent intent = result .getParcelable(AccountManager.KEY_INTENT); + ActivityOptions options = + ActivityOptions.makeCustomAnimation(activity, + android.R.anim.fade_in, + android.R.anim.fade_out); activity.startActivityForResult(intent, - SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN); + SetupWizardApp.REQUEST_CODE_SETUP_CYANOGEN, + options.toBundle()); } catch (OperationCanceledException e) { } catch (IOException e) { } catch (AuthenticatorException e) { diff --git a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java index fe9c5c9..0780594 100644 --- a/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java +++ b/src/com/cyanogenmod/setupwizard/setup/GmsAccountPage.java @@ -22,6 +22,7 @@ import android.accounts.AccountManagerFuture; import android.accounts.AuthenticatorException; import android.accounts.OperationCanceledException; import android.app.Activity; +import android.app.ActivityOptions; import android.app.Fragment; import android.app.FragmentManager; import android.content.Context; @@ -109,8 +110,12 @@ public class GmsAccountPage extends SetupPage { Bundle result = future.getResult(); Intent intent = result .getParcelable(AccountManager.KEY_INTENT); + ActivityOptions options = + ActivityOptions.makeCustomAnimation(activity, + android.R.anim.fade_in, + android.R.anim.fade_out); activity.startActivityForResult(intent, - SetupWizardApp.REQUEST_CODE_SETUP_GMS); + SetupWizardApp.REQUEST_CODE_SETUP_GMS, options.toBundle()); } catch (OperationCanceledException e) { } catch (IOException e) { } catch (AuthenticatorException e) { |