Merge "Update back FooterButton visibility for navigation instead of back button" into tm-qpr-dev
diff --git a/src/com/android/settings/deviceinfo/StorageWizardInit.java b/src/com/android/settings/deviceinfo/StorageWizardInit.java
index 3a0f7e6..962c65c 100644
--- a/src/com/android/settings/deviceinfo/StorageWizardInit.java
+++ b/src/com/android/settings/deviceinfo/StorageWizardInit.java
@@ -77,35 +77,27 @@
}
@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;
}
}
@@ -162,4 +154,4 @@
}
return s;
}
-}
+}
\ No newline at end of file