Skip to content

Commit

Permalink
Set resubscriptionAttemptCallback to get notified when a resubscirpti… (
Browse files Browse the repository at this point in the history
#28788)

* Set resubscriptionAttemptCallback to get notified when a resubscirption haoppens

* Restyled by google-java-format

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
2 people authored and pull[bot] committed Nov 20, 2023
1 parent 884eb02 commit 1548100
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,6 @@ public byte[] getAttestationChallenge(long devicePtr) {
* @brief Auto-Resubscribe to the given attribute path with keepSubscriptions and isFabricFiltered
* @param SubscriptionEstablishedCallback Callback when a subscribe response has been received and
* processed
* @param ResubscriptionAttemptCallback Callback when a resubscirption haoppens, the termination
* cause is provided to help inform subsequent re-subscription logic.
* @param ReportCallback Callback when a report data has been received and processed for the given
* paths.
* @param devicePtr connected device pointer
Expand Down Expand Up @@ -619,8 +617,6 @@ public void subscribeToAttributePath(
* @brief Auto-Resubscribe to the given event path with keepSubscriptions and isFabricFiltered
* @param SubscriptionEstablishedCallback Callback when a subscribe response has been received and
* processed
* @param ResubscriptionAttemptCallback Callback when a resubscirption haoppens, the termination
* cause is provided to help inform subsequent re-subscription logic.
* @param ReportCallback Callback when a report data has been received and processed for the given
* paths.
* @param devicePtr connected device pointer
Expand Down Expand Up @@ -741,10 +737,9 @@ public void subscribeToPath(
boolean isFabricFiltered,
int imTimeoutMs,
@Nullable Long eventMin) {
// TODO: pass resubscriptionAttemptCallback to ReportCallbackJni since jni layer is not ready
// for auto-resubscribe
ReportCallbackJni jniCallback =
new ReportCallbackJni(subscriptionEstablishedCallback, reportCallback, null);
new ReportCallbackJni(
subscriptionEstablishedCallback, reportCallback, resubscriptionAttemptCallback);
subscribe(
deviceControllerPtr,
jniCallback.getCallbackHandle(),
Expand Down

0 comments on commit 1548100

Please sign in to comment.