DO NOT MERGE Disable changing lock when device is not provisioned.

When the device is not yet provisioned and settings is launched:
- disable the entry point for changing device lock
- set display search menu to false
- disallow update to display the search menu

Bug: 110034419
Test: make RunSettingsRoboTests
Change-Id: Ieb7eb0e8699229ec0824ccc19d7b958ac44965a2
This commit is contained in:
Doris Ling
2018-08-01 17:24:34 -07:00
parent 78da279398
commit 94ea2dad5b
3 changed files with 17 additions and 2 deletions

View File

@@ -626,7 +626,7 @@ public class SettingsActivity extends SettingsDrawerActivity
// No UP affordance if we are displaying the main Dashboard
mDisplayHomeAsUpEnabled = false;
// Show Search affordance
mDisplaySearch = true;
mDisplaySearch = Utils.isDeviceProvisioned(this);
mInitialTitleResId = R.string.dashboard_title;
// add argument to indicate which settings tab should be initially selected
@@ -708,7 +708,7 @@ public class SettingsActivity extends SettingsDrawerActivity
}
public void setDisplaySearchMenu(boolean displaySearch) {
if (displaySearch != mDisplaySearch) {
if (Utils.isDeviceProvisioned(this) && displaySearch != mDisplaySearch) {
mDisplaySearch = displaySearch;
invalidateOptionsMenu();
}