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

Commit 3985485b authored by Sayak Dutta's avatar Sayak Dutta Committed by Automerger Merge Worker
Browse files

Merge "Update back FooterButton visibility for navigation instead of back...

Merge "Update back FooterButton visibility for navigation instead of back button" into tm-qpr-dev am: af11c676

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/19682757



Change-Id: Iae792a3cb815612047ffb2c14fee3c40a19653d2
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c29ab9bf af11c676
Loading
Loading
Loading
Loading
+11 −19
Original line number Diff line number Diff line
@@ -76,36 +76,28 @@ public class StorageWizardInit extends StorageWizardBase {
        }
    }

    @Override
    public void onBackPressed() {
        if (mPortable) {
            super.onBackPressed();
        } else {
            mFlipper.showPrevious();
            setBackButtonText(R.string.wizard_back_adoptable);
            setHeaderText(R.string.storage_wizard_init_v2_external_title,
                getDiskShortDescription());
            setNextButtonText(R.string.storage_wizard_init_v2_external_action);
            mPortable = true;
        }
    }

    @Override
    public void onNavigateBack(View v) {
        if (mPortable == false) {
            return;
        }
        if (!mIsPermittedToAdopt) {
            // TODO: Show a message about why this is disabled for guest and
            // that only an admin user can adopt an sd card.

            v.setEnabled(false);
        } else if (mPortable == false) {
            mFlipper.showNext();
            setHeaderText(R.string.storage_wizard_init_v2_external_title,
                getDiskShortDescription());
            setNextButtonText(R.string.storage_wizard_init_v2_external_action);
            setBackButtonText(R.string.wizard_back_adoptable);
            setBackButtonVisibility(View.VISIBLE);
            mPortable = true;
        } else {
            mFlipper.showNext();
            setHeaderText(R.string.storage_wizard_init_v2_internal_title,
                getDiskShortDescription());
            setNextButtonText(R.string.storage_wizard_init_v2_internal_action);
            setBackButtonVisibility(View.INVISIBLE);
            setBackButtonText(R.string.wizard_back_adoptable);
            setBackButtonVisibility(View.VISIBLE);
            mPortable = false;
        }
    }