From 956b614090dc9270805f3271250f8995582376e5 Mon Sep 17 00:00:00 2001 From: Boris Date: Thu, 30 Nov 2023 23:28:55 +0800 Subject: [PATCH] fix the commissioning function of casting-video-player (#30736) --- .../example/contentapp/receiver/MatterCommandReceiver.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/tv-app/android/App/content-app/src/main/java/com/example/contentapp/receiver/MatterCommandReceiver.java b/examples/tv-app/android/App/content-app/src/main/java/com/example/contentapp/receiver/MatterCommandReceiver.java index 1ff92853ec8648..6a4eb77cb4be3b 100644 --- a/examples/tv-app/android/App/content-app/src/main/java/com/example/contentapp/receiver/MatterCommandReceiver.java +++ b/examples/tv-app/android/App/content-app/src/main/java/com/example/contentapp/receiver/MatterCommandReceiver.java @@ -28,8 +28,8 @@ public void onReceive(Context context, Intent intent) { switch (intentAction) { case MatterIntentConstants.ACTION_MATTER_COMMAND: - int commandId = intent.getIntExtra(MatterIntentConstants.EXTRA_COMMAND_ID, -1); - int clusterId = intent.getIntExtra(MatterIntentConstants.EXTRA_CLUSTER_ID, -1); + long commandId = intent.getLongExtra(MatterIntentConstants.EXTRA_COMMAND_ID, -1); + long clusterId = intent.getLongExtra(MatterIntentConstants.EXTRA_CLUSTER_ID, -1); if (commandId != -1) { byte[] commandPayload = intent.getByteArrayExtra(MatterIntentConstants.EXTRA_COMMAND_PAYLOAD); @@ -56,7 +56,7 @@ public void onReceive(Context context, Intent intent) { sendResponseViaPendingIntent(context, intent, response); } else { - int attributeId = intent.getIntExtra(MatterIntentConstants.EXTRA_ATTRIBUTE_ID, -1); + long attributeId = intent.getLongExtra(MatterIntentConstants.EXTRA_ATTRIBUTE_ID, -1); String attributeAction = intent.getStringExtra(MatterIntentConstants.EXTRA_ATTRIBUTE_ACTION); if (attributeAction.equals(MatterIntentConstants.ATTRIBUTE_ACTION_READ)) {