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

Commit 2a20ede8 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fix broken tests related to communication device" into tm-dev am: 37699d93 am: 02906b7f

parents db49824a 02906b7f
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -436,6 +436,7 @@ public class ComponentContextFixture implements TestFixture<Context> {
        private int mAudioStreamValue = 1;
        private int mMode = AudioManager.MODE_NORMAL;
        private int mRingerMode = AudioManager.RINGER_MODE_NORMAL;
        private AudioDeviceInfo mCommunicationDevice;

        public FakeAudioManager(Context context) {
            super(context);
@@ -491,8 +492,19 @@ public class ComponentContextFixture implements TestFixture<Context> {
            return mAudioStreamValue;
        }

        @Override
        public void clearCommunicationDevice() {
            mCommunicationDevice = null;
        }

        @Override
        public AudioDeviceInfo getCommunicationDevice() {
            return mCommunicationDevice;
        }

        @Override
        public boolean setCommunicationDevice(AudioDeviceInfo device) {
            mCommunicationDevice = device;
            return true;
        }
    }