Clean up the legacy anomaly detection mechanism in the Settings
Clean up the legacy anomaly detection mechanism in the Settings, which is implemented in the 2017-2018. The will be replaced by the new anomaly detection mechanism. Bug: n/a Test: make -j64 RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.fuelgauge" Change-Id: Id5b5f4987c205c45698b6aa25aeb9604479e79c6
This commit is contained in:
@@ -38,7 +38,6 @@ import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.settings.applications.ProcStatsData;
|
||||
import com.android.settings.datausage.lib.DataUsageLib;
|
||||
import com.android.settings.fuelgauge.batterytip.AnomalyConfigJobService;
|
||||
import com.android.settings.network.MobileNetworkRepository;
|
||||
import com.android.settingslib.net.DataUsageController;
|
||||
|
||||
@@ -99,7 +98,6 @@ public class SettingsDumpService extends Service {
|
||||
dump.put(KEY_DATAUSAGE, dumpDataUsage());
|
||||
dump.put(KEY_MEMORY, dumpMemory());
|
||||
dump.put(KEY_DEFAULT_BROWSER_APP, dumpDefaultBrowser());
|
||||
dump.put(KEY_ANOMALY_DETECTION, dumpAnomalyDetection());
|
||||
} catch (Exception e) {
|
||||
Log.w(TAG, "exception in dump: ", e);
|
||||
}
|
||||
@@ -197,20 +195,6 @@ public class SettingsDumpService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
JSONObject dumpAnomalyDetection() throws JSONException {
|
||||
final JSONObject obj = new JSONObject();
|
||||
final SharedPreferences sharedPreferences = getSharedPreferences(
|
||||
AnomalyConfigJobService.PREF_DB,
|
||||
Context.MODE_PRIVATE);
|
||||
final int currentVersion = sharedPreferences.getInt(
|
||||
AnomalyConfigJobService.KEY_ANOMALY_CONFIG_VERSION,
|
||||
0 /* defValue */);
|
||||
obj.put("anomaly_config_version", String.valueOf(currentVersion));
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
private void dumpMobileNetworkSettings(IndentingPrintWriter writer) {
|
||||
MobileNetworkRepository.getInstance(this).dump(writer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user