surfaceflinger: make mPrimaryDisplayOrientation static
The convention is to store configstore values in static variables.
Bug: 113041375
Test: take screenshot, rotate screen, screencap
Change-Id: I085178803bc897e3e9201fd10bd8731cc5b617c1
diff --git a/services/surfaceflinger/DisplayDevice.cpp b/services/surfaceflinger/DisplayDevice.cpp
index aab6c22..cd86f81 100644
--- a/services/surfaceflinger/DisplayDevice.cpp
+++ b/services/surfaceflinger/DisplayDevice.cpp
@@ -604,7 +604,7 @@
// need to take care of primary display rotation for mGlobalTransform
// for case if the panel is not installed aligned with device orientation
if (mType == DisplayType::DISPLAY_PRIMARY) {
- int primaryDisplayOrientation = mFlinger->getPrimaryDisplayOrientation();
+ int primaryDisplayOrientation = SurfaceFlinger::primaryDisplayOrientation;
DisplayDevice::orientationToTransfrom(
(orientation + primaryDisplayOrientation) % (DisplayState::eOrientation270 + 1),
w, h, &R);