Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c65e6771 authored by Oleg Petšjonkin's avatar Oleg Petšjonkin Committed by Automerger Merge Worker
Browse files

Merge "LocalDisplayAdapterTest - fixed issue with real DDC loading for fake...

Merge "LocalDisplayAdapterTest - fixed issue with real DDC loading for fake display" into udc-qpr-dev am: 38645f34 am: 3c7db600

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23783344



Change-Id: I4c61dd34ac5890faf0a1c81a155778aa022deb91
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e33d8c90 3c7db600
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ final class LocalDisplayAdapter extends DisplayAdapter {
        private void loadDisplayDeviceConfig() {
            // Load display device config
            final Context context = getOverlayContext();
            mDisplayDeviceConfig = DisplayDeviceConfig.create(context, mPhysicalDisplayId,
            mDisplayDeviceConfig = mInjector.createDisplayDeviceConfig(context, mPhysicalDisplayId,
                    mIsFirstDisplay);

            // Load brightness HWC quirk
@@ -1336,6 +1336,11 @@ final class LocalDisplayAdapter extends DisplayAdapter {
        public SurfaceControlProxy getSurfaceControlProxy() {
            return new SurfaceControlProxy();
        }

        public DisplayDeviceConfig createDisplayDeviceConfig(Context context,
                long physicalDisplayId, boolean isFirstDisplay) {
            return DisplayDeviceConfig.create(context, physicalDisplayId, isFirstDisplay);
        }
    }

    public interface DisplayEventListener {
+11 −0
Original line number Diff line number Diff line
@@ -1257,6 +1257,17 @@ public class LocalDisplayAdapterTest {
        public LocalDisplayAdapter.SurfaceControlProxy getSurfaceControlProxy() {
            return mSurfaceControlProxy;
        }

        // Instead of using DisplayDeviceConfig.create(context, physicalDisplayId, isFirstDisplay)
        // we should use DisplayDeviceConfig.create(context, isFirstDisplay) for the test to ensure
        // that real device DisplayDeviceConfig is not loaded for FakeDisplay and we are getting
        // consistent behaviour. Please also note that context passed to this method, is
        // mMockContext and values will be loaded from mMockResources.
        @Override
        public DisplayDeviceConfig createDisplayDeviceConfig(Context context,
                long physicalDisplayId, boolean isFirstDisplay) {
            return DisplayDeviceConfig.create(context, isFirstDisplay);
        }
    }

    private class TestListener implements DisplayAdapter.Listener {