Use ui::Rotation in libgui calls
Bug: 144601064
Test: Build
Change-Id: I46d6974e67dcae2d42766f08c899c56dddd795e9
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index 4a7276c..b47080f 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -263,7 +263,8 @@
status_t res = ScreenshotClient::capture(displayToken, dataspace,
ui::PixelFormat::RGBA_8888,
sourceCrop, width, height,
- useIdentityTransform, rotation, captureSecureLayers, &buffer, capturedSecureLayers);
+ useIdentityTransform, ui::toRotation(rotation),
+ captureSecureLayers, &buffer, capturedSecureLayers);
if (res != NO_ERROR) {
return NULL;
}
@@ -724,7 +725,8 @@
{
auto transaction = reinterpret_cast<SurfaceComposerClient::Transaction*>(transactionObj);
- transaction->setDisplayProjection(token, orientation, layerStackRect, displayRect);
+ transaction->setDisplayProjection(token, static_cast<ui::Rotation>(orientation),
+ layerStackRect, displayRect);
}
}