From 5d31ef8c2b2a06c2e7bebe881a0d212338136a21 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Fri, 3 May 2024 21:12:17 +0900
Subject: [PATCH] Bump jni from 0.8.0 to 0.9.0 in /experimental/pedometer
(#2268)
Bumps [jni](https://github.com/dart-lang/native/tree/main/pkgs) from
0.8.0 to 0.9.0.
Commits
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jni&package-manager=pub&previous-version=0.8.0&new-version=0.9.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
---------
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Parker Lougheed
---
experimental/pedometer/example/pubspec.yaml | 2 +-
.../pedometer/lib/health_connect.dart | 20909 +++++++++++-----
experimental/pedometer/pubspec.yaml | 2 +-
3 files changed, 14352 insertions(+), 6561 deletions(-)
diff --git a/experimental/pedometer/example/pubspec.yaml b/experimental/pedometer/example/pubspec.yaml
index 742e4a7b4..716b056dc 100644
--- a/experimental/pedometer/example/pubspec.yaml
+++ b/experimental/pedometer/example/pubspec.yaml
@@ -41,7 +41,7 @@ dependencies:
ffi: ^2.1.2
intl: ^0.19.0
- jni: ^0.8.0
+ jni: ^0.9.0
fl_chart: ^0.67.0
dev_dependencies:
diff --git a/experimental/pedometer/lib/health_connect.dart b/experimental/pedometer/lib/health_connect.dart
index 79fc483a5..718376d50 100644
--- a/experimental/pedometer/lib/health_connect.dart
+++ b/experimental/pedometer/lib/health_connect.dart
@@ -16,75 +16,94 @@
// ignore_for_file: unused_import
// ignore_for_file: unused_local_variable
// ignore_for_file: unused_shown_name
+// ignore_for_file: use_super_parameters
import "dart:isolate" show ReceivePort;
import "dart:ffi" as ffi;
import "package:jni/internal_helpers_for_jnigen.dart";
import "package:jni/jni.dart" as jni;
-// Auto-generated initialization code.
-
-final ffi.Pointer Function(String sym) jniLookup =
- ProtectedJniExtensions.initGeneratedLibrary("health_connect");
-
/// from: androidx.health.connect.client.HealthConnectClient$Companion
class HealthConnectClient_Companion extends jni.JObject {
@override
late final jni.JObjType $type = type;
HealthConnectClient_Companion.fromReference(
- super.reference,
- ) : super.fromReference();
+ jni.JReference reference,
+ ) : super.fromReference(reference);
+
+ static final _class = jni.JClass.forName(
+ r"androidx/health/connect/client/HealthConnectClient$Companion");
/// The type which includes information such as the signature of this class.
static const type = $HealthConnectClient_CompanionType();
- static final _get_DEFAULT_PROVIDER_PACKAGE_NAME = jniLookup<
- ffi.NativeFunction>(
- "get_HealthConnectClient_Companion__DEFAULT_PROVIDER_PACKAGE_NAME")
- .asFunction();
+ static final _id_DEFAULT_PROVIDER_PACKAGE_NAME = _class.staticFieldId(
+ r"DEFAULT_PROVIDER_PACKAGE_NAME",
+ r"Ljava/lang/String;",
+ );
/// from: static public final java.lang.String DEFAULT_PROVIDER_PACKAGE_NAME
/// The returned object must be released after use, by calling the [release] method.
static jni.JString get DEFAULT_PROVIDER_PACKAGE_NAME =>
- _get_DEFAULT_PROVIDER_PACKAGE_NAME().object(const jni.JStringType());
+ _id_DEFAULT_PROVIDER_PACKAGE_NAME.get(_class, const jni.JStringType());
- static final _get_HEALTH_CONNECT_CLIENT_TAG =
- jniLookup>(
- "get_HealthConnectClient_Companion__HEALTH_CONNECT_CLIENT_TAG")
- .asFunction();
+ static final _id_HEALTH_CONNECT_CLIENT_TAG = _class.staticFieldId(
+ r"HEALTH_CONNECT_CLIENT_TAG",
+ r"Ljava/lang/String;",
+ );
/// from: static public final java.lang.String HEALTH_CONNECT_CLIENT_TAG
/// The returned object must be released after use, by calling the [release] method.
static jni.JString get HEALTH_CONNECT_CLIENT_TAG =>
- _get_HEALTH_CONNECT_CLIENT_TAG().object(const jni.JStringType());
+ _id_HEALTH_CONNECT_CLIENT_TAG.get(_class, const jni.JStringType());
- static final _isAvailable = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer,
- ffi.Pointer, ffi.Pointer)>>(
- "HealthConnectClient_Companion__isAvailable")
+ static final _id_isAvailable = _class.instanceMethodId(
+ r"isAvailable",
+ r"(Landroid/content/Context;Ljava/util/List;)Z",
+ );
+
+ static final _isAvailable = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallBooleanMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public final boolean isAvailable(android.content.Context context, java.util.List list)
bool isAvailable(
Context context,
jni.JList list,
) {
- return _isAvailable(reference.pointer, context.reference.pointer,
- list.reference.pointer)
+ return _isAvailable(reference.pointer, _id_isAvailable as jni.JMethodIDPtr,
+ context.reference.pointer, list.reference.pointer)
.boolean;
}
- static final _getOrCreate = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer,
- ffi.Pointer, ffi.Pointer)>>(
- "HealthConnectClient_Companion__getOrCreate")
+ static final _id_getOrCreate = _class.instanceMethodId(
+ r"getOrCreate",
+ r"(Landroid/content/Context;Ljava/util/List;)Landroidx/health/connect/client/HealthConnectClient;",
+ );
+
+ static final _getOrCreate = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public final androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context, java.util.List list)
/// The returned object must be released after use, by calling the [release] method.
@@ -92,42 +111,59 @@ class HealthConnectClient_Companion extends jni.JObject {
Context context,
jni.JList list,
) {
- return _getOrCreate(reference.pointer, context.reference.pointer,
- list.reference.pointer)
+ return _getOrCreate(reference.pointer, _id_getOrCreate as jni.JMethodIDPtr,
+ context.reference.pointer, list.reference.pointer)
.object(const $HealthConnectClientType());
}
- static final _isAvailable1 = jniLookup<
+ static final _id_isAvailable1 = _class.instanceMethodId(
+ r"isAvailable",
+ r"(Landroid/content/Context;)Z",
+ );
+
+ static final _isAvailable1 = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
jni.JniResult Function(
- ffi.Pointer, ffi.Pointer)>>(
- "HealthConnectClient_Companion__isAvailable1")
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<(ffi.Pointer,)>)>>(
+ "globalEnv_CallBooleanMethod")
.asFunction<
- jni.JniResult Function(
- ffi.Pointer, ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer)>();
/// from: public final boolean isAvailable(android.content.Context context)
bool isAvailable1(
Context context,
) {
- return _isAvailable1(reference.pointer, context.reference.pointer).boolean;
+ return _isAvailable1(reference.pointer,
+ _id_isAvailable1 as jni.JMethodIDPtr, context.reference.pointer)
+ .boolean;
}
- static final _getOrCreate1 = jniLookup<
+ static final _id_getOrCreate1 = _class.instanceMethodId(
+ r"getOrCreate",
+ r"(Landroid/content/Context;)Landroidx/health/connect/client/HealthConnectClient;",
+ );
+
+ static final _getOrCreate1 = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
jni.JniResult Function(
- ffi.Pointer, ffi.Pointer)>>(
- "HealthConnectClient_Companion__getOrCreate1")
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<(ffi.Pointer,)>)>>(
+ "globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(
- ffi.Pointer, ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer)>();
/// from: public final androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context)
/// The returned object must be released after use, by calling the [release] method.
HealthConnectClient getOrCreate1(
Context context,
) {
- return _getOrCreate1(reference.pointer, context.reference.pointer)
+ return _getOrCreate1(reference.pointer,
+ _id_getOrCreate1 as jni.JMethodIDPtr, context.reference.pointer)
.object(const $HealthConnectClientType());
}
}
@@ -166,63 +202,87 @@ class HealthConnectClient extends jni.JObject {
late final jni.JObjType $type = type;
HealthConnectClient.fromReference(
- super.reference,
- ) : super.fromReference();
+ jni.JReference reference,
+ ) : super.fromReference(reference);
+
+ static final _class =
+ jni.JClass.forName(r"androidx/health/connect/client/HealthConnectClient");
/// The type which includes information such as the signature of this class.
static const type = $HealthConnectClientType();
- static final _get_Companion =
- jniLookup>(
- "get_HealthConnectClient__Companion")
- .asFunction();
+ static final _id_Companion = _class.staticFieldId(
+ r"Companion",
+ r"Landroidx/health/connect/client/HealthConnectClient$Companion;",
+ );
/// from: static public final androidx.health.connect.client.HealthConnectClient$Companion Companion
/// The returned object must be released after use, by calling the [release] method.
static HealthConnectClient_Companion get Companion =>
- _get_Companion().object(const $HealthConnectClient_CompanionType());
+ _id_Companion.get(_class, const $HealthConnectClient_CompanionType());
- static final _get_DEFAULT_PROVIDER_PACKAGE_NAME =
- jniLookup>(
- "get_HealthConnectClient__DEFAULT_PROVIDER_PACKAGE_NAME")
- .asFunction();
+ static final _id_DEFAULT_PROVIDER_PACKAGE_NAME = _class.staticFieldId(
+ r"DEFAULT_PROVIDER_PACKAGE_NAME",
+ r"Ljava/lang/String;",
+ );
/// from: static public final java.lang.String DEFAULT_PROVIDER_PACKAGE_NAME
/// The returned object must be released after use, by calling the [release] method.
static jni.JString get DEFAULT_PROVIDER_PACKAGE_NAME =>
- _get_DEFAULT_PROVIDER_PACKAGE_NAME().object(const jni.JStringType());
+ _id_DEFAULT_PROVIDER_PACKAGE_NAME.get(_class, const jni.JStringType());
- static final _get_HEALTH_CONNECT_CLIENT_TAG =
- jniLookup>(
- "get_HealthConnectClient__HEALTH_CONNECT_CLIENT_TAG")
- .asFunction();
+ static final _id_HEALTH_CONNECT_CLIENT_TAG = _class.staticFieldId(
+ r"HEALTH_CONNECT_CLIENT_TAG",
+ r"Ljava/lang/String;",
+ );
/// from: static public final java.lang.String HEALTH_CONNECT_CLIENT_TAG
/// The returned object must be released after use, by calling the [release] method.
static jni.JString get HEALTH_CONNECT_CLIENT_TAG =>
- _get_HEALTH_CONNECT_CLIENT_TAG().object(const jni.JStringType());
+ _id_HEALTH_CONNECT_CLIENT_TAG.get(_class, const jni.JStringType());
+
+ static final _id_getPermissionController = _class.instanceMethodId(
+ r"getPermissionController",
+ r"()Landroidx/health/connect/client/PermissionController;",
+ );
- static final _getPermissionController = jniLookup<
- ffi
- .NativeFunction)>>(
- "HealthConnectClient__getPermissionController")
- .asFunction)>();
+ static final _getPermissionController = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ )>>("globalEnv_CallObjectMethod")
+ .asFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ )>();
/// from: public abstract androidx.health.connect.client.PermissionController getPermissionController()
/// The returned object must be released after use, by calling the [release] method.
PermissionController getPermissionController() {
- return _getPermissionController(reference.pointer)
+ return _getPermissionController(
+ reference.pointer, _id_getPermissionController as jni.JMethodIDPtr)
.object(const $PermissionControllerType());
}
- static final _insertRecords = jniLookup<
+ static final _id_insertRecords = _class.instanceMethodId(
+ r"insertRecords",
+ r"(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _insertRecords = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
jni.JniResult Function(
ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer)>>("HealthConnectClient__insertRecords")
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public abstract java.lang.Object insertRecords(java.util.List list, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -232,8 +292,8 @@ class HealthConnectClient extends jni.JObject {
final $p = ReceivePort();
final $c = jni.JObject.fromReference(
ProtectedJniExtensions.newPortContinuation($p));
- _insertRecords(
- reference.pointer, list.reference.pointer, $c.reference.pointer)
+ _insertRecords(reference.pointer, _id_insertRecords as jni.JMethodIDPtr,
+ list.reference.pointer, $c.reference.pointer)
.object(const jni.JObjectType());
final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first));
final $k = const jni.JObjectType().jClass.reference.pointer;
@@ -243,15 +303,24 @@ class HealthConnectClient extends jni.JObject {
return const jni.JObjectType().fromReference($o);
}
- static final _updateRecords = jniLookup<
+ static final _id_updateRecords = _class.instanceMethodId(
+ r"updateRecords",
+ r"(Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _updateRecords = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
jni.JniResult Function(
ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer)>>("HealthConnectClient__updateRecords")
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public abstract java.lang.Object updateRecords(java.util.List list, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -261,8 +330,8 @@ class HealthConnectClient extends jni.JObject {
final $p = ReceivePort();
final $c = jni.JObject.fromReference(
ProtectedJniExtensions.newPortContinuation($p));
- _updateRecords(
- reference.pointer, list.reference.pointer, $c.reference.pointer)
+ _updateRecords(reference.pointer, _id_updateRecords as jni.JMethodIDPtr,
+ list.reference.pointer, $c.reference.pointer)
.object(const jni.JObjectType());
final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first));
final $k = const jni.JObjectType().jClass.reference.pointer;
@@ -272,17 +341,27 @@ class HealthConnectClient extends jni.JObject {
return const jni.JObjectType().fromReference($o);
}
- static final _deleteRecords = jniLookup<
+ static final _id_deleteRecords = _class.instanceMethodId(
+ r"deleteRecords",
+ r"(Lkotlin/reflect/KClass;Ljava/util/List;Ljava/util/List;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _deleteRecords = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
jni.JniResult Function(
ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer)>>("HealthConnectClient__deleteRecords")
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
jni.JniResult Function(
ffi.Pointer,
+ jni.JMethodIDPtr,
ffi.Pointer,
ffi.Pointer,
ffi.Pointer,
@@ -300,6 +379,7 @@ class HealthConnectClient extends jni.JObject {
ProtectedJniExtensions.newPortContinuation($p));
_deleteRecords(
reference.pointer,
+ _id_deleteRecords as jni.JMethodIDPtr,
kClass.reference.pointer,
list.reference.pointer,
list1.reference.pointer,
@@ -313,17 +393,29 @@ class HealthConnectClient extends jni.JObject {
return const jni.JObjectType().fromReference($o);
}
- static final _deleteRecords1 = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer)>>(
- "HealthConnectClient__deleteRecords1")
+ static final _id_deleteRecords1 = _class.instanceMethodId(
+ r"deleteRecords",
+ r"(Lkotlin/reflect/KClass;Landroidx/health/connect/client/time/TimeRangeFilter;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _deleteRecords1 = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer, ffi.Pointer)>();
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>();
/// from: public abstract java.lang.Object deleteRecords(kotlin.reflect.KClass kClass, androidx.health.connect.client.time.TimeRangeFilter timeRangeFilter, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -334,8 +426,12 @@ class HealthConnectClient extends jni.JObject {
final $p = ReceivePort();
final $c = jni.JObject.fromReference(
ProtectedJniExtensions.newPortContinuation($p));
- _deleteRecords1(reference.pointer, kClass.reference.pointer,
- timeRangeFilter.reference.pointer, $c.reference.pointer)
+ _deleteRecords1(
+ reference.pointer,
+ _id_deleteRecords1 as jni.JMethodIDPtr,
+ kClass.reference.pointer,
+ timeRangeFilter.reference.pointer,
+ $c.reference.pointer)
.object(const jni.JObjectType());
final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first));
final $k = const jni.JObjectType().jClass.reference.pointer;
@@ -345,16 +441,29 @@ class HealthConnectClient extends jni.JObject {
return const jni.JObjectType().fromReference($o);
}
- static final _readRecord = jniLookup<
+ static final _id_readRecord = _class.instanceMethodId(
+ r"readRecord",
+ r"(Lkotlin/reflect/KClass;Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _readRecord = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
jni.JniResult Function(
ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer)>>("HealthConnectClient__readRecord")
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer, ffi.Pointer)>();
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>();
/// from: public abstract java.lang.Object readRecord(kotlin.reflect.KClass kClass, java.lang.String string, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -366,8 +475,12 @@ class HealthConnectClient extends jni.JObject {
final $p = ReceivePort();
final $c = jni.JObject.fromReference(
ProtectedJniExtensions.newPortContinuation($p));
- _readRecord(reference.pointer, kClass.reference.pointer,
- string.reference.pointer, $c.reference.pointer)
+ _readRecord(
+ reference.pointer,
+ _id_readRecord as jni.JMethodIDPtr,
+ kClass.reference.pointer,
+ string.reference.pointer,
+ $c.reference.pointer)
.object(const jni.JObjectType());
final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first));
final $k = const jni.JObjectType().jClass.reference.pointer;
@@ -377,15 +490,24 @@ class HealthConnectClient extends jni.JObject {
return const jni.JObjectType().fromReference($o);
}
- static final _readRecords = jniLookup<
+ static final _id_readRecords = _class.instanceMethodId(
+ r"readRecords",
+ r"(Landroidx/health/connect/client/request/ReadRecordsRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _readRecords = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
jni.JniResult Function(
ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer)>>("HealthConnectClient__readRecords")
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public abstract java.lang.Object readRecords(androidx.health.connect.client.request.ReadRecordsRequest readRecordsRequest, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -399,8 +521,8 @@ class HealthConnectClient extends jni.JObject {
final $p = ReceivePort();
final $c = jni.JObject.fromReference(
ProtectedJniExtensions.newPortContinuation($p));
- _readRecords(reference.pointer, readRecordsRequest.reference.pointer,
- $c.reference.pointer)
+ _readRecords(reference.pointer, _id_readRecords as jni.JMethodIDPtr,
+ readRecordsRequest.reference.pointer, $c.reference.pointer)
.object(const jni.JObjectType());
final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first));
final $k = const jni.JObjectType().jClass.reference.pointer;
@@ -410,15 +532,24 @@ class HealthConnectClient extends jni.JObject {
return const jni.JObjectType().fromReference($o);
}
- static final _aggregate = jniLookup<
+ static final _id_aggregate = _class.instanceMethodId(
+ r"aggregate",
+ r"(Landroidx/health/connect/client/request/AggregateRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _aggregate = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
jni.JniResult Function(
ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer)>>("HealthConnectClient__aggregate")
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public abstract java.lang.Object aggregate(androidx.health.connect.client.request.AggregateRequest aggregateRequest, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -428,8 +559,8 @@ class HealthConnectClient extends jni.JObject {
final $p = ReceivePort();
final $c = jni.JObject.fromReference(
ProtectedJniExtensions.newPortContinuation($p));
- _aggregate(reference.pointer, aggregateRequest.reference.pointer,
- $c.reference.pointer)
+ _aggregate(reference.pointer, _id_aggregate as jni.JMethodIDPtr,
+ aggregateRequest.reference.pointer, $c.reference.pointer)
.object(const jni.JObjectType());
final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first));
final $k = const $AggregationResultType().jClass.reference.pointer;
@@ -439,14 +570,24 @@ class HealthConnectClient extends jni.JObject {
return const $AggregationResultType().fromReference($o);
}
- static final _aggregateGroupByDuration = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer,
- ffi.Pointer, ffi.Pointer)>>(
- "HealthConnectClient__aggregateGroupByDuration")
+ static final _id_aggregateGroupByDuration = _class.instanceMethodId(
+ r"aggregateGroupByDuration",
+ r"(Landroidx/health/connect/client/request/AggregateGroupByDurationRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _aggregateGroupByDuration = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public abstract java.lang.Object aggregateGroupByDuration(androidx.health.connect.client.request.AggregateGroupByDurationRequest aggregateGroupByDurationRequest, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -458,6 +599,7 @@ class HealthConnectClient extends jni.JObject {
ProtectedJniExtensions.newPortContinuation($p));
_aggregateGroupByDuration(
reference.pointer,
+ _id_aggregateGroupByDuration as jni.JMethodIDPtr,
aggregateGroupByDurationRequest.reference.pointer,
$c.reference.pointer)
.object(const jni.JObjectType());
@@ -469,14 +611,24 @@ class HealthConnectClient extends jni.JObject {
return const jni.JListType(jni.JObjectType()).fromReference($o);
}
- static final _aggregateGroupByPeriod = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer,
- ffi.Pointer, ffi.Pointer)>>(
- "HealthConnectClient__aggregateGroupByPeriod")
+ static final _id_aggregateGroupByPeriod = _class.instanceMethodId(
+ r"aggregateGroupByPeriod",
+ r"(Landroidx/health/connect/client/request/AggregateGroupByPeriodRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _aggregateGroupByPeriod = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public abstract java.lang.Object aggregateGroupByPeriod(androidx.health.connect.client.request.AggregateGroupByPeriodRequest aggregateGroupByPeriodRequest, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -488,6 +640,7 @@ class HealthConnectClient extends jni.JObject {
ProtectedJniExtensions.newPortContinuation($p));
_aggregateGroupByPeriod(
reference.pointer,
+ _id_aggregateGroupByPeriod as jni.JMethodIDPtr,
aggregateGroupByPeriodRequest.reference.pointer,
$c.reference.pointer)
.object(const jni.JObjectType());
@@ -499,14 +652,24 @@ class HealthConnectClient extends jni.JObject {
return const jni.JListType(jni.JObjectType()).fromReference($o);
}
- static final _getChangesToken = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer,
- ffi.Pointer, ffi.Pointer)>>(
- "HealthConnectClient__getChangesToken")
+ static final _id_getChangesToken = _class.instanceMethodId(
+ r"getChangesToken",
+ r"(Landroidx/health/connect/client/request/ChangesTokenRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _getChangesToken = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public abstract java.lang.Object getChangesToken(androidx.health.connect.client.request.ChangesTokenRequest changesTokenRequest, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -516,8 +679,8 @@ class HealthConnectClient extends jni.JObject {
final $p = ReceivePort();
final $c = jni.JObject.fromReference(
ProtectedJniExtensions.newPortContinuation($p));
- _getChangesToken(reference.pointer, changesTokenRequest.reference.pointer,
- $c.reference.pointer)
+ _getChangesToken(reference.pointer, _id_getChangesToken as jni.JMethodIDPtr,
+ changesTokenRequest.reference.pointer, $c.reference.pointer)
.object(const jni.JObjectType());
final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first));
final $k = const jni.JStringType().jClass.reference.pointer;
@@ -527,17 +690,29 @@ class HealthConnectClient extends jni.JObject {
return const jni.JStringType().fromReference($o);
}
- static final _registerForDataNotifications = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(
- ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer)>>(
- "HealthConnectClient__registerForDataNotifications")
+ static final _id_registerForDataNotifications = _class.instanceMethodId(
+ r"registerForDataNotifications",
+ r"(Ljava/lang/String;Ljava/lang/Iterable;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _registerForDataNotifications = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer, ffi.Pointer)>();
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.Pointer,
+ ffi.Pointer,
+ ffi.Pointer)>();
/// from: public abstract java.lang.Object registerForDataNotifications(java.lang.String string, java.lang.Iterable iterable, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -548,8 +723,12 @@ class HealthConnectClient extends jni.JObject {
final $p = ReceivePort();
final $c = jni.JObject.fromReference(
ProtectedJniExtensions.newPortContinuation($p));
- _registerForDataNotifications(reference.pointer, string.reference.pointer,
- iterable.reference.pointer, $c.reference.pointer)
+ _registerForDataNotifications(
+ reference.pointer,
+ _id_registerForDataNotifications as jni.JMethodIDPtr,
+ string.reference.pointer,
+ iterable.reference.pointer,
+ $c.reference.pointer)
.object(const jni.JObjectType());
final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first));
final $k = const jni.JObjectType().jClass.reference.pointer;
@@ -559,14 +738,24 @@ class HealthConnectClient extends jni.JObject {
return const jni.JObjectType().fromReference($o);
}
- static final _unregisterFromDataNotifications = jniLookup<
- ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer,
- ffi.Pointer, ffi.Pointer)>>(
- "HealthConnectClient__unregisterFromDataNotifications")
+ static final _id_unregisterFromDataNotifications = _class.instanceMethodId(
+ r"unregisterFromDataNotifications",
+ r"(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _unregisterFromDataNotifications = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public abstract java.lang.Object unregisterFromDataNotifications(java.lang.String string, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -577,7 +766,10 @@ class HealthConnectClient extends jni.JObject {
final $c = jni.JObject.fromReference(
ProtectedJniExtensions.newPortContinuation($p));
_unregisterFromDataNotifications(
- reference.pointer, string.reference.pointer, $c.reference.pointer)
+ reference.pointer,
+ _id_unregisterFromDataNotifications as jni.JMethodIDPtr,
+ string.reference.pointer,
+ $c.reference.pointer)
.object(const jni.JObjectType());
final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first));
final $k = const jni.JObjectType().jClass.reference.pointer;
@@ -587,15 +779,24 @@ class HealthConnectClient extends jni.JObject {
return const jni.JObjectType().fromReference($o);
}
- static final _getChanges = jniLookup<
+ static final _id_getChanges = _class.instanceMethodId(
+ r"getChanges",
+ r"(Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;",
+ );
+
+ static final _getChanges = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
jni.JniResult Function(
ffi.Pointer,
- ffi.Pointer,
- ffi.Pointer)>>("HealthConnectClient__getChanges")
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallObjectMethod")
.asFunction<
- jni.JniResult Function(ffi.Pointer, ffi.Pointer,
- ffi.Pointer)>();
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer, ffi.Pointer)>();
/// from: public abstract java.lang.Object getChanges(java.lang.String string, kotlin.coroutines.Continuation continuation)
/// The returned object must be released after use, by calling the [release] method.
@@ -605,8 +806,8 @@ class HealthConnectClient extends jni.JObject {
final $p = ReceivePort();
final $c = jni.JObject.fromReference(
ProtectedJniExtensions.newPortContinuation($p));
- _getChanges(
- reference.pointer, string.reference.pointer, $c.reference.pointer)
+ _getChanges(reference.pointer, _id_getChanges as jni.JMethodIDPtr,
+ string.reference.pointer, $c.reference.pointer)
.object(const jni.JObjectType());
final $o = jni.JGlobalReference(jni.JObjectPtr.fromAddress(await $p.first));
final $k = const jni.JObjectType().jClass.reference.pointer;
@@ -616,12 +817,23 @@ class HealthConnectClient extends jni.JObject {
return const jni.JObjectType().fromReference($o);
}
- static final _isAvailable = jniLookup<
+ static final _id_isAvailable = _class.staticMethodId(
+ r"isAvailable",
+ r"(Landroid/content/Context;Ljava/util/List;)Z",
+ );
+
+ static final _isAvailable = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer,
- ffi.Pointer)>>("HealthConnectClient__isAvailable")
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallStaticBooleanMethod")
.asFunction<
- jni.JniResult Function(
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
ffi.Pointer, ffi.Pointer)>();
/// from: static public boolean isAvailable(android.content.Context context, java.util.List list)
@@ -629,16 +841,31 @@ class HealthConnectClient extends jni.JObject {
Context context,
jni.JList list,
) {
- return _isAvailable(context.reference.pointer, list.reference.pointer)
+ return _isAvailable(
+ _class.reference.pointer,
+ _id_isAvailable as jni.JMethodIDPtr,
+ context.reference.pointer,
+ list.reference.pointer)
.boolean;
}
- static final _getOrCreate = jniLookup<
+ static final _id_getOrCreate = _class.staticMethodId(
+ r"getOrCreate",
+ r"(Landroid/content/Context;Ljava/util/List;)Landroidx/health/connect/client/HealthConnectClient;",
+ );
+
+ static final _getOrCreate = ProtectedJniExtensions.lookup<
ffi.NativeFunction<
- jni.JniResult Function(ffi.Pointer,
- ffi.Pointer)>>("HealthConnectClient__getOrCreate")
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<
+ (
+ ffi.Pointer,
+ ffi.Pointer
+ )>)>>("globalEnv_CallStaticObjectMethod")
.asFunction<
- jni.JniResult Function(
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
ffi.Pointer, ffi.Pointer)>();
/// from: static public androidx.health.connect.client.HealthConnectClient getOrCreate(android.content.Context context, java.util.List list)
@@ -647,35 +874,62 @@ class HealthConnectClient extends jni.JObject {
Context context,
jni.JList list,
) {
- return _getOrCreate(context.reference.pointer, list.reference.pointer)
+ return _getOrCreate(
+ _class.reference.pointer,
+ _id_getOrCreate as jni.JMethodIDPtr,
+ context.reference.pointer,
+ list.reference.pointer)
.object(const $HealthConnectClientType());
}
- static final _isAvailable1 = jniLookup<
- ffi
- .NativeFunction)>>(
- "HealthConnectClient__isAvailable1")
- .asFunction)>();
+ static final _id_isAvailable1 = _class.staticMethodId(
+ r"isAvailable",
+ r"(Landroid/content/Context;)Z",
+ );
+
+ static final _isAvailable1 = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<(ffi.Pointer,)>)>>(
+ "globalEnv_CallStaticBooleanMethod")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer)>();
/// from: static public boolean isAvailable(android.content.Context context)
static bool isAvailable1(
Context context,
) {
- return _isAvailable1(context.reference.pointer).boolean;
+ return _isAvailable1(_class.reference.pointer,
+ _id_isAvailable1 as jni.JMethodIDPtr, context.reference.pointer)
+ .boolean;
}
- static final _getOrCreate1 = jniLookup<
- ffi
- .NativeFunction)>>(
- "HealthConnectClient__getOrCreate1")
- .asFunction)>();
+ static final _id_getOrCreate1 = _class.staticMethodId(
+ r"getOrCreate",
+ r"(Landroid/content/Context;)Landroidx/health/connect/client/HealthConnectClient;",
+ );
+
+ static final _getOrCreate1 = ProtectedJniExtensions.lookup<
+ ffi.NativeFunction<
+ jni.JniResult Function(
+ ffi.Pointer,
+ jni.JMethodIDPtr,
+ ffi.VarArgs<(ffi.Pointer,)>)>>(
+ "globalEnv_CallStaticObjectMethod")
+ .asFunction<
+ jni.JniResult Function(ffi.Pointer, jni.JMethodIDPtr,
+ ffi.Pointer