Merge "Do not perform device index before device provision." into pi-dev am: 1fe4512596
am: 8a8b58d381
Change-Id: Ie111e38c79735090a0cedae253d97d638f974209
This commit is contained in:
@@ -24,8 +24,10 @@ import android.content.Context;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.provider.Settings;
|
||||
import android.util.Log;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.slices.SettingsSliceProvider;
|
||||
|
||||
import java.util.List;
|
||||
@@ -48,6 +50,12 @@ public interface DeviceIndexFeatureProvider {
|
||||
|
||||
default void updateIndex(Context context, boolean force) {
|
||||
if (!isIndexingEnabled()) {
|
||||
Log.w(TAG, "Skipping: device index is not enabled");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!Utils.isDeviceProvisioned(context)) {
|
||||
Log.w(TAG, "Skipping: device is not provisioned");
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user