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:
@@ -74,6 +74,7 @@ public class TareHomePage extends Activity {
|
|||||||
Toast.makeText(this, R.string.tare_settings_reverted_toast, Toast.LENGTH_LONG).show();
|
Toast.makeText(this, R.string.tare_settings_reverted_toast, Toast.LENGTH_LONG).show();
|
||||||
Settings.Global.putString(getApplicationContext().getContentResolver(),
|
Settings.Global.putString(getApplicationContext().getContentResolver(),
|
||||||
Settings.Global.ENABLE_TARE, null);
|
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 */
|
/** Opens up the AlarmManager TARE policy page with its factors to view and edit */
|
||||||
|
Reference in New Issue
Block a user