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

Commit 7da524a

Browse files
Version 1.19.1 alexa-client-sdk
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).
1 parent c381bd8 commit 7da524a

File tree

6 files changed

+72
-4
lines changed

6 files changed

+72
-4
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0/
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
#ifndef ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_TEST_AVSCOMMON_SDKINTERFACES_MOCKRENDERPLAYERINFOCARDSOBSERVERINTERFACE_H_
17+
#define ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_TEST_AVSCOMMON_SDKINTERFACES_MOCKRENDERPLAYERINFOCARDSOBSERVERINTERFACE_H_
18+
19+
#include "AVSCommon/SDKInterfaces/RenderPlayerInfoCardsObserverInterface.h"
20+
#include <gmock/gmock.h>
21+
22+
namespace alexaClientSDK {
23+
namespace avsCommon {
24+
namespace sdkInterfaces {
25+
namespace test {
26+
27+
/**
28+
* Mock class implementing @c RenderPlayerInfoCardsObserverInterface
29+
*/
30+
class MockRenderPlayerInfoCardsObserver : public RenderPlayerInfoCardsObserverInterface {
31+
public:
32+
MOCK_METHOD2(onRenderPlayerCardsInfoChanged, void(avsCommon::avs::PlayerActivity state, const Context& context));
33+
};
34+
35+
} // namespace test
36+
} // namespace sdkInterfaces
37+
} // namespace avsCommon
38+
} // namespace alexaClientSDK
39+
40+
#endif // ALEXA_CLIENT_SDK_AVSCOMMON_SDKINTERFACES_TEST_AVSCOMMON_SDKINTERFACES_MOCKRENDERPLAYERINFOCARDSOBSERVERINTERFACE_H_

AVSCommon/Utils/include/AVSCommon/Utils/SDKVersion.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace utils {
2929
namespace sdkVersion {
3030

3131
inline static std::string getCurrentVersion() {
32-
return "1.19.0";
32+
return "1.19.1";
3333
}
3434

3535
inline static int getMajorVersion() {
@@ -41,7 +41,7 @@ inline static int getMinorVersion() {
4141
}
4242

4343
inline static int getPatchVersion() {
44-
return 0;
44+
return 1;
4545
}
4646

4747
} // namespace sdkVersion

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## ChangeLog
22

3+
### Version 1.19.1 - April 27 2020
4+
* Fixed a bug that caused Display Cards for certain EMP adapters to stop rendering.
5+
6+
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)
7+
38
### Version 1.19.0 - April 13 2020
49
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)
510

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
22

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

77
# This variable should be used by extension packages to include cmake files from this project.

CapabilityAgents/ExternalMediaPlayer/src/ExternalMediaPlayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1059,7 +1059,7 @@ void ExternalMediaPlayer::setPlayerInFocus(const std::string& playerInFocus) {
10591059
}
10601060
}
10611061
ACSDK_DEBUG(LX(__func__).d("playerInFocus", playerInFocus));
1062-
auto adapterInFocus = getAdapterByLocalPlayerId(playerInFocus);
1062+
auto adapterInFocus = getAdapterByPlayerId(playerInFocus);
10631063

10641064
{
10651065
std::lock_guard<std::mutex> lock{m_inFocusAdapterMutex};

CapabilityAgents/ExternalMediaPlayer/test/ExternalMediaPlayerTest.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#include <AVSCommon/SDKInterfaces/MockFocusManager.h>
3939
#include <AVSCommon/SDKInterfaces/MockMessageSender.h>
4040
#include <AVSCommon/SDKInterfaces/MockPlaybackRouter.h>
41+
#include <AVSCommon/SDKInterfaces/MockRenderPlayerInfoCardsObserverInterface.h>
4142
#include <AVSCommon/SDKInterfaces/MockSpeakerManager.h>
4243
#include <AVSCommon/Utils/JSON/JSONUtils.h>
4344
#include <AVSCommon/Utils/Logger/ConsoleLogger.h>
@@ -2123,6 +2124,28 @@ TEST_F(ExternalMediaPlayerTest, testSetPlayerInFocusFailsForAuthorized) {
21232124
ASSERT_TRUE(std::future_status::ready == m_wakeSetStateFuture.wait_for(MY_WAIT_TIMEOUT));
21242125
}
21252126

2127+
/**
2128+
* Test setPlayerInFocus notifies any RenderPlayerInfoCardsObservers.
2129+
*/
2130+
TEST_F(ExternalMediaPlayerTest, testSetPlayerInFocusNotfiesTemplateRuntimeObserver) {
2131+
std::promise<void> promise;
2132+
std::future<void> future = promise.get_future();
2133+
2134+
auto renderCardObserver = std::make_shared<MockRenderPlayerInfoCardsObserver>();
2135+
m_externalMediaPlayer->setObserver(renderCardObserver);
2136+
2137+
EXPECT_CALL(*renderCardObserver, onRenderPlayerCardsInfoChanged(_, _))
2138+
.WillOnce(Invoke([&promise](
2139+
avsCommon::avs::PlayerActivity state,
2140+
const RenderPlayerInfoCardsObserverInterface::Context& context) { promise.set_value(); }));
2141+
2142+
// Authorized from SetUp().
2143+
m_externalMediaPlayer->setPlayerInFocus(MSP1_PLAYER_ID);
2144+
m_externalMediaPlayer->provideState(PLAYBACK_STATE, PROVIDE_STATE_TOKEN_TEST);
2145+
2146+
ASSERT_TRUE(std::future_status::ready == future.wait_for(MY_WAIT_TIMEOUT));
2147+
}
2148+
21262149
} // namespace test
21272150
} // namespace externalMediaPlayer
21282151
} // namespace capabilityAgents

0 commit comments

Comments
 (0)