Skip to content

feat: retry GetLicenseMetadata till buffer size is 4096#67

Merged
ahmad-kemsan merged 1 commit into
mainfrom
huzaif/license-metadata
Jun 1, 2026
Merged

feat: retry GetLicenseMetadata till buffer size is 4096#67
ahmad-kemsan merged 1 commit into
mainfrom
huzaif/license-metadata

Conversation

@mir-huzaif

Copy link
Copy Markdown
Contributor

No description provided.

@mir-huzaif mir-huzaif requested a review from ahmad-kemsan May 19, 2026 10:06
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Android LexActivator wrapper to make GetLicenseMetadata resilient to larger metadata values by retrying the native call with progressively larger buffers (up to 4096 bytes), instead of always using a fixed 256-byte buffer.

Changes:

  • Implemented a retry loop in GetLicenseMetadata that doubles the buffer size on LA_E_BUFFER_SIZE until a 4096-byte maximum.
  • Preserved existing behavior for success (LA_OK) and for non-buffer-size errors (immediate exception).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ahmad-kemsan ahmad-kemsan merged commit ee34522 into main Jun 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants