Searched refs:trapezoidIndex (Results 1 – 4 of 4) sorted by relevance
70 void onSelect(int trapezoidIndex); in onSelect() argument269 final int trapezoidIndex = getTrapezoidIndex(mTouchUpEvent.getX()); in onClick() local271 if (trapezoidIndex == SELECTED_INDEX_INVALID in onClick()272 || !isValidToDraw(trapezoidIndex)) { in onClick()276 if (trapezoidIndex == mSelectedIndex) { in onClick()279 setSelectedIndex(trapezoidIndex); in onClick()537 private boolean isValidToDraw(int trapezoidIndex) { in isValidToDraw() argument539 && trapezoidIndex >= 0 in isValidToDraw()540 && trapezoidIndex < mLevels.length - 1 in isValidToDraw()541 && mLevels[trapezoidIndex] != 0 in isValidToDraw()[all …]
238 public void onSelect(int trapezoidIndex) { in onSelect() argument239 Log.d(TAG, "onChartSelect:" + trapezoidIndex); in onSelect()240 refreshUi(trapezoidIndex, /*isForce=*/ false); in onSelect()243 trapezoidIndex == BatteryChartView.SELECTED_INDEX_ALL in onSelect()324 boolean refreshUi(int trapezoidIndex, boolean isForce) { in refreshUi() argument328 || (mTrapezoidIndex == trapezoidIndex && !isForce)) { in refreshUi()332 trapezoidIndex, mBatteryIndexedMap.size(), isForce)); in refreshUi()334 mTrapezoidIndex = trapezoidIndex; in refreshUi()
253 final int trapezoidIndex = 1; in testRefreshUi_trapezoidIndexIsNotChanged_ignoreRefresh() local254 mBatteryChartPreferenceController.mTrapezoidIndex = trapezoidIndex; in testRefreshUi_trapezoidIndexIsNotChanged_ignoreRefresh()256 trapezoidIndex, /*isForce=*/ false)).isFalse(); in testRefreshUi_trapezoidIndexIsNotChanged_ignoreRefresh()261 final int trapezoidIndex = 1; in testRefreshUi_forceUpdate_refreshUi() local262 mBatteryChartPreferenceController.mTrapezoidIndex = trapezoidIndex; in testRefreshUi_forceUpdate_refreshUi()264 trapezoidIndex, /*isForce=*/ true)).isTrue(); in testRefreshUi_forceUpdate_refreshUi()280 final int trapezoidIndex = 1; in testRemoveAndCacheAllPrefs_emptyContent_ignoreRemoveAll() local284 trapezoidIndex, /*isForce=*/ true); in testRemoveAndCacheAllPrefs_emptyContent_ignoreRemoveAll()290 final int trapezoidIndex = 1; in testRemoveAndCacheAllPrefs_buildCacheAndRemoveAllPreference() local298 trapezoidIndex, /*isForce=*/ true); in testRemoveAndCacheAllPrefs_buildCacheAndRemoveAllPreference()
105 trapezoidIndex -> { in testSetSelectedIndex_invokesCallback()106 selectedIndex[0] = trapezoidIndex; in testSetSelectedIndex_invokesCallback()122 trapezoidIndex -> { in testSetSelectedIndex_sameIndex_notInvokesCallback()123 selectedIndex[0] = trapezoidIndex; in testSetSelectedIndex_sameIndex_notInvokesCallback()