From a6693df48dd3c25c90bba53d15be643b8083cb3e Mon Sep 17 00:00:00 2001 From: Kweku Adams Date: Wed, 23 Feb 2022 16:03:10 +0000 Subject: [PATCH] Reset all TARE constants. Reset all TARE constants, not just the enabled status, when a user clicks on "Reset to defaults." Bug: 158300259 Test: manual Change-Id: I5328c7790729e3358751e703271a6ffd386bb33f --- src/com/android/settings/development/tare/TareHomePage.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/com/android/settings/development/tare/TareHomePage.java b/src/com/android/settings/development/tare/TareHomePage.java index 38e7ed8d519..cea09540d60 100644 --- a/src/com/android/settings/development/tare/TareHomePage.java +++ b/src/com/android/settings/development/tare/TareHomePage.java @@ -69,11 +69,14 @@ public class TareHomePage extends Activity { } /** Reverts the TARE settings to the original default settings */ - // TODO: Establish default TARE values and make this method revert all settings back to default. public void revertSettings(View v) { Toast.makeText(this, R.string.tare_settings_reverted_toast, Toast.LENGTH_LONG).show(); Settings.Global.putString(getApplicationContext().getContentResolver(), Settings.Global.ENABLE_TARE, null); + Settings.Global.putString(getApplicationContext().getContentResolver(), + Settings.Global.TARE_ALARM_MANAGER_CONSTANTS, null); + Settings.Global.putString(getApplicationContext().getContentResolver(), + Settings.Global.TARE_JOB_SCHEDULER_CONSTANTS, null); setEnabled(Settings.Global.DEFAULT_ENABLE_TARE == SETTING_VALUE_ON); }