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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user