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

Commit 7fb3f393 authored by Mark Fasheh's avatar Mark Fasheh
Browse files

UserControllerTest: set default flags

Some methods which use MessageQueue were throwing an error due to not
having a value for the new MessageQueue flag:

 java.lang.IllegalArgumentException: android.os.message_queue_tail_tracking is not set

to fix this we just need to initialize SetFlagsRule() with
SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT, which will populate
the map in SetFlagsRule with a default set of flags and values.

This is in line with what I've seen other tests in frameworks/ do.

Bug: 305311707
Test: atest FrameworksServicesTests:UserControllerTest
Change-Id: Id463256a06ad715b506d09cf2ce195aa90bfbf1a
parent fc28e313
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -180,7 +180,8 @@ public class UserControllerTest {
            REPORT_LOCKED_BOOT_COMPLETE_MSG);

    @Rule
    public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
    public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(
            SetFlagsRule.DefaultInitValueType.DEVICE_DEFAULT);

    @Before
    public void setUp() throws Exception {