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

Commit c1577580 authored by Tiger Huang's avatar Tiger Huang
Browse files

Don't throw unsupported exception over binder call

Otherwise, Parcel will fail to read the arguments and the exception
won't be sent to the caller.

Bug: 179771384
Bug: 184037368
Test: atest DisplayPolicyTests
Change-Id: I820067f409e9b061d338967f036445b7dc10a59c
parent aad3a861
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -905,8 +905,8 @@ public class DisplayPolicy {
                        && win.mActivityRecord.fillsParent()
                        && (win.mAttrs.privateFlags & PRIVATE_FLAG_FORCE_DRAW_BAR_BACKGROUNDS) != 0
                        && attrs.getFitInsetsTypes() != 0) {
                    throw new RuntimeException("Illegal attributes: Main activity window that isn't"
                            + " translucent trying to fit insets: "
                    throw new IllegalArgumentException("Illegal attributes: Main activity window"
                            + " that isn't translucent trying to fit insets: "
                            + attrs.getFitInsetsTypes()
                            + " attrs=" + attrs);
                }
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ public class DisplayPolicyTests extends WindowTestsBase {
        assertEquals(mAppWindow, policy.getTopFullscreenOpaqueWindow());
    }

    @Test(expected = RuntimeException.class)
    @Test(expected = IllegalArgumentException.class)
    public void testMainAppWindowDisallowFitSystemWindowTypes() {
        final DisplayPolicy policy = mDisplayContent.getDisplayPolicy();
        final WindowState activity = createBaseApplicationWindow();