Home
last modified time | relevance | path

Searched refs:percentage (Results 1 – 25 of 31) sorted by relevance

12

/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
DUtils.java151 public static String formatPercentage(double percentage, boolean round) { in formatPercentage() argument
152 final int localPercentage = round ? Math.round((float) percentage) : (int) percentage; in formatPercentage()
162 public static String formatPercentage(int percentage) { in formatPercentage() argument
163 return formatPercentage(((double) percentage) / 100.0); in formatPercentage()
167 public static String formatPercentage(double percentage) { in formatPercentage() argument
168 return NumberFormat.getPercentInstance().format(percentage); in formatPercentage()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/
DUtilsTest.java109 final String percentage = Utils.formatPercentage(TEST_PERCENTAGES[i], true); in testFormatPercentage_RoundTrue_RoundUpIfPossible() local
110 assertThat(percentage).isEqualTo(expectedPercentages[i]); in testFormatPercentage_RoundTrue_RoundUpIfPossible()
121 final String percentage = Utils.formatPercentage(TEST_PERCENTAGES[i], false); in testFormatPercentage_RoundFalse_NoRound() local
122 assertThat(percentage).isEqualTo(expectedPercentages[i]); in testFormatPercentage_RoundFalse_NoRound()
/frameworks/base/cmds/uiautomator/library/core-src/com/android/uiautomator/core/
DUiObject.java930 float percentage = percent / 100f; in pinchOut() local
946 Point endPoint1 = new Point(rect.centerX() - (int)((rect.width()/2) * percentage), in pinchOut()
948 Point endPoint2 = new Point(rect.centerX() + (int)((rect.width()/2) * percentage), in pinchOut()
968 float percentage = percent / 100f; in pinchIn() local
979 Point startPoint1 = new Point(rect.centerX() - (int)((rect.width()/2) * percentage), in pinchIn()
981 Point startPoint2 = new Point(rect.centerX() + (int)((rect.width()/2) * percentage), in pinchIn()
/frameworks/av/media/libmediaplayer2/nuplayer2/
DGenericSource2.cpp1366 void NuPlayer2::GenericSource2::notifyBufferingUpdate(int32_t percentage) { in notifyBufferingUpdate() argument
1371 if (percentage < mPrevBufferPercentage) { in notifyBufferingUpdate()
1372 percentage = mPrevBufferPercentage; in notifyBufferingUpdate()
1373 } else if (percentage > 100) { in notifyBufferingUpdate()
1374 percentage = 100; in notifyBufferingUpdate()
1377 mPrevBufferPercentage = percentage; in notifyBufferingUpdate()
1379 ALOGV("notifyBufferingUpdate: buffering %d%%", percentage); in notifyBufferingUpdate()
1383 notify->setInt32("percentage", percentage); in notifyBufferingUpdate()
1414 int percentage = 100.0 * cachedPosUs / mDurationUs; in onPollBuffering() local
1415 if (percentage > 100) { in onPollBuffering()
[all …]
DHTTPLiveSource2.cpp418 int32_t percentage; in onSessionNotify() local
419 CHECK(msg->findInt32("percentage", &percentage)); in onSessionNotify()
421 notify->setInt32("percentage", percentage); in onSessionNotify()
DGenericSource2.h226 void notifyBufferingUpdate(int32_t percentage);
DNuPlayer2.cpp2819 int32_t percentage; in onSourceNotify() local
2820 CHECK(msg->findInt32("percentage", &percentage)); in onSourceNotify()
2822 notifyListener(srcId, MEDIA2_BUFFERING_UPDATE, percentage, 0); in onSourceNotify()
/frameworks/av/media/libmediaplayerservice/nuplayer/
DGenericSource.cpp1522 void NuPlayer::GenericSource::notifyBufferingUpdate(int32_t percentage) { in notifyBufferingUpdate() argument
1527 if (percentage < mPrevBufferPercentage) { in notifyBufferingUpdate()
1528 percentage = mPrevBufferPercentage; in notifyBufferingUpdate()
1529 } else if (percentage > 100) { in notifyBufferingUpdate()
1530 percentage = 100; in notifyBufferingUpdate()
1533 mPrevBufferPercentage = percentage; in notifyBufferingUpdate()
1535 ALOGV("notifyBufferingUpdate: buffering %d%%", percentage); in notifyBufferingUpdate()
1539 notify->setInt32("percentage", percentage); in notifyBufferingUpdate()
1596 int percentage = 100.0 * cachedPosUs / mDurationUs; in onPollBuffering() local
1597 if (percentage > 100) { in onPollBuffering()
[all …]
DHTTPLiveSource.cpp416 int32_t percentage; in onSessionNotify() local
417 CHECK(msg->findInt32("percentage", &percentage)); in onSessionNotify()
419 notify->setInt32("percentage", percentage); in onSessionNotify()
DGenericSource.h226 void notifyBufferingUpdate(int32_t percentage);
DNuPlayer.cpp2596 int32_t percentage; in onSourceNotify() local
2597 CHECK(msg->findInt32("percentage", &percentage)); in onSourceNotify()
2599 notifyListener(MEDIA_BUFFERING_UPDATE, percentage, 0); in onSourceNotify()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/
DKeyguardIndicationController.java371 String percentage = NumberFormat.getPercentInstance() in updateIndication() local
373 mTextView.switchIndication(percentage); in updateIndication()
510 String percentage = NumberFormat.getPercentInstance() in computePowerIndication() local
520 percentage); in computePowerIndication()
527 return mContext.getResources().getString(chargingId, percentage); in computePowerIndication()
/frameworks/av/media/bufferpool/1.0/
DAccessorImpl.cpp241 int percentage(T base, S total) { in percentage() function
252 mStats.mBuffersInUse, percentage(mStats.mBuffersInUse, mStats.mBuffersCached), in ~BufferPool()
253 mStats.mTotalAllocations, percentage(mStats.mTotalRecycles, mStats.mTotalAllocations), in ~BufferPool()
255 percentage(mStats.mTotalTransfers - mStats.mTotalFetches, mStats.mTotalTransfers)); in ~BufferPool()
/frameworks/base/packages/SystemUI/src/com/android/systemui/power/
DPowerNotificationWarnings.java254 final String percentage = NumberFormat.getPercentInstance() in showWarningNotification() local
263 contentText = getHybridContentString(percentage); in showWarningNotification()
265 contentText = mContext.getString(R.string.battery_low_percent_format, percentage); in showWarningNotification()
325 private String getHybridContentString(String percentage) { in getHybridContentString() argument
329 percentage, in getHybridContentString()
/frameworks/av/media/libstagefright/httplive/
DLiveSession.cpp2269 void LiveSession::notifyBufferingUpdate(int32_t percentage) { in notifyBufferingUpdate() argument
2270 if (percentage < mPrevBufferPercentage) { in notifyBufferingUpdate()
2271 percentage = mPrevBufferPercentage; in notifyBufferingUpdate()
2272 } else if (percentage > 100) { in notifyBufferingUpdate()
2273 percentage = 100; in notifyBufferingUpdate()
2276 mPrevBufferPercentage = percentage; in notifyBufferingUpdate()
2278 ALOGV("notifyBufferingUpdate: percentage=%d%%", percentage); in notifyBufferingUpdate()
2282 notify->setInt32("percentage", percentage); in notifyBufferingUpdate()
DLiveSession.h305 void notifyBufferingUpdate(int32_t percentage);
/frameworks/av/media/bufferpool/2.0/
DAccessorImpl.cpp295 int percentage(T base, S total) { in percentage() function
308 mStats.mBuffersInUse, percentage(mStats.mBuffersInUse, mStats.mBuffersCached), in ~BufferPool()
309 mStats.mTotalAllocations, percentage(mStats.mTotalRecycles, mStats.mTotalAllocations), in ~BufferPool()
311 percentage(mStats.mTotalTransfers - mStats.mTotalFetches, mStats.mTotalTransfers)); in ~BufferPool()
/frameworks/base/core/proto/android/os/
Dcpuinfo.proto56 message CpuUsage { // unit is percentage %
/frameworks/hardware/interfaces/stats/1.0/
DIStats.hal45 * @param physicalDropDetected A PhysicalDropDetected struct with percentage
/frameworks/base/services/devicepolicy/java/com/android/server/devicepolicy/
DAbUpdateInstaller.java270 public void onStatusUpdate(int statusCode, float percentage) { in onStatusUpdate() argument
/frameworks/base/core/java/android/net/
DIConnectivityManager.aidl115 void reportInetCondition(int networkType, int percentage); in reportInetCondition() argument
/frameworks/base/core/proto/android/server/
Dpowermanagerservice.proto84 // The current battery level percentage.
86 // The battery level percentage at the time the dream started.
259 // If the battery level drops by this percentage and the user activity
/frameworks/base/services/core/java/com/android/server/power/batterysaver/
DBatterySaverStateMachine.java808 final String percentage = NumberFormat.getPercentInstance() in triggerStickyDisabledNotification() local
813 R.string.battery_saver_charged_notification_title, percentage), in triggerStickyDisabledNotification()
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/policy/
DBatteryControllerImpl.java220 String percentage = NumberFormat.getPercentInstance().format((double) mLevel / 100.0); in generateTimeRemainingString() local
/frameworks/base/core/java/com/android/internal/app/procstats/
DProcessState.java1021 final double percentage = (double) totals.totalTime / (double) totalTime * 100; in dumpProcessSummaryDetails() local
1023 if (percentage >= 0.005 || totals.numPss != 0) { in dumpProcessSummaryDetails()

12