Update UI when TARE settings revert to default

When the TARE revert to default button is clicked, the TARE homepage
updates to the value of the DEFAULT_ENABLE_TARE global variable with this code.

Bug: 195543827

Test: Manual (Settings -> developer options -> TARE -> click revert to
default settings and see the page disabled)

Change-Id: Ia4d126d97ebfb35fbf831bb29cee302acad92e7c
This commit is contained in:
alinasuarez
2021-08-06 03:55:12 +00:00
parent e3e33471a9
commit 9dc7f45725

View File

@@ -74,6 +74,7 @@ public class TareHomePage extends Activity {
Toast.makeText(this, R.string.tare_settings_reverted_toast, Toast.LENGTH_LONG).show();
Settings.Global.putString(getApplicationContext().getContentResolver(),
Settings.Global.ENABLE_TARE, null);
setEnabled(Settings.Global.DEFAULT_ENABLE_TARE == SETTING_VALUE_ON);
}
/** Opens up the AlarmManager TARE policy page with its factors to view and edit */