Set preference invisible when no anomaly

In the previous code path, we will create an invisible anomaly preference
and update it to visible if it contains any anomaly. However, when
anomaly is dismissed we don't reset preference to invisible.

So, this cl adds code to set it to invisible explicitly when anomaly list
is empty.

Bug: 64617126
Test: RunSettingsRoboTests
Change-Id: Ie7a3498da91243f05f4c47fb1cc5f67b177d04b1
This commit is contained in:
jackqdyulei
2017-08-15 11:01:07 -07:00
parent 882d35715e
commit 4242ee0dd4
2 changed files with 12 additions and 0 deletions

View File

@@ -102,6 +102,8 @@ public class AnomalySummaryPreferenceController {
mAnomalyPreference.setTitle(title);
mAnomalyPreference.setSummary(summary);
} else {
mAnomalyPreference.setVisible(false);
}
}