Skip to content

Commit

Permalink
APL-CORE: October 2021 Release of APL 1.6 compilant core engine (1.6.3)
Browse files Browse the repository at this point in the history
For more details on this release refer to CHANGELOG.md

To learn about APL see: https://developer.amazon.com/docs/alexa-presentation-language/understand-apl.html
  • Loading branch information
skovba committed Oct 21, 2021
1 parent 54b75a8 commit c3da7c0
Show file tree
Hide file tree
Showing 10 changed files with 210 additions and 89 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [1.6.3]

### Changed

- Bug fixes

## [1.6.2]

### Changed
Expand Down
1 change: 1 addition & 0 deletions aplcore/include/apl/component/pagercomponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class PagerComponent : public ActionableComponent {
int pagePosition() const override { return getCalculated(kPropertyCurrentPage).asInt(); }
bool getTags(rapidjson::Value& outMap, rapidjson::Document::AllocatorType& allocator) override;
void processLayoutChanges(bool useDirtyFlag) override;
void release() override;

/// Actionable overrides
bool isHorizontal() const override { return scrollType() == kScrollTypeHorizontalPager; }
Expand Down
3 changes: 1 addition & 2 deletions aplcore/include/apl/extension/extensionclient.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,7 @@ class ExtensionClient : public Counter<ExtensionClient>,
bool mRegistrationProcessed;
bool mRegistered;
std::string mUri;
RootConfigPtr mRootConfig;
SessionPtr mSession;
std::weak_ptr<RootConfig> mRootConfig;
std::string mConnectionToken;
std::map<std::string, LiveDataRef> mLiveData;
std::map<id_type, ActionRef> mActionRefs;
Expand Down
4 changes: 4 additions & 0 deletions aplcore/include/apl/utils/session.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ class SessionMessage {

SessionMessage(const Context& context, const char *filename, const char *function);

SessionMessage(const RootConfigPtr& config, const char *filename, const char *function);

~SessionMessage();

template<class T> friend SessionMessage& operator<<(SessionMessage&& sm, T&& value)
Expand Down Expand Up @@ -128,6 +130,8 @@ class SessionMessage {
/// Report content errors using a context object (which contains a session)
#define CONSOLE_CTX(CONTEXT) SessionMessage(CONTEXT,__FILENAME__,__func__)

/// Report content errors using a config object pointer (which contains a session)
#define CONSOLE_CFGP(CONFIG_PTR) SessionMessage(CONFIG_PTR,__FILENAME__,__func__)

} // namespace apl

Expand Down
12 changes: 11 additions & 1 deletion aplcore/src/component/pagercomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,13 @@ PagerComponent::PagerComponent(const ContextPtr& context,
: ActionableComponent(context, std::move(properties), path)
{}

void
PagerComponent::release()
{
mCurrentAnimation = nullptr;
ActionableComponent::release();
}

inline Object
defaultWidth(Component& component, const RootConfig& rootConfig) {
return rootConfig.getDefaultComponentWidth(component.getType());
Expand Down Expand Up @@ -295,7 +302,10 @@ PagerComponent::endPageMove(bool fulfilled, const ActionRef& ref, bool fast)
}
markDisplayedChildrenStale();
mPageMoveHandler = nullptr;
mCurrentAnimation = nullptr;
if (mCurrentAnimation) {
mCurrentAnimation->terminate();
mCurrentAnimation = nullptr;
}
}

const ComponentPropDefSet*
Expand Down
6 changes: 2 additions & 4 deletions aplcore/src/engine/rootcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,10 @@ RootContext::RootContext(const Metrics& metrics, const ContentPtr& content, cons
}

RootContext::~RootContext() {
assert(mCore);
mCore->sequencer().terminateSequencer(ConfigChangeCommand::SEQUENCER);
clearDirty();
mCore->terminate();
mCore->dirtyVisualContext.clear();
mTimeManager->terminate();
mCore->terminate();
clearDirty();
}

void
Expand Down
Loading

0 comments on commit c3da7c0

Please sign in to comment.