/frameworks/base/core/tests/coretests/src/android/util/ |
D | TypedValueTest.kt | 148 val metrics: DisplayMetrics = mock(DisplayMetrics::class.java) in <lambda>() constant 149 metrics.density = 3.25f in <lambda>() 151 val height = 52 * metrics.density in <lambda>() 154 widthFloat / metrics.density, in <lambda>() 157 val widthPx = TypedValue.complexToDimensionPixelSize(widthDimen, metrics) in <lambda>() 164 val metrics: DisplayMetrics = mock(DisplayMetrics::class.java) in <lambda>() constant 166 metrics.density = 1f in <lambda>() 167 metrics.xdpi = 2f in <lambda>() 168 metrics.scaledDensity = fontScale * metrics.density in <lambda>() 169 metrics.fontScaleConverter = null in <lambda>() [all …]
|
/frameworks/av/drm/libmediadrm/tests/ |
D | DrmMetrics_test.cpp | 60 MediaDrmMetrics metrics; in TEST_F() local 64 consumer.consumeFrameworkMetrics(metrics); in TEST_F() 69 MediaDrmMetrics metrics; in TEST_F() local 71 metrics.mOpenSessionCounter.Increment(OK); in TEST_F() 72 metrics.mCloseSessionCounter.Increment(OK); in TEST_F() 75 EventTimer<status_t> get_key_request_timer(&metrics.mGetKeyRequestTimeUs); in TEST_F() 77 &metrics.mProvideKeyResponseTimeUs); in TEST_F() 82 metrics.mGetProvisionRequestCounter.Increment(OK); in TEST_F() 83 metrics.mProvideProvisionResponseCounter.Increment(OK); in TEST_F() 84 metrics.mGetDeviceUniqueIdCounter.Increment(OK); in TEST_F() [all …]
|
/frameworks/base/core/java/android/util/ |
D | TypedValue.java | 305 public static float complexToDimension(int data, DisplayMetrics metrics) in complexToDimension() argument 310 metrics); in complexToDimension() 330 DisplayMetrics metrics) in complexToDimensionPixelOffset() argument 335 metrics); in complexToDimensionPixelOffset() 357 DisplayMetrics metrics) in complexToDimensionPixelSize() argument 363 metrics); in complexToDimensionPixelSize() 376 public static float complexToDimensionNoisy(int data, DisplayMetrics metrics) in complexToDimensionNoisy() argument 378 return complexToDimension(data, metrics); in complexToDimensionNoisy() 422 DisplayMetrics metrics) in applyDimension() argument 428 return value * metrics.density; in applyDimension() [all …]
|
/frameworks/av/drm/libmediadrm/ |
D | DrmMetricsConsumer.cpp | 57 PersistableBundle *metrics) { in ExportCounterMetric() argument 58 if (!metrics) { in ExportCounterMetric() 68 metrics->putLong(android::String16(success_count_name.c_str()), in ExportCounterMetric() 72 metrics->getLong(android::String16(error_count_name.c_str()), in ExportCounterMetric() 74 metrics->putLong(android::String16(error_count_name.c_str()), in ExportCounterMetric() 81 metrics->putLongVector(android::String16(error_list_name.c_str()), in ExportCounterMetric() 88 …onst android::CounterMetric<T> &counter, const std::string &typeName, PersistableBundle *metrics) { in ExportCounterMetricWithAttributeNames() argument 89 if (!metrics) { in ExportCounterMetricWithAttributeNames() 96 metrics->putLong(android::String16(name.c_str()), value); in ExportCounterMetricWithAttributeNames() 102 PersistableBundle *metrics) { in ExportEventMetric() argument [all …]
|
D | DrmMetrics.cpp | 91 DrmFrameworkMetrics metrics; in GetSerializedMetrics() local 96 metrics.add_open_session_counter(); in GetSerializedMetrics() 104 metrics.add_close_session_counter(); in GetSerializedMetrics() 112 metrics.add_get_provisioning_request_counter(); in GetSerializedMetrics() 120 metrics.add_provide_provisioning_response_counter(); in GetSerializedMetrics() 128 metrics.add_key_status_change_counter(); in GetSerializedMetrics() 136 metrics.add_event_callback_counter(); in GetSerializedMetrics() 144 metrics.add_get_device_unique_id_counter(); in GetSerializedMetrics() 152 metrics.add_get_key_request_time_us(); in GetSerializedMetrics() 164 metrics.add_provide_key_response_time_us(); in GetSerializedMetrics() [all …]
|
/frameworks/opt/car/services/updatableServices/src/com/android/internal/car/updatable/ |
D | UserMetrics.java | 143 UserStartingMetric metrics = getExistingMetricsLocked(mUserStartingMetrics, toUserId); in onUserSwitchingEventLocked() local 144 if (metrics == null) return; in onUserSwitchingEventLocked() 146 metrics.switchFromUserId = fromUserId; in onUserSwitchingEventLocked() 147 metrics.switchTime = timestampMs; in onUserSwitchingEventLocked() 151 UserStartingMetric metrics = getExistingMetricsLocked(mUserStartingMetrics, userId); in onUserUnlockingEventLocked() local 152 if (metrics == null) return; in onUserUnlockingEventLocked() 154 metrics.unlockingTime = timestampMs; in onUserUnlockingEventLocked() 158 UserStartingMetric metrics = getExistingMetricsLocked(mUserStartingMetrics, userId); in onUserUnlockedEventLocked() local 159 if (metrics == null) return; in onUserUnlockedEventLocked() 161 metrics.unlockedTime = timestampMs; in onUserUnlockedEventLocked() [all …]
|
/frameworks/base/core/java/android/text/ |
D | BoringLayout.java | 63 Alignment align, float spacingMult, float spacingAdd, BoringLayout.Metrics metrics, in make() argument 65 return new BoringLayout(source, paint, outerWidth, align, spacingMult, spacingAdd, metrics, in make() 89 Alignment align, float spacingmult, float spacingadd, BoringLayout.Metrics metrics, in make() argument 91 return new BoringLayout(source, paint, outerWidth, align, spacingmult, spacingadd, metrics, in make() 123 @NonNull Alignment align, @NonNull BoringLayout.Metrics metrics, in make() argument 126 return new BoringLayout(source, paint, outerWidth, align, 1f, 0f, metrics, includePad, in make() 147 Alignment align, float spacingMult, float spacingAdd, BoringLayout.Metrics metrics, in replaceOrMake() argument 156 init(source, paint, align, metrics, includePad, true, false /* useFallbackLineSpacing */); in replaceOrMake() 189 @NonNull Alignment align, @NonNull BoringLayout.Metrics metrics, boolean includePad, in replaceOrMake() argument 192 return replaceOrMake(source, paint, outerWidth, align, 1.0f, 0.0f, metrics, includePad, in replaceOrMake() [all …]
|
/frameworks/base/media/java/android/media/metrics/ |
D | IMediaMetricsManager.aidl | 17 package android.media.metrics; 19 import android.media.metrics.EditingEndedEvent; 20 import android.media.metrics.NetworkEvent; 21 import android.media.metrics.PlaybackErrorEvent; 22 import android.media.metrics.PlaybackMetrics; 23 import android.media.metrics.PlaybackStateEvent; 24 import android.media.metrics.TrackChangeEvent; 32 void reportPlaybackMetrics(in String sessionId, in PlaybackMetrics metrics, int userId); in reportPlaybackMetrics() argument 46 void reportBundleMetrics(in String sessionId, in PersistableBundle metrics, int userId); in reportBundleMetrics() argument
|
/frameworks/base/services/core/java/com/android/server/pm/dex/ |
D | OdsignStatsLogger.java | 66 String[] metrics = line.split(" "); in writeStats() local 68 if (line.isEmpty() || metrics.length < 1) { in writeStats() 73 switch (metrics[0]) { in writeStats() 75 if (metrics.length != 4) { in writeStats() 80 boolean currentArtifactsOk = metrics[1].equals("1"); in writeStats() 81 boolean compOsPendingArtifactsExists = metrics[2].equals("1"); in writeStats() 82 boolean useCompOsGeneratedArtifacts = metrics[3].equals("1"); in writeStats() 90 if (metrics.length != 2) { in writeStats() 96 int status = Integer.parseInt(metrics[1]); in writeStats()
|
/frameworks/base/core/tests/coretests/src/android/app/admin/ |
D | PasswordMetricsTest.java | 76 PasswordMetrics metrics = new PasswordMetrics(credType, length, letters, upperCase, in testParceling() local 79 metrics.writeToParcel(parcel, 0); in testParceling() 81 metrics = PasswordMetrics.CREATOR.createFromParcel(parcel); in testParceling() 86 assertEquals(credType, metrics.credType); in testParceling() 87 assertEquals(length, metrics.length); in testParceling() 88 assertEquals(letters, metrics.letters); in testParceling() 89 assertEquals(upperCase, metrics.upperCase); in testParceling() 90 assertEquals(lowerCase, metrics.lowerCase); in testParceling() 91 assertEquals(numeric, metrics.numeric); in testParceling() 92 assertEquals(symbols, metrics.symbols); in testParceling() [all …]
|
/frameworks/proto_logging/stats/express/libexpresscatalog/ |
D | catalog.cpp | 58 bool readMetrics(const fs::path& cfgFile, map<string, ExpressMetric>& metrics) { in readMetrics() argument 87 if (metrics.find(metric.id()) != metrics.end()) { in readMetrics() 92 metrics[metric.id()] = metric; in readMetrics() 100 bool readCatalog(const char* configDir, map<string, ExpressMetric>& metrics) { in readCatalog() argument 114 if (!readMetrics(entry, metrics)) { in readCatalog() 125 bool generateMetricsIds(const map<string, ExpressMetric>& metrics, MetricInfoMap& metricsIds) { in generateMetricsIds() argument 129 for (const auto& [metricId, expressMetric] : metrics) { in generateMetricsIds()
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
D | RenderAction.java | 137 DisplayMetrics metrics = new DisplayMetrics(); in init() local 138 metrics.densityDpi = metrics.noncompatDensityDpi = in init() 141 metrics.density = metrics.noncompatDensity = in init() 142 metrics.densityDpi / (float) DisplayMetrics.DENSITY_DEFAULT; in init() 144 metrics.scaledDensity = metrics.noncompatScaledDensity = metrics.density; in init() 146 metrics.widthPixels = metrics.noncompatWidthPixels = hardwareConfig.getScreenWidth(); in init() 147 metrics.heightPixels = metrics.noncompatHeightPixels = hardwareConfig.getScreenHeight(); in init() 148 metrics.xdpi = metrics.noncompatXdpi = hardwareConfig.getXdpi(); in init() 149 metrics.ydpi = metrics.noncompatYdpi = hardwareConfig.getYdpi(); in init() 158 mContext = new BridgeContext(mParams.getProjectKey(), metrics, resources, in init()
|
D | SysUiOverlay.java | 59 private static float dpToPx(DisplayMetrics metrics, float value) { in dpToPx() argument 60 return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_PX, value, metrics); in dpToPx() 67 DisplayMetrics metrics = context.getResources().getDisplayMetrics(); in SysUiOverlay() local 69 float cornerSizePx = dpToPx(metrics, cornerSizeDp); in SysUiOverlay() 70 float radiusPx = dpToPx(metrics, radiusDp); in SysUiOverlay() 72 float topNotchWidthPx = dpToPx(metrics, topNotchWidthDp); in SysUiOverlay() 73 float bottomNotchWidthPx = dpToPx(metrics, bottomNotchWidthDp); in SysUiOverlay() 74 float notchHeightPx = dpToPx(metrics, notchHeightDp); in SysUiOverlay()
|
/frameworks/base/services/core/java/com/android/server/media/metrics/ |
D | MediaMetricsManagerService.java | 17 package com.android.server.media.metrics; 24 import android.media.metrics.BundleSession; 25 import android.media.metrics.EditingEndedEvent; 26 import android.media.metrics.IMediaMetricsManager; 27 import android.media.metrics.MediaItemInfo; 28 import android.media.metrics.NetworkEvent; 29 import android.media.metrics.PlaybackErrorEvent; 30 import android.media.metrics.PlaybackMetrics; 31 import android.media.metrics.PlaybackStateEvent; 32 import android.media.metrics.TrackChangeEvent; [all …]
|
/frameworks/base/core/tests/coretests/src/android/window/ |
D | WindowMetricsHelperTest.java | 71 final WindowMetrics metrics = activity.getWindowManager().getCurrentWindowMetrics(); in testGetBoundsExcludingNavigationBarAndCutoutMatchesDisplayGetSize() local 73 .getBoundsExcludingNavigationBarAndCutout(metrics); in testGetBoundsExcludingNavigationBarAndCutoutMatchesDisplayGetSize() 88 final WindowMetrics metrics = activity.getWindowManager().getCurrentWindowMetrics(); in testGetBoundsExcludingNavigationBarAndCutout() local 90 .getBoundsExcludingNavigationBarAndCutout(metrics); in testGetBoundsExcludingNavigationBarAndCutout() 92 final WindowInsets windowInsets = metrics.getWindowInsets(); in testGetBoundsExcludingNavigationBarAndCutout() 93 final Rect expectedBounds = new Rect(metrics.getBounds()); in testGetBoundsExcludingNavigationBarAndCutout()
|
/frameworks/libs/systemui/toruslib/torus-utils/src/main/java/com/google/android/torus/utils/display/ |
D | DisplayUtils.kt | 117 val metrics = DisplayMetrics() in getSmallestDisplayWidthDp() constant 133 display.getRealMetrics(metrics) in getSmallestDisplayWidthDp() 135 minOf(metrics.widthPixels, metrics.heightPixels).toFloat(), in getSmallestDisplayWidthDp() 136 metrics in getSmallestDisplayWidthDp()
|
/frameworks/base/apct-tests/perftests/core/src/android/text/ |
D | BoringLayoutCreateDrawPerfTest.java | 93 final BoringLayout.Metrics metrics = BoringLayout.isBoring(text, mTextPaint); in timeCreate() local 94 if (mCached) createLayout(text, metrics); in timeCreate() 102 createLayout(text, metrics); in timeCreate() 117 final BoringLayout.Metrics metrics = BoringLayout.isBoring(text, mTextPaint); in timeDraw() local 118 final Layout layout = createLayout(text, metrics); in timeDraw() 147 BoringLayout.Metrics metrics) { in createLayout() argument 149 ALIGN_NORMAL, SPACING_MULT, SPACING_ADD, metrics, true /*includePad*/); in createLayout()
|
/frameworks/base/services/tests/vibrator/src/com/android/server/vibrator/ |
D | VibratorManagerServiceTest.java | 2242 VibrationStats.StatsInfo metrics = argumentCaptor.getValue(); in frameworkStats_waveformVibration_reportsAllMetrics() local 2243 assertEquals(UID, metrics.uid); in frameworkStats_waveformVibration_reportsAllMetrics() 2245 metrics.vibrationType); in frameworkStats_waveformVibration_reportsAllMetrics() 2246 assertEquals(VibrationAttributes.USAGE_RINGTONE, metrics.usage); in frameworkStats_waveformVibration_reportsAllMetrics() 2247 assertEquals(Vibration.Status.FINISHED.getProtoEnumValue(), metrics.status); in frameworkStats_waveformVibration_reportsAllMetrics() 2248 assertTrue("Total duration was too low, " + metrics.totalDurationMillis + "ms", in frameworkStats_waveformVibration_reportsAllMetrics() 2249 metrics.totalDurationMillis >= 20); in frameworkStats_waveformVibration_reportsAllMetrics() 2250 assertTrue("Vibrator ON duration was too low, " + metrics.vibratorOnMillis + "ms", in frameworkStats_waveformVibration_reportsAllMetrics() 2251 metrics.vibratorOnMillis >= 20); in frameworkStats_waveformVibration_reportsAllMetrics() 2254 assertEquals(0, metrics.repeatCount); in frameworkStats_waveformVibration_reportsAllMetrics() [all …]
|
/frameworks/proto_logging/stats/express/expresscatalogvalidator/ |
D | main.cpp | 24 std::map<std::string, ExpressMetric> metrics; in TEST() local 25 ASSERT_TRUE(readCatalog("./catalog/", metrics)); in TEST() 28 ASSERT_TRUE(generateMetricsIds(metrics, metricsIds)); in TEST()
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ |
D | NavigationBar.java | 133 DisplayMetrics metrics = context.getMetrics(); in getShortestWidth() local 134 float sw = metrics.widthPixels < metrics.heightPixels ? in getShortestWidth() 135 metrics.widthPixels : metrics.heightPixels; in getShortestWidth() 136 sw /= metrics.density; in getShortestWidth()
|
/frameworks/rs/ |
D | rsScriptC_LibGL.cpp | 225 static void SetMetrics(Font::Rect *metrics, in SetMetrics() argument 228 *left = metrics->left; in SetMetrics() 231 *right = metrics->right; in SetMetrics() 234 *top = metrics->top; in SetMetrics() 237 *bottom = metrics->bottom; in SetMetrics() 246 Font::Rect metrics; in rsrMeasureTextAlloc() local 247 rsc->mStateFont.measureText(text, textLen, &metrics); in rsrMeasureTextAlloc() 248 SetMetrics(&metrics, left, right, top, bottom); in rsrMeasureTextAlloc() 255 Font::Rect metrics; in rsrMeasureText() local 256 rsc->mStateFont.measureText(text, textLen, &metrics); in rsrMeasureText() [all …]
|
/frameworks/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/ |
D | BridgeContextTest.java | 74 DisplayMetrics metrics = new DisplayMetrics(); in basic() local 76 … BridgeContext context = new BridgeContext(params.getProjectKey(), metrics, params.getResources(), in basic() 121 DisplayMetrics metrics = new DisplayMetrics(); in checkNoErrorWhenUsingDefaults() local 123 … BridgeContext context = new BridgeContext(params.getProjectKey(), metrics, params.getResources(), in checkNoErrorWhenUsingDefaults() 154 DisplayMetrics metrics = new DisplayMetrics(); in noExceptionForCustomService() local 156 … BridgeContext context = new BridgeContext(params.getProjectKey(), metrics, params.getResources(), in noExceptionForCustomService() 175 DisplayMetrics metrics = new DisplayMetrics(); in dynamicTheming() local 177 … BridgeContext context = new BridgeContext(params.getProjectKey(), metrics, params.getResources(), in dynamicTheming() 206 DisplayMetrics metrics = new DisplayMetrics(); in noCrashInPowerManager() local 209 …new BridgeContext(params.getProjectKey(), metrics, params.getResources(), params.getAssets(), para… in noCrashInPowerManager() [all …]
|
/frameworks/base/services/core/java/com/android/server/connectivity/ |
D | IpConnectivityEventBuilder.java | 28 import android.net.metrics.ApfProgramEvent; 29 import android.net.metrics.ApfStats; 30 import android.net.metrics.ConnectStats; 31 import android.net.metrics.DefaultNetworkEvent; 32 import android.net.metrics.DhcpClientEvent; 33 import android.net.metrics.DhcpErrorEvent; 34 import android.net.metrics.DnsEvent; 35 import android.net.metrics.IpManagerEvent; 36 import android.net.metrics.IpReachabilityEvent; 37 import android.net.metrics.NetworkEvent; [all …]
|
/frameworks/base/libs/hwui/jni/ |
D | Paint.cpp | 602 static SkScalar getMetricsInternal(jlong paintHandle, SkFontMetrics* metrics, bool useLocale) { in getMetricsInternal() argument 616 SkScalar spacing = font->getMetrics(metrics); in getMetricsInternal() 624 metrics->fTop = -size * kElegantTop / 2048; in getMetricsInternal() 625 metrics->fBottom = -size * kElegantBottom / 2048; in getMetricsInternal() 626 metrics->fAscent = -size * kElegantAscent / 2048; in getMetricsInternal() 627 metrics->fDescent = -size * kElegantDescent / 2048; in getMetricsInternal() 628 metrics->fLeading = size * kElegantLeading / 2048; in getMetricsInternal() 629 spacing = metrics->fDescent - metrics->fAscent + metrics->fLeading; in getMetricsInternal() 636 metrics->fAscent = std::min(extent.ascent, metrics->fAscent); in getMetricsInternal() 637 metrics->fDescent = std::max(extent.descent, metrics->fDescent); in getMetricsInternal() [all …]
|
/frameworks/base/apct-tests/perftests/windowmanager/src/android/wm/ |
D | InTaskTransitionTest.java | 84 for (TransitionMetricsReader.TransitionMetrics metrics : mMetricsReader.getMetrics()) { in testStartActivityInSameTask() 85 if (metrics.mTransitionDelayMs > 0) { in testStartActivityInSameTask() 86 state.addExtraResult("transitionDelayMs", metrics.mTransitionDelayMs); in testStartActivityInSameTask() 88 if (metrics.mWindowsDrawnDelayMs > 0) { in testStartActivityInSameTask() 89 state.addExtraResult("windowsDrawnDelayMs", metrics.mWindowsDrawnDelayMs); in testStartActivityInSameTask()
|