Add cache mechanism to improve icon and label loading performance
Bug: 185207505 Test: make SettingsRoboTests Test: make SettingsGoogleRoboTests Change-Id: I73dba5e40783f9ef4cfc0c4c33ea56b12754535d
This commit is contained in:
@@ -255,7 +255,8 @@ public class BatteryChartView extends AppCompatImageView implements View.OnClick
|
||||
private int getTrapezoidIndex(float x) {
|
||||
for (int index = 0; index < mTrapezoidSlot.length; index++) {
|
||||
final TrapezoidSlot slot = mTrapezoidSlot[index];
|
||||
if (x >= slot.mLeft && x <= slot.mRight) {
|
||||
if (x >= slot.mLeft - mTrapezoidHOffset
|
||||
&& x <= slot.mRight + mTrapezoidHOffset) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user