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 - remove the search panel from settings home page - remove the search menu Bug: 110034419 Test: make RunSettingsRoboTests Change-Id: Ieb7eb0e8699229ec0824ccc19d7b958ac44965a2
This commit is contained in:
@@ -24,6 +24,7 @@ import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
import com.android.settings.search.SearchFeatureProvider;
|
||||
import com.android.settingslib.core.lifecycle.LifecycleObserver;
|
||||
@@ -53,6 +54,9 @@ public class SearchMenuController implements LifecycleObserver, OnCreateOptionsM
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
|
||||
if (!Utils.isDeviceProvisioned(mHost.getContext())) {
|
||||
return;
|
||||
}
|
||||
if (menu == null) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user