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

Commit 7fb86565 authored by Jeff Brown's avatar Jeff Brown
Browse files

Remove call to enable/disable remote submix from test program.

The submix will be controlled automatically from now on based on
whether there is an active audio recorder.

Bug: 10265163
Change-Id: Iea8164182daa037066f60974b54597d20db4903b
parent e9f3a314
Loading
Loading
Loading
Loading
+0 −26
Original line number Diff line number Diff line
@@ -138,28 +138,6 @@ void RemoteDisplayClient::waitUntilDone() {
    }
}

static status_t enableAudioSubmix(bool enable) {
    status_t err = AudioSystem::setDeviceConnectionState(
            AUDIO_DEVICE_IN_REMOTE_SUBMIX,
            enable
                ? AUDIO_POLICY_DEVICE_STATE_AVAILABLE
                : AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE,
            NULL /* device_address */);

    if (err != OK) {
        return err;
    }

    err = AudioSystem::setDeviceConnectionState(
            AUDIO_DEVICE_OUT_REMOTE_SUBMIX,
            enable
                ? AUDIO_POLICY_DEVICE_STATE_AVAILABLE
                : AUDIO_POLICY_DEVICE_STATE_UNAVAILABLE,
            NULL /* device_address */);

    return err;
}

static void createSource(const AString &addr, int32_t port) {
    sp<IServiceManager> sm = defaultServiceManager();
    sp<IBinder> binder = sm->getService(String16("media.player"));
@@ -168,8 +146,6 @@ static void createSource(const AString &addr, int32_t port) {

    CHECK(service.get() != NULL);

    enableAudioSubmix(true /* enable */);

    String8 iface;
    iface.append(addr.c_str());
    iface.append(StringPrintf(":%d", port).c_str());
@@ -182,8 +158,6 @@ static void createSource(const AString &addr, int32_t port) {

    display->dispose();
    display.clear();

    enableAudioSubmix(false /* enable */);
}

static void createFileSource(