/cts/tests/tests/media/src/android/media/cts/ |
D | MediaDrmMetricsTest.java | 70 PersistableBundle metrics = drm.getMetrics(); in testGetMetricsEmpty() local 71 assertNotNull(metrics); in testGetMetricsEmpty() 73 assertEquals(1, metrics.keySet().size()); in testGetMetricsEmpty() 75 assertTrue(metrics.keySet().contains(GOOGLE_CLEARKEY_VENDOR_ID)); in testGetMetricsEmpty() 97 PersistableBundle metrics = drm.getMetrics(); in testGetMetricsSession() local 98 assertNotNull(metrics); in testGetMetricsSession() 99 assertEquals(dumpBundleKeys(metrics), 5, metrics.keySet().size()); in testGetMetricsSession() 101 assertTrue(metrics.keySet().contains(GOOGLE_CLEARKEY_VENDOR_ID)); in testGetMetricsSession() 103 assertEquals(2, metrics.getLong( in testGetMetricsSession() 105 assertEquals(-1, metrics.getLong( in testGetMetricsSession() [all …]
|
D | MediaPlayerTestBase.java | 293 PersistableBundle metrics = mMediaPlayer.getMetrics(); in playLoadedVideo() local 294 if (metrics == null) { in playLoadedVideo() 296 } else if (metrics.isEmpty()) { in playLoadedVideo() 300 int size = metrics.size(); in playLoadedVideo() 301 Set<String> keys = metrics.keySet(); in playLoadedVideo() 310 String vmime = metrics.getString(MediaPlayer.MetricsConstants.MIME_TYPE_VIDEO, null); in playLoadedVideo() 311 String amime = metrics.getString(MediaPlayer.MetricsConstants.MIME_TYPE_AUDIO, null); in playLoadedVideo() 316 long duration = metrics.getLong(MediaPlayer.MetricsConstants.DURATION, -2); in playLoadedVideo() 320 long playing = metrics.getLong(MediaPlayer.MetricsConstants.PLAYING, -2); in playLoadedVideo()
|
D | MediaCodecTest.java | 938 PersistableBundle metrics = encoder.getMetrics(); in testDequeueSurface() local 939 if (metrics == null) { in testDequeueSurface() 941 } else if (metrics.isEmpty()) { in testDequeueSurface() 944 int encoding = metrics.getInt(MediaCodec.MetricsConstants.ENCODER, -1); in testDequeueSurface() 948 String theCodec = metrics.getString(MediaCodec.MetricsConstants.CODEC, null); in testDequeueSurface() 1011 PersistableBundle metrics = encoder.getMetrics(); in testReconfigureWithoutSurface() local 1012 if (metrics == null) { in testReconfigureWithoutSurface() 1014 } else if (metrics.isEmpty()) { in testReconfigureWithoutSurface() 1017 int encoding = metrics.getInt(MediaCodec.MetricsConstants.ENCODER, -1); in testReconfigureWithoutSurface() 1021 String theCodec = metrics.getString(MediaCodec.MetricsConstants.CODEC, null); in testReconfigureWithoutSurface() [all …]
|
/cts/tests/leanbackjank/src/android/leanbackjank/cts/ |
D | CtsJankTestBase.java | 37 private void printIntValueWithKey(String source, Bundle metrics, String key, in printIntValueWithKey() argument 39 if (!metrics.containsKey(key)) { in printIntValueWithKey() 42 … mLog.addValue(source, formatKeyForTestMetrics(key), metrics.getInt(key), resultType, resultUnit); in printIntValueWithKey() 45 private void printDoubleValueWithKey(String source, Bundle metrics, String key, in printDoubleValueWithKey() argument 47 if (!metrics.containsKey(key)) { in printDoubleValueWithKey() 50 mLog.addValue(source, formatKeyForTestMetrics(key), metrics.getDouble(key), resultType, in printDoubleValueWithKey() 59 public void afterTest(Bundle metrics) { in afterTest() argument 61 printDoubleValueWithKey(source, metrics, WindowContentFrameStatsMonitor.KEY_AVG_FPS, in afterTest() 63 printDoubleValueWithKey(source, metrics, in afterTest() 66 printIntValueWithKey(source, metrics, WindowContentFrameStatsMonitor.KEY_MAX_NUM_JANKY, in afterTest() [all …]
|
/cts/tests/tests/util/src/android/util/cts/ |
D | DisplayMetricsTest.java | 60 DisplayMetrics metrics = new DisplayMetrics(); in testDisplayMetricsOp() local 61 metrics.setTo(outMetrics); in testDisplayMetricsOp() 62 assertEquals(display.getHeight(), metrics.heightPixels); in testDisplayMetricsOp() 63 assertEquals(display.getWidth(), metrics.widthPixels); in testDisplayMetricsOp() 65 assertTrue((0.1 <= metrics.density) && (metrics.density <= 4)); in testDisplayMetricsOp() 66 assertTrue((0.1 <= metrics.scaledDensity) && (metrics.scaledDensity <= 4)); in testDisplayMetricsOp() 67 assertTrue(0 < metrics.xdpi); in testDisplayMetricsOp() 68 assertTrue(0 < metrics.ydpi); in testDisplayMetricsOp()
|
/cts/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/ |
D | ScreenDeviceInfo.java | 33 DisplayMetrics metrics = new DisplayMetrics(); in collectDeviceInfo() local 37 display.getRealMetrics(metrics); in collectDeviceInfo() 39 store.addResult("width_pixels", metrics.widthPixels); in collectDeviceInfo() 40 store.addResult("height_pixels", metrics.heightPixels); in collectDeviceInfo() 41 store.addResult("x_dpi", metrics.xdpi); in collectDeviceInfo() 42 store.addResult("y_dpi", metrics.ydpi); in collectDeviceInfo() 43 store.addResult("density", metrics.density); in collectDeviceInfo() 44 store.addResult("density_dpi", metrics.densityDpi); in collectDeviceInfo()
|
/cts/tests/vr/src/android/vr/cts/ |
D | VrDisplayTest.java | 87 DisplayMetrics metrics = new DisplayMetrics(); in testDisplayResolution() local 92 windowManager.getDefaultDisplay().getRealMetrics(metrics); in testDisplayResolution() 93 if (metrics.widthPixels > metrics.heightPixels) { in testDisplayResolution() 94 displayWidth = metrics.widthPixels; in testDisplayResolution() 95 displayHeight = metrics.heightPixels; in testDisplayResolution() 97 displayWidth = metrics.heightPixels; in testDisplayResolution() 98 displayHeight = metrics.widthPixels; in testDisplayResolution()
|
/cts/tests/leanbackjank/app/src/android/leanbackjank/app/ |
D | Utils.java | 91 DisplayMetrics metrics = new DisplayMetrics(); in overScan() local 92 activity.getWindowManager().getDefaultDisplay().getMetrics(metrics); in overScan() 93 int w = (int) (metrics.widthPixels * MediaDimensions.MEDIA_WIDTH); in overScan() 94 int h = (int) (metrics.heightPixels * MediaDimensions.MEDIA_HEIGHT); in overScan() 95 int marginLeft = (int) (metrics.widthPixels * MediaDimensions.MEDIA_LEFT_MARGIN); in overScan() 96 int marginTop = (int) (metrics.heightPixels * MediaDimensions.MEDIA_TOP_MARGIN); in overScan() 97 int marginRight = (int) (metrics.widthPixels * MediaDimensions.MEDIA_RIGHT_MARGIN); in overScan() 98 int marginBottom = (int) (metrics.heightPixels * MediaDimensions.MEDIA_BOTTOM_MARGIN); in overScan()
|
/cts/tests/tests/dpi/src/android/dpi/cts/ |
D | ConfigurationScreenLayoutTest.java | 125 DisplayMetrics metrics = new DisplayMetrics(); in reduceScreenLayout() local 126 display.getMetrics(metrics); in reduceScreenLayout() 128 int max = Math.max(metrics.widthPixels, metrics.heightPixels); in reduceScreenLayout() 129 int min = Math.min(metrics.widthPixels, metrics.heightPixels); in reduceScreenLayout() 130 int longSize = (int) (max / metrics.density); in reduceScreenLayout() 131 int shortSize = (int) (min / metrics.density); in reduceScreenLayout()
|
/cts/hostsidetests/atrace/src/android/atrace/cts/ |
D | PidTidPair.java | 28 Map<String, String> metrics = testRunResult.getRunMetrics(); in PidTidPair() local 29 pid = Integer.parseInt(metrics.get("AtraceDeviceTests_pid")); in PidTidPair() 30 tid = Integer.parseInt(metrics.get("AtraceDeviceTests_tid")); in PidTidPair()
|
/cts/tests/framework/base/windowmanager/src/android/server/wm/ |
D | ActivityManagerGetConfigTests.java | 227 private void checkResourceConfig(Configuration config, DisplayMetrics metrics, in checkResourceConfig() argument 230 if (metrics.widthPixels >= metrics.heightPixels) { in checkResourceConfig() 231 width = metrics.widthPixels; in checkResourceConfig() 232 height = metrics.heightPixels; in checkResourceConfig() 235 width = metrics.heightPixels; in checkResourceConfig() 237 height = metrics.widthPixels; in checkResourceConfig() 376 DisplayMetrics metrics = new DisplayMetrics(); in testDeviceConfig() local 377 display.getMetrics(metrics); in testDeviceConfig() 379 checkResourceConfig(config, metrics, globalConfig.resources); in testDeviceConfig() 380 checkDeviceConfig(metrics, globalConfig.device); in testDeviceConfig() [all …]
|
/cts/common/device-side/util/tests/src/com/android/compatibility/common/util/ |
D | DeviceReportTest.java | 84 String metrics = inst.mResults.getString(RESULT_KEY); in testSubmit() local 85 assertNotNull("Metrics missing", metrics); in testSubmit() 86 ReportLog result = ReportLog.parse(metrics); in testSubmit() 135 String metrics = metricsBuilder.toString().trim(); in testFile() local 136 JSONObject jsonObject = new JSONObject(metrics); in testFile() 147 metrics = metricsBuilder.toString().trim(); in testFile() 148 jsonObject = new JSONObject(metrics); in testFile()
|
/cts/common/device-side/util-axt/tests/src/com/android/compatibility/common/util/ |
D | DeviceReportTest.java | 84 String metrics = inst.mResults.getString(RESULT_KEY); in testSubmit() local 85 assertNotNull("Metrics missing", metrics); in testSubmit() 86 ReportLog result = ReportLog.parse(metrics); in testSubmit() 135 String metrics = metricsBuilder.toString().trim(); in testFile() local 136 JSONObject jsonObject = new JSONObject(metrics); in testFile() 147 metrics = metricsBuilder.toString().trim(); in testFile() 148 jsonObject = new JSONObject(metrics); in testFile()
|
/cts/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/ |
D | DeviceInfoInstrument.java | 94 DisplayMetrics metrics = new DisplayMetrics(); in onStart() local 98 d.getRealMetrics(metrics); in onStart() 99 addResult(RESOLUTION, String.format("%sx%s", metrics.widthPixels, metrics.heightPixels)); in onStart() 100 addResult(SCREEN_DENSITY, metrics.density); in onStart() 101 addResult(SCREEN_X_DENSITY, metrics.xdpi); in onStart() 102 addResult(SCREEN_Y_DENSITY, metrics.ydpi); in onStart() 104 String screenDensityBucket = getScreenDensityBucket(metrics); in onStart() 239 private String getScreenDensityBucket(DisplayMetrics metrics) { in getScreenDensityBucket() argument 240 switch (metrics.densityDpi) { in getScreenDensityBucket() 257 return "" + metrics.densityDpi; in getScreenDensityBucket()
|
/cts/hostsidetests/media/bitstreams/src/android/media/cts/bitstreams/ |
D | ReportProcessor.java | 22 import com.android.tradefed.metrics.proto.MetricMeasurement.Metric; 122 public void testEnded(TestDescription test, Map<String, String> metrics) { in testEnded() argument 123 mMetrics.putAll(metrics); in testEnded() 127 public void testEnded(TestDescription test, HashMap<String, Metric> metrics) { in testEnded() argument 128 for (Entry<String, Metric> e: metrics.entrySet()) { in testEnded()
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityGestureDetectorTest.java | 89 final DisplayMetrics metrics = new DisplayMetrics(); in setUp() local 90 windowManager.getDefaultDisplay().getRealMetrics(metrics); in setUp() 91 mCenter = new Point((int) metrics.widthPixels / 2, (int) metrics.heightPixels / 2); in setUp() 93 mStrokeLenPxX = (int) (GESTURE_LENGTH_INCHES * metrics.xdpi); in setUp() 94 mStrokeLenPxY = (int) (GESTURE_LENGTH_INCHES * metrics.ydpi); in setUp() 95 mScreenBigEnough = (metrics.widthPixels / (2 * metrics.xdpi) > GESTURE_LENGTH_INCHES); in setUp()
|
/cts/tests/autofillservice/src/android/autofillservice/cts/ |
D | DialogLauncherActivity.java | 75 final DisplayMetrics metrics = new DisplayMetrics(); in maximizeDialog() local 76 display.getMetrics(metrics); in maximizeDialog() 78 () -> mDialog.getWindow().setLayout(metrics.widthPixels, metrics.heightPixels)); in maximizeDialog()
|
/cts/tests/tests/text/src/android/text/cts/ |
D | BoringLayoutTest.java | 254 Metrics metrics = new Metrics(); in testIsBoringString() local 255 metrics.width = 100; in testIsBoringString() 256 assertNotNull(BoringLayout.isBoring("hello android", paint, metrics)); in testIsBoringString() 550 final Metrics metrics = new Metrics(); in createMetrics() local 552 metrics.top = top; in createMetrics() 553 metrics.ascent = ascent; in createMetrics() 554 metrics.descent = descent; in createMetrics() 555 metrics.bottom = bottom; in createMetrics() 556 metrics.width = width; in createMetrics() 557 metrics.leading = leading; in createMetrics() [all …]
|
/cts/hostsidetests/devicepolicy/src/com/android/cts/devicepolicy/ |
D | PasswordComplexityTest.java | 3 import static com.android.cts.devicepolicy.metrics.DevicePolicyEventLogVerifier.assertMetricsLogged; 7 import com.android.cts.devicepolicy.metrics.DevicePolicyEventWrapper;
|
D | AdbProvisioningTests.java | 21 import static com.android.cts.devicepolicy.metrics.DevicePolicyEventLogVerifier.assertMetricsLogged; 23 import com.android.cts.devicepolicy.metrics.DevicePolicyEventWrapper;
|
D | MixedDeviceOwnerTest.java | 19 import static com.android.cts.devicepolicy.metrics.DevicePolicyEventLogVerifier.assertMetricsLogged; 23 import com.android.cts.devicepolicy.metrics.DevicePolicyEventWrapper;
|
D | CrossProfileAppsHostSideTest.java | 3 import static com.android.cts.devicepolicy.metrics.DevicePolicyEventLogVerifier.assertMetricsLogged; 7 import com.android.cts.devicepolicy.metrics.DevicePolicyEventWrapper;
|
D | DeviceAndProfileOwnerHostSideTransferTest.java | 3 import static com.android.cts.devicepolicy.metrics.DevicePolicyEventLogVerifier.assertMetricsLogged; 5 import com.android.cts.devicepolicy.metrics.DevicePolicyEventWrapper;
|
/cts/tests/tests/slice/src/android/slice/cts/ |
D | SliceMetricsTest.java | 19 import android.metrics.LogMaker; 20 import android.metrics.MetricsReader;
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/projection/ |
D | ProjectionActivity.java | 65 … DisplayMetrics metrics = ProjectionActivity.this.getResources().getDisplayMetrics(); 67 … mService.startRendering(mSurface, mWidth, mHeight, metrics.densityDpi, mType.ordinal());
|