Loading tests/unit/src/com/android/bluetooth/StateMachineTest.java +26 −26 Original line number Diff line number Diff line Loading @@ -85,13 +85,13 @@ public class StateMachineTest { /** * Tests {@link StateMachine#toString()}. */ class StateMachineToStringTest extends StateMachine { static class StateMachineToStringTest extends StateMachine { StateMachineToStringTest(String name) { super(name); } } class ExampleState extends State { static class ExampleState extends State { String mName; ExampleState(String name) { Loading Loading @@ -195,7 +195,7 @@ public class StateMachineTest { } } private StateMachineQuitTest mThisSm; private final StateMachineQuitTest mThisSm; private S1 mS1 = new S1(); } Loading Loading @@ -298,7 +298,7 @@ public class StateMachineTest { } } private StateMachineQuitNowTest mThisSm; private final StateMachineQuitNowTest mThisSm; private S1 mS1 = new S1(); } Loading Loading @@ -402,14 +402,14 @@ public class StateMachineTest { } } private StateMachineQuitNowAfterStartTest mThisSm; private final StateMachineQuitNowAfterStartTest mThisSm; private S1 mS1 = new S1(); } /** * Test enter/exit can use transitionTo */ class StateMachineEnterExitTransitionToTest extends StateMachine { static class StateMachineEnterExitTransitionToTest extends StateMachine { StateMachineEnterExitTransitionToTest(String name) { super(name); Loading Loading @@ -502,7 +502,7 @@ public class StateMachineTest { } } private StateMachineEnterExitTransitionToTest mThisSm; private final StateMachineEnterExitTransitionToTest mThisSm; private S1 mS1 = new S1(); private S2 mS2 = new S2(); private S3 mS3 = new S3(); Loading Loading @@ -597,7 +597,7 @@ public class StateMachineTest { /** * Tests that ProcessedMessage works as a circular buffer. */ class StateMachine0 extends StateMachine { static class StateMachine0 extends StateMachine { StateMachine0(String name) { super(name); mThisSm = this; Loading Loading @@ -628,7 +628,7 @@ public class StateMachineTest { } } private StateMachine0 mThisSm; private final StateMachine0 mThisSm; private S1 mS1 = new S1(); } Loading Loading @@ -684,7 +684,7 @@ public class StateMachineTest { * in state mS1. With the first message it transitions to * itself which causes it to be exited and reentered. */ class StateMachine1 extends StateMachine { static class StateMachine1 extends StateMachine { StateMachine1(String name) { super(name); mThisSm = this; Loading Loading @@ -729,7 +729,7 @@ public class StateMachineTest { } } private StateMachine1 mThisSm; private final StateMachine1 mThisSm; private S1 mS1 = new S1(); private int mEnterCount; Loading Loading @@ -784,7 +784,7 @@ public class StateMachineTest { * mS2 then receives both of the deferred messages first TEST_CMD_1 and * then TEST_CMD_2. */ class StateMachine2 extends StateMachine { static class StateMachine2 extends StateMachine { StateMachine2(String name) { super(name); mThisSm = this; Loading Loading @@ -835,7 +835,7 @@ public class StateMachineTest { } } private StateMachine2 mThisSm; private final StateMachine2 mThisSm; private S1 mS1 = new S1(); private S2 mS2 = new S2(); Loading Loading @@ -891,7 +891,7 @@ public class StateMachineTest { * Test that unhandled messages in a child are handled by the parent. * When TEST_CMD_2 is received. */ class StateMachine3 extends StateMachine { static class StateMachine3 extends StateMachine { StateMachine3(String name) { super(name); mThisSm = this; Loading Loading @@ -932,7 +932,7 @@ public class StateMachineTest { } } private StateMachine3 mThisSm; private final StateMachine3 mThisSm; private ParentState mParentState = new ParentState(); private ChildState mChildState = new ChildState(); } Loading Loading @@ -977,7 +977,7 @@ public class StateMachineTest { * with transition from child 1 to child 2 and child 2 * lets the parent handle the messages. */ class StateMachine4 extends StateMachine { static class StateMachine4 extends StateMachine { StateMachine4(String name) { super(name); mThisSm = this; Loading Loading @@ -1027,7 +1027,7 @@ public class StateMachineTest { } } private StateMachine4 mThisSm; private final StateMachine4 mThisSm; private ParentState mParentState = new ParentState(); private ChildState1 mChildState1 = new ChildState1(); private ChildState2 mChildState2 = new ChildState2(); Loading Loading @@ -1073,7 +1073,7 @@ public class StateMachineTest { * Test transition from one child to another of a "complex" * hierarchy with two parents and multiple children. */ class StateMachine5 extends StateMachine { static class StateMachine5 extends StateMachine { StateMachine5(String name) { super(name); mThisSm = this; Loading Loading @@ -1303,7 +1303,7 @@ public class StateMachineTest { } } private StateMachine5 mThisSm; private final StateMachine5 mThisSm; private ParentState1 mParentState1 = new ParentState1(); private ChildState1 mChildState1 = new ChildState1(); private ChildState2 mChildState2 = new ChildState2(); Loading Loading @@ -1408,7 +1408,7 @@ public class StateMachineTest { * after construction and before any other messages arrive and that * sendMessageDelayed works. */ class StateMachine6 extends StateMachine { static class StateMachine6 extends StateMachine { StateMachine6(String name) { super(name); mThisSm = this; Loading Loading @@ -1446,7 +1446,7 @@ public class StateMachineTest { } } private StateMachine6 mThisSm; private final StateMachine6 mThisSm; private S1 mS1 = new S1(); private long mArrivalTimeMsg1; Loading Loading @@ -1492,7 +1492,7 @@ public class StateMachineTest { * Test that enter is invoked immediately after exit. This validates * that enter can be used to send a watch dog message for its state. */ class StateMachine7 extends StateMachine { static class StateMachine7 extends StateMachine { private final int SM7_DELAY_TIME = 250; StateMachine7(String name) { Loading Loading @@ -1551,7 +1551,7 @@ public class StateMachineTest { } } private StateMachine7 mThisSm; private final StateMachine7 mThisSm; private S1 mS1 = new S1(); private S2 mS2 = new S2(); Loading Loading @@ -1597,7 +1597,7 @@ public class StateMachineTest { /** * Test unhandledMessage. */ class StateMachineUnhandledMessage extends StateMachine { static class StateMachineUnhandledMessage extends StateMachine { StateMachineUnhandledMessage(String name) { super(name); mThisSm = this; Loading Loading @@ -1631,7 +1631,7 @@ public class StateMachineTest { } } private StateMachineUnhandledMessage mThisSm; private final StateMachineUnhandledMessage mThisSm; private int mUnhandledMessageCount; private S1 mS1 = new S1(); } Loading Loading @@ -1671,7 +1671,7 @@ public class StateMachineTest { * will be used to notify testStateMachineSharedThread that the test is * complete. */ class StateMachineSharedThread extends StateMachine { static class StateMachineSharedThread extends StateMachine { StateMachineSharedThread(String name, Looper looper, int maxCount) { super(name, looper); mMaxCount = maxCount; Loading tests/unit/src/com/android/bluetooth/map/BluetoothMapContentObserverTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import org.junit.runner.RunWith; public class BluetoothMapContentObserverTest { private Context mTargetContext; class ExceptionTestProvider extends MockContentProvider { static class ExceptionTestProvider extends MockContentProvider { public ExceptionTestProvider(Context context) { super(context); } Loading tests/unit/src/com/android/bluetooth/sdp/DipTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ public class DipTest { Intent intent = intentArgument.getValue(); assertThat(intent).isNotEqualTo(null); assertThat(BluetoothDevice.ACTION_SDP_RECORD).isEqualTo(intent.getAction()); assertThat(intent.getAction()).isEqualTo(BluetoothDevice.ACTION_SDP_RECORD); assertThat(device).isEqualTo(intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE)); assertThat(Utils.byteArrayToUuid(uuid)[0]).isEqualTo(intent.getParcelableExtra(BluetoothDevice.EXTRA_UUID)); assertThat(status).isEqualTo(intent.getIntExtra(BluetoothDevice.EXTRA_SDP_SEARCH_STATUS, -1)); Loading Loading
tests/unit/src/com/android/bluetooth/StateMachineTest.java +26 −26 Original line number Diff line number Diff line Loading @@ -85,13 +85,13 @@ public class StateMachineTest { /** * Tests {@link StateMachine#toString()}. */ class StateMachineToStringTest extends StateMachine { static class StateMachineToStringTest extends StateMachine { StateMachineToStringTest(String name) { super(name); } } class ExampleState extends State { static class ExampleState extends State { String mName; ExampleState(String name) { Loading Loading @@ -195,7 +195,7 @@ public class StateMachineTest { } } private StateMachineQuitTest mThisSm; private final StateMachineQuitTest mThisSm; private S1 mS1 = new S1(); } Loading Loading @@ -298,7 +298,7 @@ public class StateMachineTest { } } private StateMachineQuitNowTest mThisSm; private final StateMachineQuitNowTest mThisSm; private S1 mS1 = new S1(); } Loading Loading @@ -402,14 +402,14 @@ public class StateMachineTest { } } private StateMachineQuitNowAfterStartTest mThisSm; private final StateMachineQuitNowAfterStartTest mThisSm; private S1 mS1 = new S1(); } /** * Test enter/exit can use transitionTo */ class StateMachineEnterExitTransitionToTest extends StateMachine { static class StateMachineEnterExitTransitionToTest extends StateMachine { StateMachineEnterExitTransitionToTest(String name) { super(name); Loading Loading @@ -502,7 +502,7 @@ public class StateMachineTest { } } private StateMachineEnterExitTransitionToTest mThisSm; private final StateMachineEnterExitTransitionToTest mThisSm; private S1 mS1 = new S1(); private S2 mS2 = new S2(); private S3 mS3 = new S3(); Loading Loading @@ -597,7 +597,7 @@ public class StateMachineTest { /** * Tests that ProcessedMessage works as a circular buffer. */ class StateMachine0 extends StateMachine { static class StateMachine0 extends StateMachine { StateMachine0(String name) { super(name); mThisSm = this; Loading Loading @@ -628,7 +628,7 @@ public class StateMachineTest { } } private StateMachine0 mThisSm; private final StateMachine0 mThisSm; private S1 mS1 = new S1(); } Loading Loading @@ -684,7 +684,7 @@ public class StateMachineTest { * in state mS1. With the first message it transitions to * itself which causes it to be exited and reentered. */ class StateMachine1 extends StateMachine { static class StateMachine1 extends StateMachine { StateMachine1(String name) { super(name); mThisSm = this; Loading Loading @@ -729,7 +729,7 @@ public class StateMachineTest { } } private StateMachine1 mThisSm; private final StateMachine1 mThisSm; private S1 mS1 = new S1(); private int mEnterCount; Loading Loading @@ -784,7 +784,7 @@ public class StateMachineTest { * mS2 then receives both of the deferred messages first TEST_CMD_1 and * then TEST_CMD_2. */ class StateMachine2 extends StateMachine { static class StateMachine2 extends StateMachine { StateMachine2(String name) { super(name); mThisSm = this; Loading Loading @@ -835,7 +835,7 @@ public class StateMachineTest { } } private StateMachine2 mThisSm; private final StateMachine2 mThisSm; private S1 mS1 = new S1(); private S2 mS2 = new S2(); Loading Loading @@ -891,7 +891,7 @@ public class StateMachineTest { * Test that unhandled messages in a child are handled by the parent. * When TEST_CMD_2 is received. */ class StateMachine3 extends StateMachine { static class StateMachine3 extends StateMachine { StateMachine3(String name) { super(name); mThisSm = this; Loading Loading @@ -932,7 +932,7 @@ public class StateMachineTest { } } private StateMachine3 mThisSm; private final StateMachine3 mThisSm; private ParentState mParentState = new ParentState(); private ChildState mChildState = new ChildState(); } Loading Loading @@ -977,7 +977,7 @@ public class StateMachineTest { * with transition from child 1 to child 2 and child 2 * lets the parent handle the messages. */ class StateMachine4 extends StateMachine { static class StateMachine4 extends StateMachine { StateMachine4(String name) { super(name); mThisSm = this; Loading Loading @@ -1027,7 +1027,7 @@ public class StateMachineTest { } } private StateMachine4 mThisSm; private final StateMachine4 mThisSm; private ParentState mParentState = new ParentState(); private ChildState1 mChildState1 = new ChildState1(); private ChildState2 mChildState2 = new ChildState2(); Loading Loading @@ -1073,7 +1073,7 @@ public class StateMachineTest { * Test transition from one child to another of a "complex" * hierarchy with two parents and multiple children. */ class StateMachine5 extends StateMachine { static class StateMachine5 extends StateMachine { StateMachine5(String name) { super(name); mThisSm = this; Loading Loading @@ -1303,7 +1303,7 @@ public class StateMachineTest { } } private StateMachine5 mThisSm; private final StateMachine5 mThisSm; private ParentState1 mParentState1 = new ParentState1(); private ChildState1 mChildState1 = new ChildState1(); private ChildState2 mChildState2 = new ChildState2(); Loading Loading @@ -1408,7 +1408,7 @@ public class StateMachineTest { * after construction and before any other messages arrive and that * sendMessageDelayed works. */ class StateMachine6 extends StateMachine { static class StateMachine6 extends StateMachine { StateMachine6(String name) { super(name); mThisSm = this; Loading Loading @@ -1446,7 +1446,7 @@ public class StateMachineTest { } } private StateMachine6 mThisSm; private final StateMachine6 mThisSm; private S1 mS1 = new S1(); private long mArrivalTimeMsg1; Loading Loading @@ -1492,7 +1492,7 @@ public class StateMachineTest { * Test that enter is invoked immediately after exit. This validates * that enter can be used to send a watch dog message for its state. */ class StateMachine7 extends StateMachine { static class StateMachine7 extends StateMachine { private final int SM7_DELAY_TIME = 250; StateMachine7(String name) { Loading Loading @@ -1551,7 +1551,7 @@ public class StateMachineTest { } } private StateMachine7 mThisSm; private final StateMachine7 mThisSm; private S1 mS1 = new S1(); private S2 mS2 = new S2(); Loading Loading @@ -1597,7 +1597,7 @@ public class StateMachineTest { /** * Test unhandledMessage. */ class StateMachineUnhandledMessage extends StateMachine { static class StateMachineUnhandledMessage extends StateMachine { StateMachineUnhandledMessage(String name) { super(name); mThisSm = this; Loading Loading @@ -1631,7 +1631,7 @@ public class StateMachineTest { } } private StateMachineUnhandledMessage mThisSm; private final StateMachineUnhandledMessage mThisSm; private int mUnhandledMessageCount; private S1 mS1 = new S1(); } Loading Loading @@ -1671,7 +1671,7 @@ public class StateMachineTest { * will be used to notify testStateMachineSharedThread that the test is * complete. */ class StateMachineSharedThread extends StateMachine { static class StateMachineSharedThread extends StateMachine { StateMachineSharedThread(String name, Looper looper, int maxCount) { super(name, looper); mMaxCount = maxCount; Loading
tests/unit/src/com/android/bluetooth/map/BluetoothMapContentObserverTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ import org.junit.runner.RunWith; public class BluetoothMapContentObserverTest { private Context mTargetContext; class ExceptionTestProvider extends MockContentProvider { static class ExceptionTestProvider extends MockContentProvider { public ExceptionTestProvider(Context context) { super(context); } Loading
tests/unit/src/com/android/bluetooth/sdp/DipTest.java +1 −1 Original line number Diff line number Diff line Loading @@ -96,7 +96,7 @@ public class DipTest { Intent intent = intentArgument.getValue(); assertThat(intent).isNotEqualTo(null); assertThat(BluetoothDevice.ACTION_SDP_RECORD).isEqualTo(intent.getAction()); assertThat(intent.getAction()).isEqualTo(BluetoothDevice.ACTION_SDP_RECORD); assertThat(device).isEqualTo(intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE)); assertThat(Utils.byteArrayToUuid(uuid)[0]).isEqualTo(intent.getParcelableExtra(BluetoothDevice.EXTRA_UUID)); assertThat(status).isEqualTo(intent.getIntExtra(BluetoothDevice.EXTRA_SDP_SEARCH_STATUS, -1)); Loading