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

Commit ceb40db6 authored by Vasu Nori's avatar Vasu Nori
Browse files

cleanup statemachines for all profiles so their output looks the same

for all profiles.

Bug: 110230304
Test: tested manually.

Change-Id: I06c24677f8c3d56e8fbfc8f02ebb894f6e31aa6e
parent b21a3036
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -177,10 +177,11 @@ public class A2dpSinkStateMachine extends StateMachine {
    }

    public void dump(StringBuilder sb) {
        ProfileService.println(sb, "mCurrentDevice: " + mCurrentDevice);
        if (mCurrentDevice == null) return;
        ProfileService.println(sb, "mCurrentDevice: " + mCurrentDevice.getAddress() + "("
                + mCurrentDevice.getName() + ") " + this.toString());
        ProfileService.println(sb, "mTargetDevice: " + mTargetDevice);
        ProfileService.println(sb, "mIncomingDevice: " + mIncomingDevice);
        ProfileService.println(sb, "StateMachine: " + this.toString());
    }

    private class Disconnected extends State {
+4 −1
Original line number Diff line number Diff line
@@ -999,7 +999,10 @@ class AvrcpControllerStateMachine extends StateMachine {
    }

    void dump(StringBuilder sb) {
        ProfileService.println(sb, "StateMachine: " + this.toString());
        BluetoothDevice device = mRemoteDevice.mBTDevice;
        if (device == null) return;
        ProfileService.println(sb, "mCurrentDevice: " + device.getAddress() + "("
                + device.getName() + ") " + this.toString());
    }

    MediaMetadata getCurrentMetaData() {
+0 −2
Original line number Diff line number Diff line
@@ -915,8 +915,6 @@ public class HeadsetClientService extends ProfileService {
        super.dump(sb);
        for (HeadsetClientStateMachine sm : mStateMachineMap.values()) {
            if (sm != null) {
                println(sb, "State machine:");
                println(sb, "=============");
                sm.dump(sb);
            }
        }
+3 −4
Original line number Diff line number Diff line
@@ -185,7 +185,9 @@ public class HeadsetClientStateMachine extends StateMachine {
    }

    public void dump(StringBuilder sb) {
        ProfileService.println(sb, "mCurrentDevice: " + mCurrentDevice);
        if (mCurrentDevice == null) return;
        ProfileService.println(sb, "mCurrentDevice: " + mCurrentDevice.getAddress() + "("
                + mCurrentDevice.getName() + ") " + this.toString());
        ProfileService.println(sb, "mAudioState: " + mAudioState);
        ProfileService.println(sb, "mAudioWbs: " + mAudioWbs);
        ProfileService.println(sb, "mIndicatorNetworkState: " + mIndicatorNetworkState);
@@ -208,9 +210,6 @@ public class HeadsetClientStateMachine extends StateMachine {
                ProfileService.println(sb, "  " + call);
            }
        }

        ProfileService.println(sb, "State machine stats:");
        ProfileService.println(sb, this.toString());
    }

    private void clearPendingAction() {
+0 −1
Original line number Diff line number Diff line
@@ -349,7 +349,6 @@ public class MapClientService extends ProfileService {
    @Override
    public void dump(StringBuilder sb) {
        super.dump(sb);
        ProfileService.println(sb, "# Services Connected: " + mMapInstanceMap.size());
        for (MceStateMachine stateMachine : mMapInstanceMap.values()) {
            stateMachine.dump(sb);
        }
Loading