From 224bbc215c2568781173fcf58060cfa6d8c8f48d Mon Sep 17 00:00:00 2001 From: Ahmad Kemsan Date: Wed, 31 Jul 2024 11:59:23 +0530 Subject: [PATCH] refactor: update data type to long for activationLeaseDuration setter --- .../com/cryptlex/android/lexactivator/LexActivator.java | 7 ++++--- .../cryptlex/android/lexactivator/LexActivatorNative.java | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivator.java b/lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivator.java index dade0b2..598c098 100644 --- a/lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivator.java +++ b/lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivator.java @@ -367,13 +367,14 @@ public static void SetReleaseChannel(String releaseChannel) throws LexActivatorE } /** - * Sets the lease duration for the activation. + * Sets the lease duration for the activation. The activation lease duration + * is honoured when the allow client lease duration property is enabled. * - * @param leaseDuration + * @param leaseDuration value of the lease duration. A value of -1 indicates unlimited lease duration. * * @throws LexActivatorException */ - public static void SetActivationLeaseDuration(int leaseDuration) throws LexActivatorException { + public static void SetActivationLeaseDuration(long leaseDuration) throws LexActivatorException { int status; status = LexActivatorNative.SetActivationLeaseDuration(leaseDuration); if (LA_OK != status) { diff --git a/lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivatorNative.java b/lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivatorNative.java index 061cea5..26da36b 100644 --- a/lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivatorNative.java +++ b/lexactivator/src/main/java/com/cryptlex/android/lexactivator/LexActivatorNative.java @@ -63,7 +63,7 @@ public interface ReleaseUpdateCallbackType extends Callback { public static native int SetReleaseChannel(String releaseChannel); - public static native int SetActivationLeaseDuration(int leaseDuration); + public static native int SetActivationLeaseDuration(long leaseDuration); public static native int SetOfflineActivationRequestMeterAttributeUses(String name, int uses);