Change the master code the same as tm-qpr-dev to avoid future merge conflicts.
Bug: 243746796 Test: manual Change-Id: I9c693a65ebbbe33c9d132131f832c26505a23a4e
This commit is contained in:
@@ -595,13 +595,14 @@ public class BatteryChartView extends AppCompatImageView implements View.OnClick
|
|||||||
|
|
||||||
// Searches the corresponding trapezoid index from x location.
|
// Searches the corresponding trapezoid index from x location.
|
||||||
private int getTrapezoidIndex(float x) {
|
private int getTrapezoidIndex(float x) {
|
||||||
if (mTrapezoidSlots != null) {
|
if (mTrapezoidSlots == null) {
|
||||||
for (int index = 0; index < mTrapezoidSlots.length; index++) {
|
return BatteryChartViewModel.SELECTED_INDEX_INVALID;
|
||||||
final TrapezoidSlot slot = mTrapezoidSlots[index];
|
}
|
||||||
if (x >= slot.mLeft - mTrapezoidHOffset
|
for (int index = 0; index < mTrapezoidSlots.length; index++) {
|
||||||
&& x <= slot.mRight + mTrapezoidHOffset) {
|
final TrapezoidSlot slot = mTrapezoidSlots[index];
|
||||||
return index;
|
if (x >= slot.mLeft - mTrapezoidHOffset
|
||||||
}
|
&& x <= slot.mRight + mTrapezoidHOffset) {
|
||||||
|
return index;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return BatteryChartViewModel.SELECTED_INDEX_INVALID;
|
return BatteryChartViewModel.SELECTED_INDEX_INVALID;
|
||||||
|
Reference in New Issue
Block a user