diff options
author | Marin Shalamanov <shalamanov@google.com> | 2021-01-29 21:26:07 +0100 |
---|---|---|
committer | Marin Shalamanov <shalamanov@google.com> | 2021-02-04 19:37:51 +0100 |
commit | cb783ca6d936ad2198fff6b9d8c0444223f0386e (patch) | |
tree | 901838479751753be4e029122a2c0f8d72271e32 /cmds/bootanimation/BootAnimation.cpp | |
parent | e0434555f75a0efc9a396bd4a48ef3fd1cb0094c (diff) |
Tracking changes to renaming DisplayConfig to DisplayMode
Bug: 159590486
Test: presubmit
Change-Id: I64e57fe4d73c22bbbe0a1767cadf8648259e9beb
Diffstat (limited to 'cmds/bootanimation/BootAnimation.cpp')
-rw-r--r-- | cmds/bootanimation/BootAnimation.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
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 <android-base/properties.h> -#include <ui/DisplayConfig.h> +#include <ui/DisplayMode.h> #include <ui/PixelFormat.h> #include <ui/Rect.h> #include <ui/Region.h> @@ -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<SurfaceControl> control = session()->createSurface(String8("BootAnimation"), |