From cb783ca6d936ad2198fff6b9d8c0444223f0386e Mon Sep 17 00:00:00 2001 From: Marin Shalamanov Date: Fri, 29 Jan 2021 21:26:07 +0100 Subject: Tracking changes to renaming DisplayConfig to DisplayMode Bug: 159590486 Test: presubmit Change-Id: I64e57fe4d73c22bbbe0a1767cadf8648259e9beb --- cmds/bootanimation/BootAnimation.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'cmds/bootanimation/BootAnimation.cpp') diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp index a7396faf7677..be82b2230183 100644 --- a/cmds/bootanimation/BootAnimation.cpp +++ b/cmds/bootanimation/BootAnimation.cpp @@ -43,7 +43,7 @@ #include -#include +#include #include #include #include @@ -65,6 +65,8 @@ namespace android { +using ui::DisplayMode; + static const char OEM_BOOTANIMATION_FILE[] = "/oem/media/bootanimation.zip"; static const char PRODUCT_BOOTANIMATION_DARK_FILE[] = "/product/media/bootanimation-dark.zip"; static const char PRODUCT_BOOTANIMATION_FILE[] = "/product/media/bootanimation.zip"; @@ -345,14 +347,14 @@ public: continue; } - DisplayConfig displayConfig; - const status_t error = SurfaceComposerClient::getActiveDisplayConfig( - mBootAnimation->mDisplayToken, &displayConfig); + DisplayMode displayMode; + const status_t error = SurfaceComposerClient::getActiveDisplayMode( + mBootAnimation->mDisplayToken, &displayMode); if (error != NO_ERROR) { - SLOGE("Can't get active display configuration."); + SLOGE("Can't get active display mode."); } - mBootAnimation->resizeSurface(displayConfig.resolution.getWidth(), - displayConfig.resolution.getHeight()); + mBootAnimation->resizeSurface(displayMode.resolution.getWidth(), + displayMode.resolution.getHeight()); } } } while (numEvents > 0); @@ -401,15 +403,15 @@ status_t BootAnimation::readyToRun() { if (mDisplayToken == nullptr) return NAME_NOT_FOUND; - DisplayConfig displayConfig; + DisplayMode displayMode; const status_t error = - SurfaceComposerClient::getActiveDisplayConfig(mDisplayToken, &displayConfig); + SurfaceComposerClient::getActiveDisplayMode(mDisplayToken, &displayMode); if (error != NO_ERROR) return error; mMaxWidth = android::base::GetIntProperty("ro.surface_flinger.max_graphics_width", 0); mMaxHeight = android::base::GetIntProperty("ro.surface_flinger.max_graphics_height", 0); - ui::Size resolution = displayConfig.resolution; + ui::Size resolution = displayMode.resolution; resolution = limitSurfaceSize(resolution.width, resolution.height); // create the native surface sp control = session()->createSurface(String8("BootAnimation"), -- cgit v1.2.3-59-g8ed1b