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

Commit 1613d4b9 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add argument checking when resize virtual display"

parents fd7c41f1 01baf6ce
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -2020,6 +2020,10 @@ public final class DisplayManagerService extends SystemService {
        @Override // Binder call
        public void resizeVirtualDisplay(IVirtualDisplayCallback callback,
                int width, int height, int densityDpi) {
            if (width <= 0 || height <= 0 || densityDpi <= 0) {
                throw new IllegalArgumentException("width, height, and densityDpi must be "
                        + "greater than 0");
            }
            final long token = Binder.clearCallingIdentity();
            try {
                resizeVirtualDisplayInternal(callback.asBinder(), width, height, densityDpi);