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

Commit d04945e7 authored by Hyundo Moon's avatar Hyundo Moon
Browse files

Add @VisibleForTesting in PbapStateMachine

Unlike atest results, Mockito cannot mock package-private classes.
This CL makes the PbapStateMachine as public when testing so that
the test does not fail.

Bug: 237548430
Test: atest BluetoothPbapAuthenticatorTest
Ignore-AOSP-First: The CL that adds BluetoothPbapAuthenticatorTest
    in AOSP already has this change.
Change-Id: I61c2692e9b00496883d0adc203a2edd3445922bc
parent b0cdbde5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ import com.android.bluetooth.ObexRejectServer;
import com.android.bluetooth.R;
import com.android.bluetooth.Utils;
import com.android.bluetooth.btservice.MetricsLogger;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.annotations.VisibleForTesting.Visibility;
import com.android.internal.util.State;
import com.android.internal.util.StateMachine;
import com.android.obex.ResponseCodes;
@@ -61,7 +63,8 @@ import java.io.IOException;
 *          CONNECTED   ----->  FINISHED
 *                (OBEX Server done)
 */
class PbapStateMachine extends StateMachine {
@VisibleForTesting(visibility = Visibility.PACKAGE)
public class PbapStateMachine extends StateMachine {
    private static final String TAG = "PbapStateMachine";
    private static final boolean DEBUG = true;
    private static final boolean VERBOSE = true;