From 9dc7f45725debe44581e5bef328d68f1d704fb14 Mon Sep 17 00:00:00 2001 From: alinasuarez Date: Fri, 6 Aug 2021 03:55:12 +0000 Subject: [PATCH] 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 --- src/com/android/settings/development/tare/TareHomePage.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/com/android/settings/development/tare/TareHomePage.java b/src/com/android/settings/development/tare/TareHomePage.java index e78467a8942..38e7ed8d519 100644 --- a/src/com/android/settings/development/tare/TareHomePage.java +++ b/src/com/android/settings/development/tare/TareHomePage.java @@ -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 */