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

Commit d71f8d1b authored by Orion Hodson's avatar Orion Hodson
Browse files

Avoid a few uses of `new Boolean()`

Prefer Boolean.{TRUE,FALSE} constants or using Boolean.valueOf().

Bug: N/A
Test: Treehugger
Change-Id: I29d16c23aca76bb7560a835b7efd0d27ef93798c
parent 2d4a8eb4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ public class PublishControllerImpl implements PublishController {
            boolean supportPublishingState) {
        synchronized (mPublishStateLock) {
            if (mIsDestroyedFlag) return;
            mPublishStateCallbacks.register(c, new Boolean(supportPublishingState));
            mPublishStateCallbacks.register(c, Boolean.valueOf(supportPublishingState));
            logd("registerPublishStateCallback: size="
                    + mPublishStateCallbacks.getRegisteredCallbackCount());
        }
+2 −2
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ public class PublishControllerImplTest extends ImsTestBase {
    @SmallTest
    public void testPublishingStateTargetingEnable() throws Exception {
        doReturn(1).when(mPublishStateCallbacks).getRegisteredCallbackCount();
        Boolean boolObj = new Boolean(true);
        Boolean boolObj = Boolean.TRUE;
        Object uid1 = (Object)boolObj;
        doReturn(uid1).when(mPublishStateCallbacks).getRegisteredCallbackCookie(anyInt());

@@ -282,7 +282,7 @@ public class PublishControllerImplTest extends ImsTestBase {
    @SmallTest
    public void testPublishingStateTargetingDisable() throws Exception {
        doReturn(1).when(mPublishStateCallbacks).getRegisteredCallbackCount();
        Boolean boolObj = new Boolean(false);
        Boolean boolObj = Boolean.FALSE;
        Object uid1 = (Object)boolObj;
        doReturn(uid1).when(mPublishStateCallbacks).getRegisteredCallbackCookie(anyInt());