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

Commit 241d2b70 authored by William Escande's avatar William Escande
Browse files

migration to truth Follow-up nit fixes

remove not null assertion after constructor call or looper prepare

Bug: 311772251
Test: atest BluetoothInstrumentationTests
Flag: TEST_ONLY
Change-Id: I5d46fb814885dc144b581c64b7292b74fa3c3e65
parent dc57989c
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

package com.android.bluetooth.audio_util;

import static com.google.common.truth.Truth.assertThat;

import static org.mockito.Mockito.*;

import android.content.Context;
@@ -73,7 +71,6 @@ public class MediaPlayerListTest {
        if (Looper.myLooper() == null) {
            Looper.prepare();
        }
        assertThat(Looper.myLooper()).isNotNull();

        AudioManager mockAudioManager = mock(AudioManager.class);
        when(mMockContext.getSystemService(Context.AUDIO_SERVICE)).thenReturn(mockAudioManager);
+0 −1
Original line number Diff line number Diff line
@@ -105,7 +105,6 @@ public class AvrcpControllerStateMachineTest {
        if (Looper.myLooper() == null) {
            Looper.prepare();
        }
        assertThat(Looper.myLooper()).isNotNull();

        // Set a mock Adapter Service for profile state change notifications
        TestUtils.setAdapterService(mAdapterService);
+0 −1
Original line number Diff line number Diff line
@@ -132,7 +132,6 @@ public class ProfileServiceTest {
        if (Looper.myLooper() == null) {
            Looper.prepare();
        }
        assertThat(Looper.myLooper()).isNotNull();

        doReturn(mDatabaseManager).when(mAdapterService).getDatabase();
        doNothing().when(mAdapterService).addProfile(any());
+0 −2
Original line number Diff line number Diff line
@@ -99,7 +99,6 @@ public final class BluetoothKeystoreServiceTest {
    public void setUp() {
        Assume.assumeTrue("Ignore test when the user is not primary.", isPrimaryUser());
        mBluetoothKeystoreService = new BluetoothKeystoreService(mMockNativeInterface, true);
        assertThat(mBluetoothKeystoreService).isNotNull();
        // backup origin config data.
        try {
            mConfigData = Files.readAllLines(Paths.get(CONFIG_FILE_PATH));
@@ -270,7 +269,6 @@ public final class BluetoothKeystoreServiceTest {

        // new mBluetoothKeystoreService and the Common Criteria mode is false.
        mBluetoothKeystoreService = new BluetoothKeystoreService(mMockNativeInterface, false);
        assertThat(mBluetoothKeystoreService).isNotNull();

        mBluetoothKeystoreService.loadConfigData();

+0 −1
Original line number Diff line number Diff line
@@ -104,7 +104,6 @@ public class HidDeviceTest {
        if (Looper.myLooper() == null) {
            Looper.prepare();
        }
        assertThat(Looper.myLooper()).isNotNull();

        TestUtils.setAdapterService(mAdapterService);
        doReturn(mDatabaseManager).when(mAdapterService).getDatabase();
Loading