Files
frameworks_base/core/java/android/app
Charles Chen 38b1683735 Obtain DisplayMetrics from DisplaymanagerGlobal directly
Previously we use cache to store value returned from
DisplayManagerGlobal#getAdjustedDisplay(int, DisplayAdjustments)
in RM#getAdjustedDisplay(int, DisplayAdjustments).
Since RM#getAdjustedDisplay(int, DisplayAdjustments) is just
used in RM#getDisplayMetrics(int, DisplayAdjustments), we can
furthur call getDisplayInfo(int) from DisplayManagerGlobal and call
DisplayInfo#getAppMetrics to obtain DisplayMetrics directly.

Also, #getDisplayInfo has binder cache, so we don't need another cache
to store returned DisplayMetrics value from DisplayManagerGlobal.

Before this CL
[1/1] android.app.ResourcesManagerPerfTest#getDisplayMetrics: PASSED
(10.844s)
	getDisplayMetrics_median: 1840
	perfetto_file_path:
/sdcard/test_results/android.app.ResourcesManagerPerfTest_getDisplayMetrics/PerfettoListener/perfetto_android.app.ResourcesManagerPerfTest_getDisplayMetrics-1.pb
	getDisplayMetrics_mean: 1857
	getDisplayMetrics_min: 1817
	getDisplayMetrics_standardDeviation: 35

After this CL,
com.android.perftests.core (1 Test)
[1/1] android.app.ResourcesManagerPerfTest#getDisplayMetrics: PASSED
(11.185s)
	getDisplayMetrics_median: 733
	perfetto_file_path:
/sdcard/test_results/android.app.ResourcesManagerPerfTest_getDisplayMetrics/PerfettoListener/perfetto_android.app.ResourcesManagerPerfTest_getDisplayMetrics-1.pb
	getDisplayMetrics_mean: 733
	getDisplayMetrics_min: 725
	getDisplayMetrics_standardDeviation: 5

Test: atest android.app.ResourcesManagerPerfTest#getDisplayMetrics
fixes: 191662456

Change-Id: I934ecae19431800a9a4e0f3e3821e80ef4b5d8cf
2021-06-24 09:38:27 +00:00
..
2021-06-14 19:37:22 +00:00
2021-06-16 15:55:36 -04:00
2021-03-05 19:59:28 -07:00
2021-01-19 14:24:10 -08:00
2021-04-08 23:56:27 +00:00
2021-06-16 15:55:36 -04:00
2021-05-21 14:13:18 -07:00
2021-06-15 11:17:57 -07:00