OSDN Git Service

Fix randomly showing anomaly icon
authorjackqdyulei <jackqdyulei@google.com>
Fri, 5 May 2017 01:02:14 +0000 (18:02 -0700)
committerjackqdyulei <jackqdyulei@google.com>
Fri, 5 May 2017 01:08:31 +0000 (18:08 -0700)
commit3bd2420911783212e5b6031bed9afbfc17d57e7b
tree2b935b07b93630e94f67b97d1025d4eea531bcea
parent5a24c1b84ce8314850b29a17f18a5ff06f130324
Fix randomly showing anomaly icon

Sometimes PowerGaugePreference will show anomaly icon when they
shouldn't. I think it is because PreferenceViewHolder has cache
about the previous data.

This cl fixes it by setting compound drawable as 0 when
showAnomalyIcon is false.

Bug: 36924669
Test: RunSettingsRoboTests
Change-Id: I5ea0dc307aafcce386c84963e618d1213de5ec19
src/com/android/settings/fuelgauge/PowerGaugePreference.java
tests/robotests/src/com/android/settings/fuelgauge/PowerGaugePreferenceTest.java