Only update anomaly icon in AnomalyLoader

Before this cl, it will re-calculate battery percentage once we get
anomaly data, which will add screen usage data twice. This cl make it
only update anomaly icon after the anomaly detection is done.

Bug: 62803379
Test: RunSettingsRoboTests
Change-Id: I2089646679e299fa948b1f3ed21f4a13a1317aa3
This commit is contained in:
jackqdyulei
2017-06-19 17:01:47 -07:00
parent 2de5ab35f8
commit 27792b2356
3 changed files with 48 additions and 7 deletions

View File

@@ -25,6 +25,7 @@ import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.android.settings.R;
import com.android.settings.TintablePreference;
import com.android.settings.Utils;
@@ -96,6 +97,10 @@ public class PowerGaugePreference extends TintablePreference {
notifyChanged();
}
public boolean showAnomalyIcon() {
return mShowAnomalyIcon;
}
BatteryEntry getInfo() {
return mInfo;
}