Skip to content

Commit 93fcb8a

Browse files
committed
Update Content Launcher
1 parent d70d3da commit 93fcb8a

File tree

4 files changed

+30
-1
lines changed

4 files changed

+30
-1
lines changed

examples/tv-app/android/include/content-launcher/AppContentLauncherManager.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -165,3 +165,15 @@ uint32_t AppContentLauncherManager::GetFeatureMap(chip::EndpointId endpoint)
165165
Attributes::FeatureMap::Get(endpoint, &featureMap);
166166
return featureMap;
167167
}
168+
169+
uint16_t AppContentLauncherManager::GetClusterRevision(chip::EndpointId endpoint)
170+
{
171+
if (endpoint >= EMBER_AF_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
172+
{
173+
return mDynamicClusterRevision;
174+
}
175+
176+
uint16_t clusterRevision = 0;
177+
Attributes::ClusterRevision::Get(endpoint, &clusterRevision);
178+
return clusterRevision;
179+
}

examples/tv-app/android/include/content-launcher/AppContentLauncherManager.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class AppContentLauncherManager : public ContentLauncherDelegate
5252
void SetEndpointId(EndpointId epId) { mEndpointId = epId; };
5353

5454
uint32_t GetFeatureMap(chip::EndpointId endpoint) override;
55+
uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
5556

5657
protected:
5758
std::list<std::string> mAcceptHeaderList;
@@ -62,6 +63,6 @@ class AppContentLauncherManager : public ContentLauncherDelegate
6263

6364
// TODO: set this based upon meta data from app
6465
uint32_t mDynamicEndpointFeatureMap = 3;
65-
66+
uint16_t mDynamicClusterRevision = 2;
6667
ContentAppAttributeDelegate * mAttributeDelegate;
6768
};

examples/tv-app/android/java/ContentLauncherManager.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -286,3 +286,15 @@ uint32_t ContentLauncherManager::GetFeatureMap(chip::EndpointId endpoint)
286286
Attributes::FeatureMap::Get(endpoint, &featureMap);
287287
return featureMap;
288288
}
289+
290+
uint16_t ContentLauncherManager::GetClusterRevision(chip::EndpointId endpoint)
291+
{
292+
if (endpoint >= EMBER_AF_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT)
293+
{
294+
return mDynamicClusterRevision;
295+
}
296+
297+
uint16_t clusterRevision = 0;
298+
Attributes::ClusterRevision::Get(endpoint, &clusterRevision);
299+
return clusterRevision;
300+
}

examples/tv-app/android/java/ContentLauncherManager.h

+4
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,15 @@ class ContentLauncherManager : public ContentLauncherDelegate
4848
uint32_t HandleGetSupportedStreamingProtocols() override;
4949

5050
uint32_t GetFeatureMap(chip::EndpointId endpoint) override;
51+
uint16_t GetClusterRevision(chip::EndpointId endpoint) override;
5152

5253
private:
5354
jobject mContentLauncherManagerObject = nullptr;
5455
jmethodID mGetAcceptHeaderMethod = nullptr;
5556
jmethodID mGetSupportedStreamingProtocolsMethod = nullptr;
5657
jmethodID mLaunchContentMethod = nullptr;
5758
jmethodID mLaunchUrlMethod = nullptr;
59+
60+
// TODO: set this based upon meta data from app
61+
uint16_t mDynamicClusterRevision = 2;
5862
};

0 commit comments

Comments
 (0)