Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Version 1.19.1 alexa-client-sdk
Browse files Browse the repository at this point in the history
Changes in this update:

- Fixed a bug that caused Display Cards for certain EMP adapters to stop rendering.

Feature enhancements, updates, and resolved issues from all releases are available on the [Amazon developer portal](https://developer.amazon.com/docs/alexa/avs-device-sdk/release-notes.html).
  • Loading branch information
caleighatamazon committed Apr 27, 2020
1 parent c381bd8 commit 7da524a
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0/
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/

#ifndef ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_TEST_AVSCOMMON_SDKINTERFACES_MOCKRENDERPLAYERINFOCARDSOBSERVERINTERFACE_H_
#define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_TEST_AVSCOMMON_SDKINTERFACES_MOCKRENDERPLAYERINFOCARDSOBSERVERINTERFACE_H_

#include "AVSCommon/SDKInterfaces/RenderPlayerInfoCardsObserverInterface.h"
#include <gmock/gmock.h>

namespace alexaClientSDK {
namespace avsCommon {
namespace sdkInterfaces {
namespace test {

/**
* Mock class implementing @c RenderPlayerInfoCardsObserverInterface
*/
class MockRenderPlayerInfoCardsObserver : public RenderPlayerInfoCardsObserverInterface {
public:
MOCK_METHOD2(onRenderPlayerCardsInfoChanged, void(avsCommon::avs::PlayerActivity state, const Context& context));
};

} // namespace test
} // namespace sdkInterfaces
} // namespace avsCommon
} // namespace alexaClientSDK

#endif // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_TEST_AVSCOMMON_SDKINTERFACES_MOCKRENDERPLAYERINFOCARDSOBSERVERINTERFACE_H_
4 changes: 2 additions & 2 deletions AVSCommon/Utils/include/AVSCommon/Utils/SDKVersion.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace utils {
namespace sdkVersion {

inline static std::string getCurrentVersion() {
return "1.19.0";
return "1.19.1";
}

inline static int getMajorVersion() {
Expand All @@ -41,7 +41,7 @@ inline static int getMinorVersion() {
}

inline static int getPatchVersion() {
return 0;
return 1;
}

} // namespace sdkVersion
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## ChangeLog

### Version 1.19.1 - April 27 2020
* Fixed a bug that caused Display Cards for certain EMP adapters to stop rendering.

Feature enhancements, updates, and resolved issues from all releases are available on the [Amazon developer portal](https://developer.amazon.com/docs/alexa/avs-device-sdk/release-notes.html)

### Version 1.19.0 - April 13 2020
Feature enhancements, updates, and resolved issues from all releases are available on the [Amazon developer portal](https://developer.amazon.com/docs/alexa/avs-device-sdk/release-notes.html)

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)

# Set project information
project(AlexaClientSDK VERSION 1.19.0 LANGUAGES CXX)
project(AlexaClientSDK VERSION 1.19.1 LANGUAGES CXX)
set(PROJECT_BRIEF "A cross-platform, modular SDK for interacting with the Alexa Voice Service")

# This variable should be used by extension packages to include cmake files from this project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ void ExternalMediaPlayer::setPlayerInFocus(const std::string& playerInFocus) {
}
}
ACSDK_DEBUG(LX(__func__).d("playerInFocus", playerInFocus));
auto adapterInFocus = getAdapterByLocalPlayerId(playerInFocus);
auto adapterInFocus = getAdapterByPlayerId(playerInFocus);

{
std::lock_guard<std::mutex> lock{m_inFocusAdapterMutex};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include <AVSCommon/SDKInterfaces/MockFocusManager.h>
#include <AVSCommon/SDKInterfaces/MockMessageSender.h>
#include <AVSCommon/SDKInterfaces/MockPlaybackRouter.h>
#include <AVSCommon/SDKInterfaces/MockRenderPlayerInfoCardsObserverInterface.h>
#include <AVSCommon/SDKInterfaces/MockSpeakerManager.h>
#include <AVSCommon/Utils/JSON/JSONUtils.h>
#include <AVSCommon/Utils/Logger/ConsoleLogger.h>
Expand Down Expand Up @@ -2123,6 +2124,28 @@ TEST_F(ExternalMediaPlayerTest, testSetPlayerInFocusFailsForAuthorized) {
ASSERT_TRUE(std::future_status::ready == m_wakeSetStateFuture.wait_for(MY_WAIT_TIMEOUT));
}

/**
* Test setPlayerInFocus notifies any RenderPlayerInfoCardsObservers.
*/
TEST_F(ExternalMediaPlayerTest, testSetPlayerInFocusNotfiesTemplateRuntimeObserver) {
std::promise<void> promise;
std::future<void> future = promise.get_future();

auto renderCardObserver = std::make_shared<MockRenderPlayerInfoCardsObserver>();
m_externalMediaPlayer->setObserver(renderCardObserver);

EXPECT_CALL(*renderCardObserver, onRenderPlayerCardsInfoChanged(_, _))
.WillOnce(Invoke([&promise](
avsCommon::avs::PlayerActivity state,
const RenderPlayerInfoCardsObserverInterface::Context& context) { promise.set_value(); }));

// Authorized from SetUp().
m_externalMediaPlayer->setPlayerInFocus(MSP1_PLAYER_ID);
m_externalMediaPlayer->provideState(PLAYBACK_STATE, PROVIDE_STATE_TOKEN_TEST);

ASSERT_TRUE(std::future_status::ready == future.wait_for(MY_WAIT_TIMEOUT));
}

} // namespace test
} // namespace externalMediaPlayer
} // namespace capabilityAgents
Expand Down

0 comments on commit 7da524a

Please sign in to comment.