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

Commit 71b63e3e authored by Eric Laurent's avatar Eric Laurent
Browse files

Fix issue 5252593: any app can restart the runtime

Replace null device address string by empty sting.

Change-Id: I285c35f3345334e6d2190493b1a8a5aca1a361a4
parent 3a13fad6
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -511,9 +511,15 @@ status_t AudioSystem::setDeviceConnectionState(audio_devices_t device,
                                               const char *device_address)
{
    const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service();
    const char *address = "";

    if (aps == 0) return PERMISSION_DENIED;

    return aps->setDeviceConnectionState(device, state, device_address);
    if (device_address != NULL) {
        address = device_address;
    }

    return aps->setDeviceConnectionState(device, state, address);
}

audio_policy_dev_state_t AudioSystem::getDeviceConnectionState(audio_devices_t device,