Only enable up button if device is provisioned
Test: Carry out QR provisioning, observe that no more back button
in the nav bar of wifi picker page
Test: After SuW flow,
Run adb shell am start -a android.net.wifi.PICK_WIFI_NETWORK
Observe there is a back button in the nav bar.
Change-Id: I50ec5b2c465eee87f5a7906e3353a0070c65e2ee
FIX: 74059636
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 0f50d71..8b71df1 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -308,8 +308,9 @@
ActionBar actionBar = getActionBar();
if (actionBar != null) {
- actionBar.setDisplayHomeAsUpEnabled(true);
- actionBar.setHomeButtonEnabled(true);
+ boolean deviceProvisioned = Utils.isDeviceProvisioned(this);
+ actionBar.setDisplayHomeAsUpEnabled(deviceProvisioned);
+ actionBar.setHomeButtonEnabled(deviceProvisioned);
actionBar.setDisplayShowTitleEnabled(!mIsShowingDashboard);
}
mSwitchBar = findViewById(R.id.switch_bar);