Hide search box if it is called in initial setup wizard
- Search box is hidden if user set intent extra isSetupFlow true Fixes: 135717823 Test: search box is hidden in the following command adb shell am start -a android.settings.SETTINGS --ez isSetupFlow true Change-Id: Ia3d955c9390d6b0eef9391b9b35b6a483eb63d26
This commit is contained in:
@@ -34,6 +34,8 @@ import com.android.settings.Utils;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
import com.android.settingslib.search.SearchIndexableResources;
|
||||
|
||||
import com.google.android.setupcompat.util.WizardManagerHelper;
|
||||
|
||||
/**
|
||||
* FeatureProvider for Settings Search
|
||||
*/
|
||||
@@ -67,8 +69,9 @@ public interface SearchFeatureProvider {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Utils.isDeviceProvisioned(activity) ||
|
||||
!Utils.isPackageEnabled(activity, getSettingsIntelligencePkgName(activity))) {
|
||||
if (!WizardManagerHelper.isDeviceProvisioned(activity)
|
||||
|| !Utils.isPackageEnabled(activity, getSettingsIntelligencePkgName(activity))
|
||||
|| WizardManagerHelper.isAnySetupWizard(activity.getIntent())) {
|
||||
final ViewGroup parent = (ViewGroup) toolbar.getParent();
|
||||
if (parent != null) {
|
||||
parent.setVisibility(View.GONE);
|
||||
|
Reference in New Issue
Block a user