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

Commit 9e1a2d7e authored by Zhi Dou's avatar Zhi Dou
Browse files

Explicitly set SetFlagsRule with NULL_DEFAULT

The default behavior of SetFlagsRule has been changed to DEVICE_DEFAULT which will load the default value from the device. These two tests requires to use the previous default behavior. Explicitly set the default behavior as NULL_DEFAULT.

Test: atest FrameworksMockingServicesTests:com.android.server.app.GameManagerServiceTests FrameworksCoreTestsRavenwood
Bug: 319266584
Bug: 319262520
Change-Id: I871f9572da556f6c4feb84b6ce85f8c533e2bdd0
parent 9fded33b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -45,7 +45,8 @@ public class BuildTest {
    public final RavenwoodRule mRavenwood = new RavenwoodRule();

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

    /**
     * Asserts that a String is non-null and non-empty.  If it is not,
+2 −1
Original line number Diff line number Diff line
@@ -118,7 +118,8 @@ import java.util.function.Supplier;
@Presubmit
public class GameManagerServiceTests {
    @Mock MockContext mMockContext;
    @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule();
    @Rule public final SetFlagsRule mSetFlagsRule = new SetFlagsRule(
                SetFlagsRule.DefaultInitValueType.NULL_DEFAULT);
    private static final String TAG = "GameManagerServiceTests";
    private static final String PACKAGE_NAME_INVALID = "com.android.app";
    private static final int USER_ID_1 = 1001;