Don't persist device index job across reboot
Change-Id: I9bd25c7f266dded730918ec517e842c2b6ee9b1a
Fixes: 115930605
Test: manual
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index ffce321..ea2370c 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -648,7 +648,6 @@
PackageManager pm = getPackageManager();
final UserManager um = UserManager.get(this);
final boolean isAdmin = um.isAdminUser();
- final FeatureFactory featureFactory = FeatureFactory.getFactory(this);
boolean somethingChanged = false;
final String packageName = getPackageName();
final StringBuilder changedList = new StringBuilder();
@@ -661,7 +660,6 @@
pm.hasSystemFeature(PackageManager.FEATURE_BLUETOOTH), isAdmin)
|| somethingChanged;
-
// Enable DataUsageSummaryActivity if the data plan feature flag is turned on otherwise
// enable DataPlanUsageSummaryActivity.
somethingChanged = setTileEnabled(changedList,
diff --git a/src/com/android/settings/search/DeviceIndexFeatureProvider.java b/src/com/android/settings/search/DeviceIndexFeatureProvider.java
index a55fcff..f777f71 100644
--- a/src/com/android/settings/search/DeviceIndexFeatureProvider.java
+++ b/src/com/android/settings/search/DeviceIndexFeatureProvider.java
@@ -105,7 +105,7 @@
// soon as possible.
context.getSystemService(JobScheduler.class).schedule(
new JobInfo.Builder(jobId, jobComponent)
- .setPersisted(true)
+ .setPersisted(false)
.setMinimumLatency(1000)
.setOverrideDeadline(1)
.build());