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

Commit e0347c4d authored by Pablo Ceballos's avatar Pablo Ceballos Committed by android-build-merger
Browse files

Handle null Surface in createVirtualDisplay am: eb3370d4 am: b7d3f5b6

am: c7b8b280

Change-Id: Iac6b73c063ee6fdc66040dffc89308dab70682e9
parents fef0c7c4 c7b8b280
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1402,7 +1402,7 @@ public final class DisplayManagerService extends SystemService {
                throw new IllegalArgumentException("width, height, and densityDpi must be "
                        + "greater than 0");
            }
            if (surface.isSingleBuffered()) {
            if (surface != null && surface.isSingleBuffered()) {
                throw new IllegalArgumentException("Surface can't be single-buffered");
            }

@@ -1463,6 +1463,9 @@ public final class DisplayManagerService extends SystemService {

        @Override // Binder call
        public void setVirtualDisplaySurface(IVirtualDisplayCallback callback, Surface surface) {
            if (surface != null && surface.isSingleBuffered()) {
                throw new IllegalArgumentException("Surface can't be single-buffered");
            }
            final long token = Binder.clearCallingIdentity();
            try {
                setVirtualDisplaySurfaceInternal(callback.asBinder(), surface);