Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6911af1c authored by Alexandra Gherghina's avatar Alexandra Gherghina
Browse files

Save missing state in ConfirmAutoSyncChangeFragment

Bug: 18117345
Change-Id: I5f176f330e51b23fe0935d435aa8bc3904e42d36
parent a7b5d2b3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -536,6 +536,7 @@ public class AccountSettings extends SettingsPreferenceFragment
     */
    public static class ConfirmAutoSyncChangeFragment extends DialogFragment {
        private static final String SAVE_ENABLING = "enabling";
        private static final String SAVE_USER_HANDLE = "userHandle";
        private boolean mEnabling;
        private UserHandle mUserHandle;

@@ -554,6 +555,7 @@ public class AccountSettings extends SettingsPreferenceFragment
            final Context context = getActivity();
            if (savedInstanceState != null) {
                mEnabling = savedInstanceState.getBoolean(SAVE_ENABLING);
                mUserHandle = (UserHandle) savedInstanceState.getParcelable(SAVE_USER_HANDLE);
            }

            final AlertDialog.Builder builder = new AlertDialog.Builder(context);
@@ -581,6 +583,7 @@ public class AccountSettings extends SettingsPreferenceFragment
        public void onSaveInstanceState(Bundle outState) {
            super.onSaveInstanceState(outState);
            outState.putBoolean(SAVE_ENABLING, mEnabling);
            outState.putParcelable(SAVE_USER_HANDLE, mUserHandle);
        }
    }
    // TODO Implement a {@link SearchIndexProvider} to allow Indexing and Search of account types