update for android R

Change-Id: I8e7d60aa34739bf0365a62f95cd1fcf04576f132
diff --git a/src/AndroidPixelBuffer.cpp b/src/AndroidPixelBuffer.cpp
index 8af6c39..b6ab0cb 100644
--- a/src/AndroidPixelBuffer.cpp
+++ b/src/AndroidPixelBuffer.cpp
@@ -37,8 +37,8 @@
     mListener = nullptr;
 }
 
-bool AndroidPixelBuffer::isDisplayRotated(uint8_t orientation) {
-    return orientation != DISPLAY_ORIENTATION_0 && orientation != DISPLAY_ORIENTATION_180;
+bool AndroidPixelBuffer::isDisplayRotated(ui::Rotation orientation) {
+    return orientation != ui::ROTATION_0 && orientation != ui::ROTATION_180;
 }
 
 void AndroidPixelBuffer::setBufferRotation(bool rotated) {
@@ -98,12 +98,12 @@
     }
 }
 
-void AndroidPixelBuffer::setDisplayInfo(DisplayInfo* info) {
-    bool rotated = isDisplayRotated(info->orientation);
+void AndroidPixelBuffer::setDisplayInfo(DisplayConfig* config, ui::DisplayState* state) {
+    bool rotated = isDisplayRotated(state->orientation);
     setBufferRotation(rotated);
 
-    uint32_t w = rotated ? info->h : info->w;
-    uint32_t h = rotated ? info->w : info->h;
+    uint32_t w = rotated ? config->resolution.height : config->resolution.width;
+    uint32_t h = rotated ? config->resolution.width : config->resolution.height;
 
     if (w != mSourceWidth || h != mSourceHeight) {
         ALOGV("Display dimensions changed: old=(%dx%d) new=(%dx%d)", mSourceWidth, mSourceHeight, w,