diff --git a/packages/path_provider/path_provider_android/CHANGELOG.md b/packages/path_provider/path_provider_android/CHANGELOG.md index d0bee39ec1a6..4cc9962622ea 100644 --- a/packages/path_provider/path_provider_android/CHANGELOG.md +++ b/packages/path_provider/path_provider_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.3.1 + +* Temporarily reverts changes introduced in version 2.3.0. + ## 2.3.0 * Changes internal implementation to use JNI. diff --git a/packages/path_provider/path_provider_android/CONTRIBUTING.md b/packages/path_provider/path_provider_android/CONTRIBUTING.md deleted file mode 100644 index 9f764f87c640..000000000000 --- a/packages/path_provider/path_provider_android/CONTRIBUTING.md +++ /dev/null @@ -1,11 +0,0 @@ -# Contributing - -## `jnigen` - -This package uses [jnigen](https://pub.dev/packages/jnigen) to call Android -methods, rather than using the standard Flutter plugin structure. To add new -functionality to the JNI interface, update `tool/jnigen.dart`, then run: - -```bash -dart run tool/jnigen.dart -``` diff --git a/packages/path_provider/path_provider_android/android/build.gradle.kts b/packages/path_provider/path_provider_android/android/build.gradle.kts new file mode 100644 index 000000000000..3114e6c6385e --- /dev/null +++ b/packages/path_provider/path_provider_android/android/build.gradle.kts @@ -0,0 +1,64 @@ +group = "io.flutter.plugins.pathprovider" +version = "1.0-SNAPSHOT" + +buildscript { + repositories { + google() + mavenCentral() + } + + dependencies { + classpath("com.android.tools.build:gradle:8.13.1") + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +plugins { + id("com.android.library") +} + +android { + namespace = "io.flutter.plugins.pathprovider" + compileSdk = flutter.compileSdkVersion + + defaultConfig { + minSdk = 24 + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + } + + lint { + checkAllWarnings = true + warningsAsErrors = true + disable.addAll(setOf("AndroidGradlePluginVersion", "InvalidPackage", "GradleDependency", "NewerVersionAvailable")) + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + testOptions { + unitTests { + isIncludeAndroidResources = true + isReturnDefaultValues = true + all { + it.outputs.upToDateWhen { false } + it.testLogging { + events("passed", "skipped", "failed", "standardOut", "standardError") + showStandardStreams = true + } + } + } + } +} + +dependencies { + implementation("androidx.annotation:annotation:1.9.1") + testImplementation("junit:junit:4.13.2") +} diff --git a/packages/path_provider/path_provider_android/android/settings.gradle.kts b/packages/path_provider/path_provider_android/android/settings.gradle.kts new file mode 100644 index 000000000000..4fc5bb16d8aa --- /dev/null +++ b/packages/path_provider/path_provider_android/android/settings.gradle.kts @@ -0,0 +1 @@ +rootProject.name = "path_provider_android" diff --git a/packages/path_provider/path_provider_android/android/src/main/AndroidManifest.xml b/packages/path_provider/path_provider_android/android/src/main/AndroidManifest.xml new file mode 100644 index 000000000000..ae9c21c963fd --- /dev/null +++ b/packages/path_provider/path_provider_android/android/src/main/AndroidManifest.xml @@ -0,0 +1,3 @@ + + diff --git a/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/Messages.java b/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/Messages.java new file mode 100644 index 000000000000..923a8a28e8d2 --- /dev/null +++ b/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/Messages.java @@ -0,0 +1,320 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon + +package io.flutter.plugins.pathprovider; + +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import io.flutter.plugin.common.BasicMessageChannel; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugin.common.MessageCodec; +import io.flutter.plugin.common.StandardMessageCodec; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.util.ArrayList; +import java.util.List; + +/** Generated class from Pigeon. */ +@SuppressWarnings({"unused", "unchecked", "CodeBlock2Expr", "RedundantSuppression", "serial"}) +public class Messages { + + /** Error class for passing custom error details to Flutter via a thrown PlatformException. */ + public static class FlutterError extends RuntimeException { + + /** The error code. */ + public final String code; + + /** The error details. Must be a datatype supported by the api codec. */ + public final Object details; + + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) { + super(message); + this.code = code; + this.details = details; + } + } + + @NonNull + protected static ArrayList wrapError(@NonNull Throwable exception) { + ArrayList errorList = new ArrayList<>(3); + if (exception instanceof FlutterError) { + FlutterError error = (FlutterError) exception; + errorList.add(error.code); + errorList.add(error.getMessage()); + errorList.add(error.details); + } else { + errorList.add(exception.toString()); + errorList.add(exception.getClass().getSimpleName()); + errorList.add( + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + } + return errorList; + } + + public enum StorageDirectory { + ROOT(0), + MUSIC(1), + PODCASTS(2), + RINGTONES(3), + ALARMS(4), + NOTIFICATIONS(5), + PICTURES(6), + MOVIES(7), + DOWNLOADS(8), + DCIM(9), + DOCUMENTS(10); + + final int index; + + StorageDirectory(final int index) { + this.index = index; + } + } + + private static class PigeonCodec extends StandardMessageCodec { + public static final PigeonCodec INSTANCE = new PigeonCodec(); + + private PigeonCodec() {} + + @Override + protected Object readValueOfType(byte type, @NonNull ByteBuffer buffer) { + switch (type) { + case (byte) 129: + { + Object value = readValue(buffer); + return value == null ? null : StorageDirectory.values()[((Long) value).intValue()]; + } + default: + return super.readValueOfType(type, buffer); + } + } + + @Override + protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { + if (value instanceof StorageDirectory) { + stream.write(129); + writeValue(stream, value == null ? null : ((StorageDirectory) value).index); + } else { + super.writeValue(stream, value); + } + } + } + + /** Generated interface from Pigeon that represents a handler of messages from Flutter. */ + public interface PathProviderApi { + + @Nullable + String getTemporaryPath(); + + @Nullable + String getApplicationSupportPath(); + + @Nullable + String getApplicationDocumentsPath(); + + @Nullable + String getApplicationCachePath(); + + @Nullable + String getExternalStoragePath(); + + @NonNull + List getExternalCachePaths(); + + @NonNull + List getExternalStoragePaths(@NonNull StorageDirectory directory); + + /** The codec used by PathProviderApi. */ + static @NonNull MessageCodec getCodec() { + return PigeonCodec.INSTANCE; + } + /** + * Sets up an instance of `PathProviderApi` to handle messages through the `binaryMessenger`. + */ + static void setUp(@NonNull BinaryMessenger binaryMessenger, @Nullable PathProviderApi api) { + setUp(binaryMessenger, "", api); + } + + static void setUp( + @NonNull BinaryMessenger binaryMessenger, + @NonNull String messageChannelSuffix, + @Nullable PathProviderApi api) { + messageChannelSuffix = messageChannelSuffix.isEmpty() ? "" : "." + messageChannelSuffix; + BinaryMessenger.TaskQueue taskQueue = binaryMessenger.makeBackgroundTaskQueue(); + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, + "dev.flutter.pigeon.path_provider_android.PathProviderApi.getTemporaryPath" + + messageChannelSuffix, + getCodec(), + taskQueue); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList<>(); + try { + String output = api.getTemporaryPath(); + wrapped.add(0, output); + } catch (Throwable exception) { + wrapped = wrapError(exception); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, + "dev.flutter.pigeon.path_provider_android.PathProviderApi.getApplicationSupportPath" + + messageChannelSuffix, + getCodec(), + taskQueue); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList<>(); + try { + String output = api.getApplicationSupportPath(); + wrapped.add(0, output); + } catch (Throwable exception) { + wrapped = wrapError(exception); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, + "dev.flutter.pigeon.path_provider_android.PathProviderApi.getApplicationDocumentsPath" + + messageChannelSuffix, + getCodec(), + taskQueue); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList<>(); + try { + String output = api.getApplicationDocumentsPath(); + wrapped.add(0, output); + } catch (Throwable exception) { + wrapped = wrapError(exception); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, + "dev.flutter.pigeon.path_provider_android.PathProviderApi.getApplicationCachePath" + + messageChannelSuffix, + getCodec(), + taskQueue); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList<>(); + try { + String output = api.getApplicationCachePath(); + wrapped.add(0, output); + } catch (Throwable exception) { + wrapped = wrapError(exception); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, + "dev.flutter.pigeon.path_provider_android.PathProviderApi.getExternalStoragePath" + + messageChannelSuffix, + getCodec(), + taskQueue); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList<>(); + try { + String output = api.getExternalStoragePath(); + wrapped.add(0, output); + } catch (Throwable exception) { + wrapped = wrapError(exception); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, + "dev.flutter.pigeon.path_provider_android.PathProviderApi.getExternalCachePaths" + + messageChannelSuffix, + getCodec(), + taskQueue); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList<>(); + try { + List output = api.getExternalCachePaths(); + wrapped.add(0, output); + } catch (Throwable exception) { + wrapped = wrapError(exception); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, + "dev.flutter.pigeon.path_provider_android.PathProviderApi.getExternalStoragePaths" + + messageChannelSuffix, + getCodec(), + taskQueue); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList<>(); + ArrayList args = (ArrayList) message; + StorageDirectory directoryArg = (StorageDirectory) args.get(0); + try { + List output = api.getExternalStoragePaths(directoryArg); + wrapped.add(0, output); + } catch (Throwable exception) { + wrapped = wrapError(exception); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } + } + } +} diff --git a/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java b/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java new file mode 100644 index 000000000000..0484d38832ca --- /dev/null +++ b/packages/path_provider/path_provider_android/android/src/main/java/io/flutter/plugins/pathprovider/PathProviderPlugin.java @@ -0,0 +1,127 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package io.flutter.plugins.pathprovider; + +import android.content.Context; +import android.util.Log; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.VisibleForTesting; +import io.flutter.embedding.engine.plugins.FlutterPlugin; +import io.flutter.plugin.common.BinaryMessenger; +import io.flutter.plugins.pathprovider.Messages.PathProviderApi; +import io.flutter.util.PathUtils; +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +public class PathProviderPlugin implements FlutterPlugin, PathProviderApi { + static final String TAG = "PathProviderPlugin"; + private Context context; + + public PathProviderPlugin() {} + + private void setUp(BinaryMessenger messenger, Context context) { + try { + PathProviderApi.setUp(messenger, this); + } catch (Exception ex) { + Log.e(TAG, "Received exception while setting up PathProviderPlugin", ex); + } + + this.context = context; + } + + @Override + public void onAttachedToEngine(@NonNull FlutterPluginBinding binding) { + setUp(binding.getBinaryMessenger(), binding.getApplicationContext()); + } + + @Override + public void onDetachedFromEngine(@NonNull FlutterPluginBinding binding) { + PathProviderApi.setUp(binding.getBinaryMessenger(), null); + } + + @Override + public @Nullable String getTemporaryPath() { + return context.getCacheDir().getPath(); + } + + @Override + public @Nullable String getApplicationSupportPath() { + return PathUtils.getFilesDir(context); + } + + @Override + public @Nullable String getApplicationDocumentsPath() { + return PathUtils.getDataDirectory(context); + } + + @Override + public @Nullable String getApplicationCachePath() { + return context.getCacheDir().getPath(); + } + + @Override + public @Nullable String getExternalStoragePath() { + final File dir = context.getExternalFilesDir(null); + if (dir == null) { + return null; + } + return dir.getAbsolutePath(); + } + + @Override + public @NonNull List getExternalCachePaths() { + final List paths = new ArrayList<>(); + for (File dir : context.getExternalCacheDirs()) { + if (dir != null) { + paths.add(dir.getAbsolutePath()); + } + } + return paths; + } + + @Override + public @NonNull List getExternalStoragePaths( + @NonNull Messages.StorageDirectory directory) { + final List paths = new ArrayList<>(); + for (File dir : context.getExternalFilesDirs(getStorageDirectoryString(directory))) { + if (dir != null) { + paths.add(dir.getAbsolutePath()); + } + } + return paths; + } + + @VisibleForTesting + String getStorageDirectoryString(@NonNull Messages.StorageDirectory directory) { + switch (directory) { + case ROOT: + return null; + case MUSIC: + return "music"; + case PODCASTS: + return "podcasts"; + case RINGTONES: + return "ringtones"; + case ALARMS: + return "alarms"; + case NOTIFICATIONS: + return "notifications"; + case PICTURES: + return "pictures"; + case MOVIES: + return "movies"; + case DOWNLOADS: + return "downloads"; + case DCIM: + return "dcim"; + case DOCUMENTS: + return "documents"; + default: + throw new RuntimeException("Unrecognized directory: " + directory); + } + } +} diff --git a/packages/path_provider/path_provider_android/android/src/test/java/io/flutter/plugins/pathprovider/PathProviderPluginTest.java b/packages/path_provider/path_provider_android/android/src/test/java/io/flutter/plugins/pathprovider/PathProviderPluginTest.java new file mode 100644 index 000000000000..ff4bc053c559 --- /dev/null +++ b/packages/path_provider/path_provider_android/android/src/test/java/io/flutter/plugins/pathprovider/PathProviderPluginTest.java @@ -0,0 +1,28 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package io.flutter.plugins.pathprovider; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +public class PathProviderPluginTest { + @org.junit.Test + public void testStorageDirectoryTypeTranslation() { + final PathProviderPlugin plugin = new PathProviderPlugin(); + assertNull(plugin.getStorageDirectoryString(Messages.StorageDirectory.ROOT)); + assertEquals("music", plugin.getStorageDirectoryString(Messages.StorageDirectory.MUSIC)); + assertEquals("podcasts", plugin.getStorageDirectoryString(Messages.StorageDirectory.PODCASTS)); + assertEquals( + "ringtones", plugin.getStorageDirectoryString(Messages.StorageDirectory.RINGTONES)); + assertEquals("alarms", plugin.getStorageDirectoryString(Messages.StorageDirectory.ALARMS)); + assertEquals( + "notifications", plugin.getStorageDirectoryString(Messages.StorageDirectory.NOTIFICATIONS)); + assertEquals("pictures", plugin.getStorageDirectoryString(Messages.StorageDirectory.PICTURES)); + assertEquals("movies", plugin.getStorageDirectoryString(Messages.StorageDirectory.MOVIES)); + assertEquals( + "downloads", plugin.getStorageDirectoryString(Messages.StorageDirectory.DOWNLOADS)); + assertEquals("dcim", plugin.getStorageDirectoryString(Messages.StorageDirectory.DCIM)); + } +} diff --git a/packages/path_provider/path_provider_android/example/android/build.gradle.kts b/packages/path_provider/path_provider_android/example/android/build.gradle.kts index a8bde37d0c72..6b1647312231 100644 --- a/packages/path_provider/path_provider_android/example/android/build.gradle.kts +++ b/packages/path_provider/path_provider_android/example/android/build.gradle.kts @@ -31,3 +31,15 @@ subprojects { tasks.register("clean") { delete(rootProject.layout.buildDirectory) } + +// Build the plugin project with warnings enabled. This is here rather than +// in the plugin itself to avoid breaking clients that have different +// warnings (e.g., deprecation warnings from a newer SDK than this project +// builds with). +gradle.projectsEvaluated { + project(":path_provider_android") { + tasks.withType { + options.compilerArgs.addAll(listOf("-Xlint:all", "-Werror")) + } + } +} diff --git a/packages/path_provider/path_provider_android/lib/messages.g.dart b/packages/path_provider/path_provider_android/lib/messages.g.dart new file mode 100644 index 000000000000..29b133c5dab5 --- /dev/null +++ b/packages/path_provider/path_provider_android/lib/messages.g.dart @@ -0,0 +1,267 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// Autogenerated from Pigeon (v26.1.0), do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import, no_leading_underscores_for_local_identifiers + +import 'dart:async'; +import 'dart:typed_data' show Float64List, Int32List, Int64List, Uint8List; + +import 'package:flutter/foundation.dart' show ReadBuffer, WriteBuffer; +import 'package:flutter/services.dart'; + +PlatformException _createConnectionError(String channelName) { + return PlatformException( + code: 'channel-error', + message: 'Unable to establish connection on channel: "$channelName".', + ); +} + +enum StorageDirectory { + root, + music, + podcasts, + ringtones, + alarms, + notifications, + pictures, + movies, + downloads, + dcim, + documents, +} + +class _PigeonCodec extends StandardMessageCodec { + const _PigeonCodec(); + @override + void writeValue(WriteBuffer buffer, Object? value) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else if (value is StorageDirectory) { + buffer.putUint8(129); + writeValue(buffer, value.index); + } else { + super.writeValue(buffer, value); + } + } + + @override + Object? readValueOfType(int type, ReadBuffer buffer) { + switch (type) { + case 129: + final int? value = readValue(buffer) as int?; + return value == null ? null : StorageDirectory.values[value]; + default: + return super.readValueOfType(type, buffer); + } + } +} + +class PathProviderApi { + /// Constructor for [PathProviderApi]. The [binaryMessenger] named argument is + /// available for dependency injection. If it is left null, the default + /// BinaryMessenger will be used which routes to the host platform. + PathProviderApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; + final BinaryMessenger? pigeonVar_binaryMessenger; + + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + Future getTemporaryPath() async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.path_provider_android.PathProviderApi.getTemporaryPath$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as String?); + } + } + + Future getApplicationSupportPath() async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.path_provider_android.PathProviderApi.getApplicationSupportPath$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as String?); + } + } + + Future getApplicationDocumentsPath() async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.path_provider_android.PathProviderApi.getApplicationDocumentsPath$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as String?); + } + } + + Future getApplicationCachePath() async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.path_provider_android.PathProviderApi.getApplicationCachePath$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as String?); + } + } + + Future getExternalStoragePath() async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.path_provider_android.PathProviderApi.getExternalStoragePath$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else { + return (pigeonVar_replyList[0] as String?); + } + } + + Future> getExternalCachePaths() async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.path_provider_android.PathProviderApi.getExternalCachePaths$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send(null); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as List?)!.cast(); + } + } + + Future> getExternalStoragePaths( + StorageDirectory directory, + ) async { + final String pigeonVar_channelName = + 'dev.flutter.pigeon.path_provider_android.PathProviderApi.getExternalStoragePaths$pigeonVar_messageChannelSuffix'; + final BasicMessageChannel pigeonVar_channel = + BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [directory], + ); + final List? pigeonVar_replyList = + await pigeonVar_sendFuture as List?; + if (pigeonVar_replyList == null) { + throw _createConnectionError(pigeonVar_channelName); + } else if (pigeonVar_replyList.length > 1) { + throw PlatformException( + code: pigeonVar_replyList[0]! as String, + message: pigeonVar_replyList[1] as String?, + details: pigeonVar_replyList[2], + ); + } else if (pigeonVar_replyList[0] == null) { + throw PlatformException( + code: 'null-error', + message: 'Host platform returned null value for non-null return value.', + ); + } else { + return (pigeonVar_replyList[0] as List?)!.cast(); + } + } +} diff --git a/packages/path_provider/path_provider_android/lib/path_provider_android.dart b/packages/path_provider/path_provider_android/lib/path_provider_android.dart index 0ad2784305b0..8931ef4bd7ee 100644 --- a/packages/path_provider/path_provider_android/lib/path_provider_android.dart +++ b/packages/path_provider/path_provider_android/lib/path_provider_android.dart @@ -2,8 +2,105 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// path_provider_android is implemented using FFI; export a stub for -// platforms that don't support FFI (e.g., web) to avoid having transitive -// dependencies break web compilation. -export 'src/path_provider_android_stub.dart' - if (dart.library.ffi) 'src/path_provider_android_real.dart'; +import 'package:flutter/foundation.dart' show visibleForTesting; +import 'package:path_provider_platform_interface/path_provider_platform_interface.dart'; +import 'messages.g.dart' as messages; + +messages.StorageDirectory _convertStorageDirectory( + StorageDirectory? directory, +) { + switch (directory) { + case null: + return messages.StorageDirectory.root; + case StorageDirectory.music: + return messages.StorageDirectory.music; + case StorageDirectory.podcasts: + return messages.StorageDirectory.podcasts; + case StorageDirectory.ringtones: + return messages.StorageDirectory.ringtones; + case StorageDirectory.alarms: + return messages.StorageDirectory.alarms; + case StorageDirectory.notifications: + return messages.StorageDirectory.notifications; + case StorageDirectory.pictures: + return messages.StorageDirectory.pictures; + case StorageDirectory.movies: + return messages.StorageDirectory.movies; + case StorageDirectory.downloads: + return messages.StorageDirectory.downloads; + case StorageDirectory.dcim: + return messages.StorageDirectory.dcim; + case StorageDirectory.documents: + return messages.StorageDirectory.documents; + } +} + +/// The Android implementation of [PathProviderPlatform]. +class PathProviderAndroid extends PathProviderPlatform { + /// Creates an instance of [PathProviderAndroid]. + PathProviderAndroid({@visibleForTesting messages.PathProviderApi? api}) + : _api = api ?? messages.PathProviderApi(); + + final messages.PathProviderApi _api; + + /// Registers this class as the default instance of [PathProviderPlatform]. + static void registerWith() { + PathProviderPlatform.instance = PathProviderAndroid(); + } + + @override + Future getTemporaryPath() { + return _api.getTemporaryPath(); + } + + @override + Future getApplicationSupportPath() { + return _api.getApplicationSupportPath(); + } + + @override + Future getLibraryPath() { + throw UnsupportedError('getLibraryPath is not supported on Android'); + } + + @override + Future getApplicationDocumentsPath() { + return _api.getApplicationDocumentsPath(); + } + + @override + Future getApplicationCachePath() { + return _api.getApplicationCachePath(); + } + + @override + Future getExternalStoragePath() { + return _api.getExternalStoragePath(); + } + + @override + Future?> getExternalCachePaths() async { + return _api.getExternalCachePaths(); + } + + @override + Future?> getExternalStoragePaths({ + StorageDirectory? type, + }) async { + return _getExternalStoragePaths(type: type); + } + + @override + Future getDownloadsPath() async { + final List paths = await _getExternalStoragePaths( + type: StorageDirectory.downloads, + ); + return paths.isEmpty ? null : paths.first; + } + + Future> _getExternalStoragePaths({ + StorageDirectory? type, + }) async { + return _api.getExternalStoragePaths(_convertStorageDirectory(type)); + } +} diff --git a/packages/path_provider/path_provider_android/lib/src/path_provider.g.dart b/packages/path_provider/path_provider_android/lib/src/path_provider.g.dart deleted file mode 100644 index bfba6c09d873..000000000000 --- a/packages/path_provider/path_provider_android/lib/src/path_provider.g.dart +++ /dev/null @@ -1,10009 +0,0 @@ -// AUTO GENERATED BY JNIGEN 0.16.0. DO NOT EDIT! - -// ignore_for_file: annotate_overrides -// ignore_for_file: argument_type_not_assignable -// ignore_for_file: camel_case_extensions -// ignore_for_file: camel_case_types -// ignore_for_file: constant_identifier_names -// ignore_for_file: comment_references -// ignore_for_file: doc_directive_unknown -// ignore_for_file: file_names -// ignore_for_file: inference_failure_on_untyped_parameter -// ignore_for_file: invalid_internal_annotation -// ignore_for_file: invalid_use_of_internal_member -// ignore_for_file: library_prefixes -// ignore_for_file: lines_longer_than_80_chars -// ignore_for_file: no_leading_underscores_for_library_prefixes -// ignore_for_file: no_leading_underscores_for_local_identifiers -// ignore_for_file: non_constant_identifier_names -// ignore_for_file: only_throw_errors -// ignore_for_file: overridden_fields -// ignore_for_file: prefer_double_quotes -// ignore_for_file: unintended_html_in_doc_comment -// ignore_for_file: unnecessary_cast -// ignore_for_file: unnecessary_non_null_assertion -// ignore_for_file: unnecessary_parenthesis -// ignore_for_file: unused_element -// ignore_for_file: unused_field -// 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:core' as core$_; -import 'dart:core' show Object, String; - -import 'package:jni/_internal.dart' as jni$_; -import 'package:jni/jni.dart' as jni$_; - -const _$jniVersionCheck = jni$_.JniVersionCheck(1, 0); - -/// from: `android.content.Context$BindServiceFlags` -extension type Context$BindServiceFlags._(jni$_.JObject _$this) - implements jni$_.JObject { - static final _class = jni$_.JClass.forName( - r'android/content/Context$BindServiceFlags', - ); - - /// The type which includes information such as the signature of this class. - static const jni$_.JType type = - $Context$BindServiceFlags$Type$(); - static final _id_of = _class.staticMethodId( - r'of', - r'(J)Landroid/content/Context$BindServiceFlags;', - ); - - static final _of = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int64,)>, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `static public android.content.Context$BindServiceFlags of(long j)` - /// The returned object must be released after use, by calling the [release] method. - static Context$BindServiceFlags? of(core$_.int j) { - return _of( - _class.reference.pointer, - _id_of.pointer, - j, - ).object(); - } -} - -final class $Context$BindServiceFlags$Type$ - extends jni$_.JType { - @jni$_.internal - const $Context$BindServiceFlags$Type$(); - - @jni$_.internal - @core$_.override - String get signature => r'Landroid/content/Context$BindServiceFlags;'; -} - -/// from: `android.content.Context` -extension type Context._(jni$_.JObject _$this) implements jni$_.JObject { - static final _class = jni$_.JClass.forName(r'android/content/Context'); - - /// The type which includes information such as the signature of this class. - static const jni$_.JType type = $Context$Type$(); - static final _id_ACCESSIBILITY_SERVICE = _class.staticFieldId( - r'ACCESSIBILITY_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String ACCESSIBILITY_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get ACCESSIBILITY_SERVICE => - _id_ACCESSIBILITY_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_ACCOUNT_SERVICE = _class.staticFieldId( - r'ACCOUNT_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String ACCOUNT_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get ACCOUNT_SERVICE => - _id_ACCOUNT_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_ACTIVITY_SERVICE = _class.staticFieldId( - r'ACTIVITY_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String ACTIVITY_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get ACTIVITY_SERVICE => - _id_ACTIVITY_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_ADVANCED_PROTECTION_SERVICE = _class.staticFieldId( - r'ADVANCED_PROTECTION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String ADVANCED_PROTECTION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get ADVANCED_PROTECTION_SERVICE => - _id_ADVANCED_PROTECTION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_ALARM_SERVICE = _class.staticFieldId( - r'ALARM_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String ALARM_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get ALARM_SERVICE => - _id_ALARM_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_APPWIDGET_SERVICE = _class.staticFieldId( - r'APPWIDGET_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String APPWIDGET_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get APPWIDGET_SERVICE => - _id_APPWIDGET_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_APP_FUNCTION_SERVICE = _class.staticFieldId( - r'APP_FUNCTION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String APP_FUNCTION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get APP_FUNCTION_SERVICE => - _id_APP_FUNCTION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_APP_OPS_SERVICE = _class.staticFieldId( - r'APP_OPS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String APP_OPS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get APP_OPS_SERVICE => - _id_APP_OPS_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_APP_SEARCH_SERVICE = _class.staticFieldId( - r'APP_SEARCH_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String APP_SEARCH_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get APP_SEARCH_SERVICE => - _id_APP_SEARCH_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_AUDIO_SERVICE = _class.staticFieldId( - r'AUDIO_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String AUDIO_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get AUDIO_SERVICE => - _id_AUDIO_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_BATTERY_SERVICE = _class.staticFieldId( - r'BATTERY_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String BATTERY_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get BATTERY_SERVICE => - _id_BATTERY_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public final int BIND_ABOVE_CLIENT` - static const BIND_ABOVE_CLIENT = 8; - - /// from: `static public final int BIND_ADJUST_WITH_ACTIVITY` - static const BIND_ADJUST_WITH_ACTIVITY = 128; - - /// from: `static public final int BIND_ALLOW_ACTIVITY_STARTS` - static const BIND_ALLOW_ACTIVITY_STARTS = 512; - - /// from: `static public final int BIND_ALLOW_OOM_MANAGEMENT` - static const BIND_ALLOW_OOM_MANAGEMENT = 16; - - /// from: `static public final int BIND_AUTO_CREATE` - static const BIND_AUTO_CREATE = 1; - - /// from: `static public final int BIND_DEBUG_UNBIND` - static const BIND_DEBUG_UNBIND = 2; - - /// from: `static public final int BIND_EXTERNAL_SERVICE` - static const BIND_EXTERNAL_SERVICE = -2147483648; - - /// from: `static public final long BIND_EXTERNAL_SERVICE_LONG` - static const BIND_EXTERNAL_SERVICE_LONG = 4611686018427387904; - - /// from: `static public final int BIND_IMPORTANT` - static const BIND_IMPORTANT = 64; - - /// from: `static public final int BIND_INCLUDE_CAPABILITIES` - static const BIND_INCLUDE_CAPABILITIES = 4096; - - /// from: `static public final int BIND_NOT_FOREGROUND` - static const BIND_NOT_FOREGROUND = 4; - - /// from: `static public final int BIND_NOT_PERCEPTIBLE` - static const BIND_NOT_PERCEPTIBLE = 256; - - /// from: `static public final int BIND_PACKAGE_ISOLATED_PROCESS` - static const BIND_PACKAGE_ISOLATED_PROCESS = 16384; - - /// from: `static public final int BIND_SHARED_ISOLATED_PROCESS` - static const BIND_SHARED_ISOLATED_PROCESS = 8192; - - /// from: `static public final int BIND_WAIVE_PRIORITY` - static const BIND_WAIVE_PRIORITY = 32; - static final _id_BIOMETRIC_SERVICE = _class.staticFieldId( - r'BIOMETRIC_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String BIOMETRIC_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get BIOMETRIC_SERVICE => - _id_BIOMETRIC_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_BLOB_STORE_SERVICE = _class.staticFieldId( - r'BLOB_STORE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String BLOB_STORE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get BLOB_STORE_SERVICE => - _id_BLOB_STORE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_BLUETOOTH_SERVICE = _class.staticFieldId( - r'BLUETOOTH_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String BLUETOOTH_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get BLUETOOTH_SERVICE => - _id_BLUETOOTH_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_BUGREPORT_SERVICE = _class.staticFieldId( - r'BUGREPORT_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String BUGREPORT_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get BUGREPORT_SERVICE => - _id_BUGREPORT_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_CAMERA_SERVICE = _class.staticFieldId( - r'CAMERA_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String CAMERA_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get CAMERA_SERVICE => - _id_CAMERA_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_CAPTIONING_SERVICE = _class.staticFieldId( - r'CAPTIONING_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String CAPTIONING_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get CAPTIONING_SERVICE => - _id_CAPTIONING_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_CARRIER_CONFIG_SERVICE = _class.staticFieldId( - r'CARRIER_CONFIG_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String CARRIER_CONFIG_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get CARRIER_CONFIG_SERVICE => - _id_CARRIER_CONFIG_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_CLIPBOARD_SERVICE = _class.staticFieldId( - r'CLIPBOARD_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String CLIPBOARD_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get CLIPBOARD_SERVICE => - _id_CLIPBOARD_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_COMPANION_DEVICE_SERVICE = _class.staticFieldId( - r'COMPANION_DEVICE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String COMPANION_DEVICE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get COMPANION_DEVICE_SERVICE => - _id_COMPANION_DEVICE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_CONNECTIVITY_DIAGNOSTICS_SERVICE = _class.staticFieldId( - r'CONNECTIVITY_DIAGNOSTICS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String CONNECTIVITY_DIAGNOSTICS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get CONNECTIVITY_DIAGNOSTICS_SERVICE => - _id_CONNECTIVITY_DIAGNOSTICS_SERVICE.getNullable( - _class, - jni$_.JString.type, - ) - as jni$_.JString?; - - static final _id_CONNECTIVITY_SERVICE = _class.staticFieldId( - r'CONNECTIVITY_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String CONNECTIVITY_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get CONNECTIVITY_SERVICE => - _id_CONNECTIVITY_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_CONSUMER_IR_SERVICE = _class.staticFieldId( - r'CONSUMER_IR_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String CONSUMER_IR_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get CONSUMER_IR_SERVICE => - _id_CONSUMER_IR_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_CONTACT_KEYS_SERVICE = _class.staticFieldId( - r'CONTACT_KEYS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String CONTACT_KEYS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get CONTACT_KEYS_SERVICE => - _id_CONTACT_KEYS_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public final int CONTEXT_IGNORE_SECURITY` - static const CONTEXT_IGNORE_SECURITY = 2; - - /// from: `static public final int CONTEXT_INCLUDE_CODE` - static const CONTEXT_INCLUDE_CODE = 1; - - /// from: `static public final int CONTEXT_RESTRICTED` - static const CONTEXT_RESTRICTED = 4; - static final _id_CREDENTIAL_SERVICE = _class.staticFieldId( - r'CREDENTIAL_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String CREDENTIAL_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get CREDENTIAL_SERVICE => - _id_CREDENTIAL_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_CROSS_PROFILE_APPS_SERVICE = _class.staticFieldId( - r'CROSS_PROFILE_APPS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String CROSS_PROFILE_APPS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get CROSS_PROFILE_APPS_SERVICE => - _id_CROSS_PROFILE_APPS_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public final int DEVICE_ID_DEFAULT` - static const DEVICE_ID_DEFAULT = 0; - - /// from: `static public final int DEVICE_ID_INVALID` - static const DEVICE_ID_INVALID = -1; - static final _id_DEVICE_LOCK_SERVICE = _class.staticFieldId( - r'DEVICE_LOCK_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String DEVICE_LOCK_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DEVICE_LOCK_SERVICE => - _id_DEVICE_LOCK_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_DEVICE_POLICY_SERVICE = _class.staticFieldId( - r'DEVICE_POLICY_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String DEVICE_POLICY_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DEVICE_POLICY_SERVICE => - _id_DEVICE_POLICY_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_DISPLAY_HASH_SERVICE = _class.staticFieldId( - r'DISPLAY_HASH_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String DISPLAY_HASH_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DISPLAY_HASH_SERVICE => - _id_DISPLAY_HASH_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_DISPLAY_SERVICE = _class.staticFieldId( - r'DISPLAY_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String DISPLAY_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DISPLAY_SERVICE => - _id_DISPLAY_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_DOMAIN_VERIFICATION_SERVICE = _class.staticFieldId( - r'DOMAIN_VERIFICATION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String DOMAIN_VERIFICATION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DOMAIN_VERIFICATION_SERVICE => - _id_DOMAIN_VERIFICATION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_DOWNLOAD_SERVICE = _class.staticFieldId( - r'DOWNLOAD_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String DOWNLOAD_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DOWNLOAD_SERVICE => - _id_DOWNLOAD_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_DROPBOX_SERVICE = _class.staticFieldId( - r'DROPBOX_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String DROPBOX_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DROPBOX_SERVICE => - _id_DROPBOX_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_EUICC_SERVICE = _class.staticFieldId( - r'EUICC_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String EUICC_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get EUICC_SERVICE => - _id_EUICC_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_FILE_INTEGRITY_SERVICE = _class.staticFieldId( - r'FILE_INTEGRITY_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String FILE_INTEGRITY_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get FILE_INTEGRITY_SERVICE => - _id_FILE_INTEGRITY_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_FINGERPRINT_SERVICE = _class.staticFieldId( - r'FINGERPRINT_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String FINGERPRINT_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get FINGERPRINT_SERVICE => - _id_FINGERPRINT_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_GAME_SERVICE = _class.staticFieldId( - r'GAME_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String GAME_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get GAME_SERVICE => - _id_GAME_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_GRAMMATICAL_INFLECTION_SERVICE = _class.staticFieldId( - r'GRAMMATICAL_INFLECTION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String GRAMMATICAL_INFLECTION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get GRAMMATICAL_INFLECTION_SERVICE => - _id_GRAMMATICAL_INFLECTION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_HARDWARE_PROPERTIES_SERVICE = _class.staticFieldId( - r'HARDWARE_PROPERTIES_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String HARDWARE_PROPERTIES_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get HARDWARE_PROPERTIES_SERVICE => - _id_HARDWARE_PROPERTIES_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_HEALTHCONNECT_SERVICE = _class.staticFieldId( - r'HEALTHCONNECT_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String HEALTHCONNECT_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get HEALTHCONNECT_SERVICE => - _id_HEALTHCONNECT_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_INPUT_METHOD_SERVICE = _class.staticFieldId( - r'INPUT_METHOD_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String INPUT_METHOD_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get INPUT_METHOD_SERVICE => - _id_INPUT_METHOD_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_INPUT_SERVICE = _class.staticFieldId( - r'INPUT_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String INPUT_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get INPUT_SERVICE => - _id_INPUT_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_IPSEC_SERVICE = _class.staticFieldId( - r'IPSEC_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String IPSEC_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get IPSEC_SERVICE => - _id_IPSEC_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_JOB_SCHEDULER_SERVICE = _class.staticFieldId( - r'JOB_SCHEDULER_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String JOB_SCHEDULER_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get JOB_SCHEDULER_SERVICE => - _id_JOB_SCHEDULER_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_KEYGUARD_SERVICE = _class.staticFieldId( - r'KEYGUARD_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String KEYGUARD_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get KEYGUARD_SERVICE => - _id_KEYGUARD_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_KEYSTORE_SERVICE = _class.staticFieldId( - r'KEYSTORE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String KEYSTORE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get KEYSTORE_SERVICE => - _id_KEYSTORE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_LAUNCHER_APPS_SERVICE = _class.staticFieldId( - r'LAUNCHER_APPS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String LAUNCHER_APPS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get LAUNCHER_APPS_SERVICE => - _id_LAUNCHER_APPS_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_LAYOUT_INFLATER_SERVICE = _class.staticFieldId( - r'LAYOUT_INFLATER_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String LAYOUT_INFLATER_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get LAYOUT_INFLATER_SERVICE => - _id_LAYOUT_INFLATER_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_LOCALE_SERVICE = _class.staticFieldId( - r'LOCALE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String LOCALE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get LOCALE_SERVICE => - _id_LOCALE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_LOCATION_SERVICE = _class.staticFieldId( - r'LOCATION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String LOCATION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get LOCATION_SERVICE => - _id_LOCATION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_COMMUNICATION_SERVICE = _class.staticFieldId( - r'MEDIA_COMMUNICATION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_COMMUNICATION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_COMMUNICATION_SERVICE => - _id_MEDIA_COMMUNICATION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_METRICS_SERVICE = _class.staticFieldId( - r'MEDIA_METRICS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_METRICS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_METRICS_SERVICE => - _id_MEDIA_METRICS_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_PROJECTION_SERVICE = _class.staticFieldId( - r'MEDIA_PROJECTION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_PROJECTION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_PROJECTION_SERVICE => - _id_MEDIA_PROJECTION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_QUALITY_SERVICE = _class.staticFieldId( - r'MEDIA_QUALITY_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_QUALITY_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_QUALITY_SERVICE => - _id_MEDIA_QUALITY_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_ROUTER_SERVICE = _class.staticFieldId( - r'MEDIA_ROUTER_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_ROUTER_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_ROUTER_SERVICE => - _id_MEDIA_ROUTER_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_SESSION_SERVICE = _class.staticFieldId( - r'MEDIA_SESSION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_SESSION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_SESSION_SERVICE => - _id_MEDIA_SESSION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MIDI_SERVICE = _class.staticFieldId( - r'MIDI_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MIDI_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MIDI_SERVICE => - _id_MIDI_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public final int MODE_APPEND` - static const MODE_APPEND = 32768; - - /// from: `static public final int MODE_ENABLE_WRITE_AHEAD_LOGGING` - static const MODE_ENABLE_WRITE_AHEAD_LOGGING = 8; - - /// from: `static public final int MODE_MULTI_PROCESS` - static const MODE_MULTI_PROCESS = 4; - - /// from: `static public final int MODE_NO_LOCALIZED_COLLATORS` - static const MODE_NO_LOCALIZED_COLLATORS = 16; - - /// from: `static public final int MODE_PRIVATE` - static const MODE_PRIVATE = 0; - - /// from: `static public final int MODE_WORLD_READABLE` - static const MODE_WORLD_READABLE = 1; - - /// from: `static public final int MODE_WORLD_WRITEABLE` - static const MODE_WORLD_WRITEABLE = 2; - static final _id_NETWORK_STATS_SERVICE = _class.staticFieldId( - r'NETWORK_STATS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String NETWORK_STATS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get NETWORK_STATS_SERVICE => - _id_NETWORK_STATS_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_NFC_SERVICE = _class.staticFieldId( - r'NFC_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String NFC_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get NFC_SERVICE => - _id_NFC_SERVICE.getNullable(_class, jni$_.JString.type) as jni$_.JString?; - - static final _id_NOTIFICATION_SERVICE = _class.staticFieldId( - r'NOTIFICATION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String NOTIFICATION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get NOTIFICATION_SERVICE => - _id_NOTIFICATION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_NSD_SERVICE = _class.staticFieldId( - r'NSD_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String NSD_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get NSD_SERVICE => - _id_NSD_SERVICE.getNullable(_class, jni$_.JString.type) as jni$_.JString?; - - static final _id_OVERLAY_SERVICE = _class.staticFieldId( - r'OVERLAY_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String OVERLAY_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get OVERLAY_SERVICE => - _id_OVERLAY_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_PEOPLE_SERVICE = _class.staticFieldId( - r'PEOPLE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String PEOPLE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get PEOPLE_SERVICE => - _id_PEOPLE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_PERFORMANCE_HINT_SERVICE = _class.staticFieldId( - r'PERFORMANCE_HINT_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String PERFORMANCE_HINT_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get PERFORMANCE_HINT_SERVICE => - _id_PERFORMANCE_HINT_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_PERSISTENT_DATA_BLOCK_SERVICE = _class.staticFieldId( - r'PERSISTENT_DATA_BLOCK_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String PERSISTENT_DATA_BLOCK_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get PERSISTENT_DATA_BLOCK_SERVICE => - _id_PERSISTENT_DATA_BLOCK_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_POWER_SERVICE = _class.staticFieldId( - r'POWER_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String POWER_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get POWER_SERVICE => - _id_POWER_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_PRINT_SERVICE = _class.staticFieldId( - r'PRINT_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String PRINT_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get PRINT_SERVICE => - _id_PRINT_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_PROFILING_SERVICE = _class.staticFieldId( - r'PROFILING_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String PROFILING_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get PROFILING_SERVICE => - _id_PROFILING_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public final int RECEIVER_EXPORTED` - static const RECEIVER_EXPORTED = 2; - - /// from: `static public final int RECEIVER_NOT_EXPORTED` - static const RECEIVER_NOT_EXPORTED = 4; - - /// from: `static public final int RECEIVER_VISIBLE_TO_INSTANT_APPS` - static const RECEIVER_VISIBLE_TO_INSTANT_APPS = 1; - static final _id_RESTRICTIONS_SERVICE = _class.staticFieldId( - r'RESTRICTIONS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String RESTRICTIONS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get RESTRICTIONS_SERVICE => - _id_RESTRICTIONS_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_ROLE_SERVICE = _class.staticFieldId( - r'ROLE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String ROLE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get ROLE_SERVICE => - _id_ROLE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_SATELLITE_SERVICE = _class.staticFieldId( - r'SATELLITE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String SATELLITE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get SATELLITE_SERVICE => - _id_SATELLITE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_SEARCH_SERVICE = _class.staticFieldId( - r'SEARCH_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String SEARCH_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get SEARCH_SERVICE => - _id_SEARCH_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_SECURITY_STATE_SERVICE = _class.staticFieldId( - r'SECURITY_STATE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String SECURITY_STATE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get SECURITY_STATE_SERVICE => - _id_SECURITY_STATE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_SENSOR_SERVICE = _class.staticFieldId( - r'SENSOR_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String SENSOR_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get SENSOR_SERVICE => - _id_SENSOR_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_SHORTCUT_SERVICE = _class.staticFieldId( - r'SHORTCUT_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String SHORTCUT_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get SHORTCUT_SERVICE => - _id_SHORTCUT_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_STATUS_BAR_SERVICE = _class.staticFieldId( - r'STATUS_BAR_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String STATUS_BAR_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get STATUS_BAR_SERVICE => - _id_STATUS_BAR_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_STORAGE_SERVICE = _class.staticFieldId( - r'STORAGE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String STORAGE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get STORAGE_SERVICE => - _id_STORAGE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_STORAGE_STATS_SERVICE = _class.staticFieldId( - r'STORAGE_STATS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String STORAGE_STATS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get STORAGE_STATS_SERVICE => - _id_STORAGE_STATS_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_SYSTEM_HEALTH_SERVICE = _class.staticFieldId( - r'SYSTEM_HEALTH_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String SYSTEM_HEALTH_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get SYSTEM_HEALTH_SERVICE => - _id_SYSTEM_HEALTH_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_TELECOM_SERVICE = _class.staticFieldId( - r'TELECOM_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String TELECOM_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get TELECOM_SERVICE => - _id_TELECOM_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_TELEPHONY_IMS_SERVICE = _class.staticFieldId( - r'TELEPHONY_IMS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String TELEPHONY_IMS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get TELEPHONY_IMS_SERVICE => - _id_TELEPHONY_IMS_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_TELEPHONY_SERVICE = _class.staticFieldId( - r'TELEPHONY_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String TELEPHONY_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get TELEPHONY_SERVICE => - _id_TELEPHONY_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_TELEPHONY_SUBSCRIPTION_SERVICE = _class.staticFieldId( - r'TELEPHONY_SUBSCRIPTION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String TELEPHONY_SUBSCRIPTION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get TELEPHONY_SUBSCRIPTION_SERVICE => - _id_TELEPHONY_SUBSCRIPTION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_TETHERING_SERVICE = _class.staticFieldId( - r'TETHERING_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String TETHERING_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get TETHERING_SERVICE => - _id_TETHERING_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_TEXT_CLASSIFICATION_SERVICE = _class.staticFieldId( - r'TEXT_CLASSIFICATION_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String TEXT_CLASSIFICATION_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get TEXT_CLASSIFICATION_SERVICE => - _id_TEXT_CLASSIFICATION_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_TEXT_SERVICES_MANAGER_SERVICE = _class.staticFieldId( - r'TEXT_SERVICES_MANAGER_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String TEXT_SERVICES_MANAGER_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get TEXT_SERVICES_MANAGER_SERVICE => - _id_TEXT_SERVICES_MANAGER_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_TV_AD_SERVICE = _class.staticFieldId( - r'TV_AD_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String TV_AD_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get TV_AD_SERVICE => - _id_TV_AD_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_TV_INPUT_SERVICE = _class.staticFieldId( - r'TV_INPUT_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String TV_INPUT_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get TV_INPUT_SERVICE => - _id_TV_INPUT_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_TV_INTERACTIVE_APP_SERVICE = _class.staticFieldId( - r'TV_INTERACTIVE_APP_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String TV_INTERACTIVE_APP_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get TV_INTERACTIVE_APP_SERVICE => - _id_TV_INTERACTIVE_APP_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_UI_MODE_SERVICE = _class.staticFieldId( - r'UI_MODE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String UI_MODE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get UI_MODE_SERVICE => - _id_UI_MODE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_USAGE_STATS_SERVICE = _class.staticFieldId( - r'USAGE_STATS_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String USAGE_STATS_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get USAGE_STATS_SERVICE => - _id_USAGE_STATS_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_USB_SERVICE = _class.staticFieldId( - r'USB_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String USB_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get USB_SERVICE => - _id_USB_SERVICE.getNullable(_class, jni$_.JString.type) as jni$_.JString?; - - static final _id_USER_SERVICE = _class.staticFieldId( - r'USER_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String USER_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get USER_SERVICE => - _id_USER_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_VIBRATOR_MANAGER_SERVICE = _class.staticFieldId( - r'VIBRATOR_MANAGER_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String VIBRATOR_MANAGER_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get VIBRATOR_MANAGER_SERVICE => - _id_VIBRATOR_MANAGER_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_VIBRATOR_SERVICE = _class.staticFieldId( - r'VIBRATOR_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String VIBRATOR_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get VIBRATOR_SERVICE => - _id_VIBRATOR_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_VIRTUAL_DEVICE_SERVICE = _class.staticFieldId( - r'VIRTUAL_DEVICE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String VIRTUAL_DEVICE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get VIRTUAL_DEVICE_SERVICE => - _id_VIRTUAL_DEVICE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_VPN_MANAGEMENT_SERVICE = _class.staticFieldId( - r'VPN_MANAGEMENT_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String VPN_MANAGEMENT_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get VPN_MANAGEMENT_SERVICE => - _id_VPN_MANAGEMENT_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_WALLPAPER_SERVICE = _class.staticFieldId( - r'WALLPAPER_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String WALLPAPER_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get WALLPAPER_SERVICE => - _id_WALLPAPER_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_WIFI_AWARE_SERVICE = _class.staticFieldId( - r'WIFI_AWARE_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String WIFI_AWARE_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get WIFI_AWARE_SERVICE => - _id_WIFI_AWARE_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_WIFI_P2P_SERVICE = _class.staticFieldId( - r'WIFI_P2P_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String WIFI_P2P_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get WIFI_P2P_SERVICE => - _id_WIFI_P2P_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_WIFI_RTT_RANGING_SERVICE = _class.staticFieldId( - r'WIFI_RTT_RANGING_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String WIFI_RTT_RANGING_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get WIFI_RTT_RANGING_SERVICE => - _id_WIFI_RTT_RANGING_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_WIFI_SERVICE = _class.staticFieldId( - r'WIFI_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String WIFI_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get WIFI_SERVICE => - _id_WIFI_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_WINDOW_SERVICE = _class.staticFieldId( - r'WINDOW_SERVICE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String WINDOW_SERVICE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get WINDOW_SERVICE => - _id_WINDOW_SERVICE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; -} - -extension Context$$Methods on Context { - static final _id_bindIsolatedService = Context._class.instanceMethodId( - r'bindIsolatedService', - r'(Landroid/content/Intent;Landroid/content/Context$BindServiceFlags;Ljava/lang/String;Ljava/util/concurrent/Executor;Landroid/content/ServiceConnection;)Z', - ); - - static final _bindIsolatedService = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean bindIsolatedService(android.content.Intent intent, android.content.Context$BindServiceFlags bindServiceFlags, java.lang.String string, java.util.concurrent.Executor executor, android.content.ServiceConnection serviceConnection)` - core$_.bool bindIsolatedService( - jni$_.JObject? intent, - Context$BindServiceFlags? bindServiceFlags, - jni$_.JString? string, - jni$_.JObject? executor, - jni$_.JObject? serviceConnection, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$bindServiceFlags = - bindServiceFlags?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$executor = executor?.reference ?? jni$_.jNullReference; - final _$serviceConnection = - serviceConnection?.reference ?? jni$_.jNullReference; - return _bindIsolatedService( - reference.pointer, - _id_bindIsolatedService.pointer, - _$intent.pointer, - _$bindServiceFlags.pointer, - _$string.pointer, - _$executor.pointer, - _$serviceConnection.pointer, - ).boolean; - } - - static final _id_bindIsolatedService$1 = Context._class.instanceMethodId( - r'bindIsolatedService', - r'(Landroid/content/Intent;ILjava/lang/String;Ljava/util/concurrent/Executor;Landroid/content/ServiceConnection;)Z', - ); - - static final _bindIsolatedService$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean bindIsolatedService(android.content.Intent intent, int i, java.lang.String string, java.util.concurrent.Executor executor, android.content.ServiceConnection serviceConnection)` - core$_.bool bindIsolatedService$1( - jni$_.JObject? intent, - core$_.int i, - jni$_.JString? string, - jni$_.JObject? executor, - jni$_.JObject? serviceConnection, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$executor = executor?.reference ?? jni$_.jNullReference; - final _$serviceConnection = - serviceConnection?.reference ?? jni$_.jNullReference; - return _bindIsolatedService$1( - reference.pointer, - _id_bindIsolatedService$1.pointer, - _$intent.pointer, - i, - _$string.pointer, - _$executor.pointer, - _$serviceConnection.pointer, - ).boolean; - } - - static final _id_bindService = Context._class.instanceMethodId( - r'bindService', - r'(Landroid/content/Intent;Landroid/content/Context$BindServiceFlags;Ljava/util/concurrent/Executor;Landroid/content/ServiceConnection;)Z', - ); - - static final _bindService = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean bindService(android.content.Intent intent, android.content.Context$BindServiceFlags bindServiceFlags, java.util.concurrent.Executor executor, android.content.ServiceConnection serviceConnection)` - core$_.bool bindService( - jni$_.JObject? intent, - Context$BindServiceFlags? bindServiceFlags, - jni$_.JObject? executor, - jni$_.JObject? serviceConnection, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$bindServiceFlags = - bindServiceFlags?.reference ?? jni$_.jNullReference; - final _$executor = executor?.reference ?? jni$_.jNullReference; - final _$serviceConnection = - serviceConnection?.reference ?? jni$_.jNullReference; - return _bindService( - reference.pointer, - _id_bindService.pointer, - _$intent.pointer, - _$bindServiceFlags.pointer, - _$executor.pointer, - _$serviceConnection.pointer, - ).boolean; - } - - static final _id_bindService$1 = Context._class.instanceMethodId( - r'bindService', - r'(Landroid/content/Intent;Landroid/content/ServiceConnection;Landroid/content/Context$BindServiceFlags;)Z', - ); - - static final _bindService$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean bindService(android.content.Intent intent, android.content.ServiceConnection serviceConnection, android.content.Context$BindServiceFlags bindServiceFlags)` - core$_.bool bindService$1( - jni$_.JObject? intent, - jni$_.JObject? serviceConnection, - Context$BindServiceFlags? bindServiceFlags, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$serviceConnection = - serviceConnection?.reference ?? jni$_.jNullReference; - final _$bindServiceFlags = - bindServiceFlags?.reference ?? jni$_.jNullReference; - return _bindService$1( - reference.pointer, - _id_bindService$1.pointer, - _$intent.pointer, - _$serviceConnection.pointer, - _$bindServiceFlags.pointer, - ).boolean; - } - - static final _id_bindService$2 = Context._class.instanceMethodId( - r'bindService', - r'(Landroid/content/Intent;Landroid/content/ServiceConnection;I)Z', - ); - - static final _bindService$2 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract boolean bindService(android.content.Intent intent, android.content.ServiceConnection serviceConnection, int i)` - core$_.bool bindService$2( - jni$_.JObject? intent, - jni$_.JObject? serviceConnection, - core$_.int i, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$serviceConnection = - serviceConnection?.reference ?? jni$_.jNullReference; - return _bindService$2( - reference.pointer, - _id_bindService$2.pointer, - _$intent.pointer, - _$serviceConnection.pointer, - i, - ).boolean; - } - - static final _id_bindService$3 = Context._class.instanceMethodId( - r'bindService', - r'(Landroid/content/Intent;ILjava/util/concurrent/Executor;Landroid/content/ServiceConnection;)Z', - ); - - static final _bindService$3 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean bindService(android.content.Intent intent, int i, java.util.concurrent.Executor executor, android.content.ServiceConnection serviceConnection)` - core$_.bool bindService$3( - jni$_.JObject? intent, - core$_.int i, - jni$_.JObject? executor, - jni$_.JObject? serviceConnection, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$executor = executor?.reference ?? jni$_.jNullReference; - final _$serviceConnection = - serviceConnection?.reference ?? jni$_.jNullReference; - return _bindService$3( - reference.pointer, - _id_bindService$3.pointer, - _$intent.pointer, - i, - _$executor.pointer, - _$serviceConnection.pointer, - ).boolean; - } - - static final _id_bindServiceAsUser = Context._class.instanceMethodId( - r'bindServiceAsUser', - r'(Landroid/content/Intent;Landroid/content/ServiceConnection;Landroid/content/Context$BindServiceFlags;Landroid/os/UserHandle;)Z', - ); - - static final _bindServiceAsUser = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean bindServiceAsUser(android.content.Intent intent, android.content.ServiceConnection serviceConnection, android.content.Context$BindServiceFlags bindServiceFlags, android.os.UserHandle userHandle)` - core$_.bool bindServiceAsUser( - jni$_.JObject? intent, - jni$_.JObject? serviceConnection, - Context$BindServiceFlags? bindServiceFlags, - jni$_.JObject? userHandle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$serviceConnection = - serviceConnection?.reference ?? jni$_.jNullReference; - final _$bindServiceFlags = - bindServiceFlags?.reference ?? jni$_.jNullReference; - final _$userHandle = userHandle?.reference ?? jni$_.jNullReference; - return _bindServiceAsUser( - reference.pointer, - _id_bindServiceAsUser.pointer, - _$intent.pointer, - _$serviceConnection.pointer, - _$bindServiceFlags.pointer, - _$userHandle.pointer, - ).boolean; - } - - static final _id_bindServiceAsUser$1 = Context._class.instanceMethodId( - r'bindServiceAsUser', - r'(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/UserHandle;)Z', - ); - - static final _bindServiceAsUser$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean bindServiceAsUser(android.content.Intent intent, android.content.ServiceConnection serviceConnection, int i, android.os.UserHandle userHandle)` - core$_.bool bindServiceAsUser$1( - jni$_.JObject? intent, - jni$_.JObject? serviceConnection, - core$_.int i, - jni$_.JObject? userHandle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$serviceConnection = - serviceConnection?.reference ?? jni$_.jNullReference; - final _$userHandle = userHandle?.reference ?? jni$_.jNullReference; - return _bindServiceAsUser$1( - reference.pointer, - _id_bindServiceAsUser$1.pointer, - _$intent.pointer, - _$serviceConnection.pointer, - i, - _$userHandle.pointer, - ).boolean; - } - - static final _id_checkCallingOrSelfPermission = Context._class - .instanceMethodId( - r'checkCallingOrSelfPermission', - r'(Ljava/lang/String;)I', - ); - - static final _checkCallingOrSelfPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract int checkCallingOrSelfPermission(java.lang.String string)` - core$_.int checkCallingOrSelfPermission(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _checkCallingOrSelfPermission( - reference.pointer, - _id_checkCallingOrSelfPermission.pointer, - _$string.pointer, - ).integer; - } - - static final _id_checkCallingOrSelfUriPermission = Context._class - .instanceMethodId( - r'checkCallingOrSelfUriPermission', - r'(Landroid/net/Uri;I)I', - ); - - static final _checkCallingOrSelfUriPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract int checkCallingOrSelfUriPermission(android.net.Uri uri, int i)` - core$_.int checkCallingOrSelfUriPermission(jni$_.JObject? uri, core$_.int i) { - final _$uri = uri?.reference ?? jni$_.jNullReference; - return _checkCallingOrSelfUriPermission( - reference.pointer, - _id_checkCallingOrSelfUriPermission.pointer, - _$uri.pointer, - i, - ).integer; - } - - static final _id_checkCallingOrSelfUriPermissions = Context._class - .instanceMethodId( - r'checkCallingOrSelfUriPermissions', - r'(Ljava/util/List;I)[I', - ); - - static final _checkCallingOrSelfUriPermissions = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public int[] checkCallingOrSelfUriPermissions(java.util.List list, int i)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JIntArray? checkCallingOrSelfUriPermissions( - jni$_.JList? list, - core$_.int i, - ) { - final _$list = list?.reference ?? jni$_.jNullReference; - return _checkCallingOrSelfUriPermissions( - reference.pointer, - _id_checkCallingOrSelfUriPermissions.pointer, - _$list.pointer, - i, - ).object(); - } - - static final _id_checkCallingPermission = Context._class.instanceMethodId( - r'checkCallingPermission', - r'(Ljava/lang/String;)I', - ); - - static final _checkCallingPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract int checkCallingPermission(java.lang.String string)` - core$_.int checkCallingPermission(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _checkCallingPermission( - reference.pointer, - _id_checkCallingPermission.pointer, - _$string.pointer, - ).integer; - } - - static final _id_checkCallingUriPermission = Context._class.instanceMethodId( - r'checkCallingUriPermission', - r'(Landroid/net/Uri;I)I', - ); - - static final _checkCallingUriPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract int checkCallingUriPermission(android.net.Uri uri, int i)` - core$_.int checkCallingUriPermission(jni$_.JObject? uri, core$_.int i) { - final _$uri = uri?.reference ?? jni$_.jNullReference; - return _checkCallingUriPermission( - reference.pointer, - _id_checkCallingUriPermission.pointer, - _$uri.pointer, - i, - ).integer; - } - - static final _id_checkCallingUriPermissions = Context._class.instanceMethodId( - r'checkCallingUriPermissions', - r'(Ljava/util/List;I)[I', - ); - - static final _checkCallingUriPermissions = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public int[] checkCallingUriPermissions(java.util.List list, int i)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JIntArray? checkCallingUriPermissions( - jni$_.JList? list, - core$_.int i, - ) { - final _$list = list?.reference ?? jni$_.jNullReference; - return _checkCallingUriPermissions( - reference.pointer, - _id_checkCallingUriPermissions.pointer, - _$list.pointer, - i, - ).object(); - } - - static final _id_checkContentUriPermissionFull = Context._class - .instanceMethodId( - r'checkContentUriPermissionFull', - r'(Landroid/net/Uri;III)I', - ); - - static final _checkContentUriPermissionFull = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public int checkContentUriPermissionFull(android.net.Uri uri, int i, int i1, int i2)` - core$_.int checkContentUriPermissionFull( - jni$_.JObject? uri, - core$_.int i, - core$_.int i1, - core$_.int i2, - ) { - final _$uri = uri?.reference ?? jni$_.jNullReference; - return _checkContentUriPermissionFull( - reference.pointer, - _id_checkContentUriPermissionFull.pointer, - _$uri.pointer, - i, - i1, - i2, - ).integer; - } - - static final _id_checkPermission = Context._class.instanceMethodId( - r'checkPermission', - r'(Ljava/lang/String;II)I', - ); - - static final _checkPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Int32, jni$_.Int32) - >, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public abstract int checkPermission(java.lang.String string, int i, int i1)` - core$_.int checkPermission( - jni$_.JString? string, - core$_.int i, - core$_.int i1, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _checkPermission( - reference.pointer, - _id_checkPermission.pointer, - _$string.pointer, - i, - i1, - ).integer; - } - - static final _id_checkSelfPermission = Context._class.instanceMethodId( - r'checkSelfPermission', - r'(Ljava/lang/String;)I', - ); - - static final _checkSelfPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract int checkSelfPermission(java.lang.String string)` - core$_.int checkSelfPermission(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _checkSelfPermission( - reference.pointer, - _id_checkSelfPermission.pointer, - _$string.pointer, - ).integer; - } - - static final _id_checkUriPermission = Context._class.instanceMethodId( - r'checkUriPermission', - r'(Landroid/net/Uri;III)I', - ); - - static final _checkUriPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public abstract int checkUriPermission(android.net.Uri uri, int i, int i1, int i2)` - core$_.int checkUriPermission( - jni$_.JObject? uri, - core$_.int i, - core$_.int i1, - core$_.int i2, - ) { - final _$uri = uri?.reference ?? jni$_.jNullReference; - return _checkUriPermission( - reference.pointer, - _id_checkUriPermission.pointer, - _$uri.pointer, - i, - i1, - i2, - ).integer; - } - - static final _id_checkUriPermission$1 = Context._class.instanceMethodId( - r'checkUriPermission', - r'(Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;III)I', - ); - - static final _checkUriPermission$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public abstract int checkUriPermission(android.net.Uri uri, java.lang.String string, java.lang.String string1, int i, int i1, int i2)` - core$_.int checkUriPermission$1( - jni$_.JObject? uri, - jni$_.JString? string, - jni$_.JString? string1, - core$_.int i, - core$_.int i1, - core$_.int i2, - ) { - final _$uri = uri?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - return _checkUriPermission$1( - reference.pointer, - _id_checkUriPermission$1.pointer, - _$uri.pointer, - _$string.pointer, - _$string1.pointer, - i, - i1, - i2, - ).integer; - } - - static final _id_checkUriPermissions = Context._class.instanceMethodId( - r'checkUriPermissions', - r'(Ljava/util/List;III)[I', - ); - - static final _checkUriPermissions = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public int[] checkUriPermissions(java.util.List list, int i, int i1, int i2)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JIntArray? checkUriPermissions( - jni$_.JList? list, - core$_.int i, - core$_.int i1, - core$_.int i2, - ) { - final _$list = list?.reference ?? jni$_.jNullReference; - return _checkUriPermissions( - reference.pointer, - _id_checkUriPermissions.pointer, - _$list.pointer, - i, - i1, - i2, - ).object(); - } - - static final _id_clearWallpaper = Context._class.instanceMethodId( - r'clearWallpaper', - r'()V', - ); - - static final _clearWallpaper = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract void clearWallpaper()` - void clearWallpaper() { - _clearWallpaper(reference.pointer, _id_clearWallpaper.pointer).check(); - } - - static final _id_createAttributionContext = Context._class.instanceMethodId( - r'createAttributionContext', - r'(Ljava/lang/String;)Landroid/content/Context;', - ); - - static final _createAttributionContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public android.content.Context createAttributionContext(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - Context? createAttributionContext(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _createAttributionContext( - reference.pointer, - _id_createAttributionContext.pointer, - _$string.pointer, - ).object(); - } - - static final _id_createConfigurationContext = Context._class.instanceMethodId( - r'createConfigurationContext', - r'(Landroid/content/res/Configuration;)Landroid/content/Context;', - ); - - static final _createConfigurationContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract android.content.Context createConfigurationContext(android.content.res.Configuration configuration)` - /// The returned object must be released after use, by calling the [release] method. - Context? createConfigurationContext(jni$_.JObject? configuration) { - final _$configuration = configuration?.reference ?? jni$_.jNullReference; - return _createConfigurationContext( - reference.pointer, - _id_createConfigurationContext.pointer, - _$configuration.pointer, - ).object(); - } - - static final _id_createContext = Context._class.instanceMethodId( - r'createContext', - r'(Landroid/content/ContextParams;)Landroid/content/Context;', - ); - - static final _createContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public android.content.Context createContext(android.content.ContextParams contextParams)` - /// The returned object must be released after use, by calling the [release] method. - Context? createContext(jni$_.JObject? contextParams) { - final _$contextParams = contextParams?.reference ?? jni$_.jNullReference; - return _createContext( - reference.pointer, - _id_createContext.pointer, - _$contextParams.pointer, - ).object(); - } - - static final _id_createContextForSplit = Context._class.instanceMethodId( - r'createContextForSplit', - r'(Ljava/lang/String;)Landroid/content/Context;', - ); - - static final _createContextForSplit = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract android.content.Context createContextForSplit(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - Context? createContextForSplit(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _createContextForSplit( - reference.pointer, - _id_createContextForSplit.pointer, - _$string.pointer, - ).object(); - } - - static final _id_createDeviceContext = Context._class.instanceMethodId( - r'createDeviceContext', - r'(I)Landroid/content/Context;', - ); - - static final _createDeviceContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public android.content.Context createDeviceContext(int i)` - /// The returned object must be released after use, by calling the [release] method. - Context? createDeviceContext(core$_.int i) { - return _createDeviceContext( - reference.pointer, - _id_createDeviceContext.pointer, - i, - ).object(); - } - - static final _id_createDeviceProtectedStorageContext = Context._class - .instanceMethodId( - r'createDeviceProtectedStorageContext', - r'()Landroid/content/Context;', - ); - - static final _createDeviceProtectedStorageContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.content.Context createDeviceProtectedStorageContext()` - /// The returned object must be released after use, by calling the [release] method. - Context? createDeviceProtectedStorageContext() { - return _createDeviceProtectedStorageContext( - reference.pointer, - _id_createDeviceProtectedStorageContext.pointer, - ).object(); - } - - static final _id_createDisplayContext = Context._class.instanceMethodId( - r'createDisplayContext', - r'(Landroid/view/Display;)Landroid/content/Context;', - ); - - static final _createDisplayContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract android.content.Context createDisplayContext(android.view.Display display)` - /// The returned object must be released after use, by calling the [release] method. - Context? createDisplayContext(jni$_.JObject? display) { - final _$display = display?.reference ?? jni$_.jNullReference; - return _createDisplayContext( - reference.pointer, - _id_createDisplayContext.pointer, - _$display.pointer, - ).object(); - } - - static final _id_createPackageContext = Context._class.instanceMethodId( - r'createPackageContext', - r'(Ljava/lang/String;I)Landroid/content/Context;', - ); - - static final _createPackageContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract android.content.Context createPackageContext(java.lang.String string, int i)` - /// The returned object must be released after use, by calling the [release] method. - Context? createPackageContext(jni$_.JString? string, core$_.int i) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _createPackageContext( - reference.pointer, - _id_createPackageContext.pointer, - _$string.pointer, - i, - ).object(); - } - - static final _id_createWindowContext = Context._class.instanceMethodId( - r'createWindowContext', - r'(Landroid/view/Display;ILandroid/os/Bundle;)Landroid/content/Context;', - ); - - static final _createWindowContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public android.content.Context createWindowContext(android.view.Display display, int i, android.os.Bundle bundle)` - /// The returned object must be released after use, by calling the [release] method. - Context? createWindowContext( - jni$_.JObject? display, - core$_.int i, - jni$_.JObject? bundle, - ) { - final _$display = display?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - return _createWindowContext( - reference.pointer, - _id_createWindowContext.pointer, - _$display.pointer, - i, - _$bundle.pointer, - ).object(); - } - - static final _id_createWindowContext$1 = Context._class.instanceMethodId( - r'createWindowContext', - r'(ILandroid/os/Bundle;)Landroid/content/Context;', - ); - - static final _createWindowContext$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32, jni$_.Pointer)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public android.content.Context createWindowContext(int i, android.os.Bundle bundle)` - /// The returned object must be released after use, by calling the [release] method. - Context? createWindowContext$1(core$_.int i, jni$_.JObject? bundle) { - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - return _createWindowContext$1( - reference.pointer, - _id_createWindowContext$1.pointer, - i, - _$bundle.pointer, - ).object(); - } - - static final _id_databaseList = Context._class.instanceMethodId( - r'databaseList', - r'()[Ljava/lang/String;', - ); - - static final _databaseList = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.lang.String[] databaseList()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? databaseList() { - return _databaseList( - reference.pointer, - _id_databaseList.pointer, - ).object?>(); - } - - static final _id_deleteDatabase = Context._class.instanceMethodId( - r'deleteDatabase', - r'(Ljava/lang/String;)Z', - ); - - static final _deleteDatabase = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract boolean deleteDatabase(java.lang.String string)` - core$_.bool deleteDatabase(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _deleteDatabase( - reference.pointer, - _id_deleteDatabase.pointer, - _$string.pointer, - ).boolean; - } - - static final _id_deleteFile = Context._class.instanceMethodId( - r'deleteFile', - r'(Ljava/lang/String;)Z', - ); - - static final _deleteFile = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract boolean deleteFile(java.lang.String string)` - core$_.bool deleteFile(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _deleteFile( - reference.pointer, - _id_deleteFile.pointer, - _$string.pointer, - ).boolean; - } - - static final _id_deleteSharedPreferences = Context._class.instanceMethodId( - r'deleteSharedPreferences', - r'(Ljava/lang/String;)Z', - ); - - static final _deleteSharedPreferences = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract boolean deleteSharedPreferences(java.lang.String string)` - core$_.bool deleteSharedPreferences(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _deleteSharedPreferences( - reference.pointer, - _id_deleteSharedPreferences.pointer, - _$string.pointer, - ).boolean; - } - - static final _id_enforceCallingOrSelfPermission = Context._class - .instanceMethodId( - r'enforceCallingOrSelfPermission', - r'(Ljava/lang/String;Ljava/lang/String;)V', - ); - - static final _enforceCallingOrSelfPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void enforceCallingOrSelfPermission(java.lang.String string, java.lang.String string1)` - void enforceCallingOrSelfPermission( - jni$_.JString? string, - jni$_.JString? string1, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - _enforceCallingOrSelfPermission( - reference.pointer, - _id_enforceCallingOrSelfPermission.pointer, - _$string.pointer, - _$string1.pointer, - ).check(); - } - - static final _id_enforceCallingOrSelfUriPermission = Context._class - .instanceMethodId( - r'enforceCallingOrSelfUriPermission', - r'(Landroid/net/Uri;ILjava/lang/String;)V', - ); - - static final _enforceCallingOrSelfUriPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void enforceCallingOrSelfUriPermission(android.net.Uri uri, int i, java.lang.String string)` - void enforceCallingOrSelfUriPermission( - jni$_.JObject? uri, - core$_.int i, - jni$_.JString? string, - ) { - final _$uri = uri?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - _enforceCallingOrSelfUriPermission( - reference.pointer, - _id_enforceCallingOrSelfUriPermission.pointer, - _$uri.pointer, - i, - _$string.pointer, - ).check(); - } - - static final _id_enforceCallingPermission = Context._class.instanceMethodId( - r'enforceCallingPermission', - r'(Ljava/lang/String;Ljava/lang/String;)V', - ); - - static final _enforceCallingPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void enforceCallingPermission(java.lang.String string, java.lang.String string1)` - void enforceCallingPermission(jni$_.JString? string, jni$_.JString? string1) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - _enforceCallingPermission( - reference.pointer, - _id_enforceCallingPermission.pointer, - _$string.pointer, - _$string1.pointer, - ).check(); - } - - static final _id_enforceCallingUriPermission = Context._class - .instanceMethodId( - r'enforceCallingUriPermission', - r'(Landroid/net/Uri;ILjava/lang/String;)V', - ); - - static final _enforceCallingUriPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void enforceCallingUriPermission(android.net.Uri uri, int i, java.lang.String string)` - void enforceCallingUriPermission( - jni$_.JObject? uri, - core$_.int i, - jni$_.JString? string, - ) { - final _$uri = uri?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - _enforceCallingUriPermission( - reference.pointer, - _id_enforceCallingUriPermission.pointer, - _$uri.pointer, - i, - _$string.pointer, - ).check(); - } - - static final _id_enforcePermission = Context._class.instanceMethodId( - r'enforcePermission', - r'(Ljava/lang/String;IILjava/lang/String;)V', - ); - - static final _enforcePermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void enforcePermission(java.lang.String string, int i, int i1, java.lang.String string1)` - void enforcePermission( - jni$_.JString? string, - core$_.int i, - core$_.int i1, - jni$_.JString? string1, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - _enforcePermission( - reference.pointer, - _id_enforcePermission.pointer, - _$string.pointer, - i, - i1, - _$string1.pointer, - ).check(); - } - - static final _id_enforceUriPermission = Context._class.instanceMethodId( - r'enforceUriPermission', - r'(Landroid/net/Uri;IIILjava/lang/String;)V', - ); - - static final _enforceUriPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - jni$_.Int32, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - core$_.int, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void enforceUriPermission(android.net.Uri uri, int i, int i1, int i2, java.lang.String string)` - void enforceUriPermission( - jni$_.JObject? uri, - core$_.int i, - core$_.int i1, - core$_.int i2, - jni$_.JString? string, - ) { - final _$uri = uri?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - _enforceUriPermission( - reference.pointer, - _id_enforceUriPermission.pointer, - _$uri.pointer, - i, - i1, - i2, - _$string.pointer, - ).check(); - } - - static final _id_enforceUriPermission$1 = Context._class.instanceMethodId( - r'enforceUriPermission', - r'(Landroid/net/Uri;Ljava/lang/String;Ljava/lang/String;IIILjava/lang/String;)V', - ); - - static final _enforceUriPermission$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - jni$_.Int32, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - core$_.int, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void enforceUriPermission(android.net.Uri uri, java.lang.String string, java.lang.String string1, int i, int i1, int i2, java.lang.String string2)` - void enforceUriPermission$1( - jni$_.JObject? uri, - jni$_.JString? string, - jni$_.JString? string1, - core$_.int i, - core$_.int i1, - core$_.int i2, - jni$_.JString? string2, - ) { - final _$uri = uri?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - final _$string2 = string2?.reference ?? jni$_.jNullReference; - _enforceUriPermission$1( - reference.pointer, - _id_enforceUriPermission$1.pointer, - _$uri.pointer, - _$string.pointer, - _$string1.pointer, - i, - i1, - i2, - _$string2.pointer, - ).check(); - } - - static final _id_fileList = Context._class.instanceMethodId( - r'fileList', - r'()[Ljava/lang/String;', - ); - - static final _fileList = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.lang.String[] fileList()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? fileList() { - return _fileList( - reference.pointer, - _id_fileList.pointer, - ).object?>(); - } - - static final _id_get$applicationContext = Context._class.instanceMethodId( - r'getApplicationContext', - r'()Landroid/content/Context;', - ); - - static final _get$applicationContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.content.Context getApplicationContext()` - /// The returned object must be released after use, by calling the [release] method. - Context? get applicationContext { - return _get$applicationContext( - reference.pointer, - _id_get$applicationContext.pointer, - ).object(); - } - - static final _id_get$applicationInfo = Context._class.instanceMethodId( - r'getApplicationInfo', - r'()Landroid/content/pm/ApplicationInfo;', - ); - - static final _get$applicationInfo = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.content.pm.ApplicationInfo getApplicationInfo()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get applicationInfo { - return _get$applicationInfo( - reference.pointer, - _id_get$applicationInfo.pointer, - ).object(); - } - - static final _id_get$assets = Context._class.instanceMethodId( - r'getAssets', - r'()Landroid/content/res/AssetManager;', - ); - - static final _get$assets = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.content.res.AssetManager getAssets()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get assets { - return _get$assets( - reference.pointer, - _id_get$assets.pointer, - ).object(); - } - - static final _id_get$attributionSource = Context._class.instanceMethodId( - r'getAttributionSource', - r'()Landroid/content/AttributionSource;', - ); - - static final _get$attributionSource = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public android.content.AttributionSource getAttributionSource()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get attributionSource { - return _get$attributionSource( - reference.pointer, - _id_get$attributionSource.pointer, - ).object(); - } - - static final _id_get$attributionTag = Context._class.instanceMethodId( - r'getAttributionTag', - r'()Ljava/lang/String;', - ); - - static final _get$attributionTag = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String getAttributionTag()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? get attributionTag { - return _get$attributionTag( - reference.pointer, - _id_get$attributionTag.pointer, - ).object(); - } - - static final _id_get$cacheDir = Context._class.instanceMethodId( - r'getCacheDir', - r'()Ljava/io/File;', - ); - - static final _get$cacheDir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.io.File getCacheDir()` - /// The returned object must be released after use, by calling the [release] method. - File? get cacheDir { - return _get$cacheDir( - reference.pointer, - _id_get$cacheDir.pointer, - ).object(); - } - - static final _id_get$classLoader = Context._class.instanceMethodId( - r'getClassLoader', - r'()Ljava/lang/ClassLoader;', - ); - - static final _get$classLoader = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.lang.ClassLoader getClassLoader()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get classLoader { - return _get$classLoader( - reference.pointer, - _id_get$classLoader.pointer, - ).object(); - } - - static final _id_get$codeCacheDir = Context._class.instanceMethodId( - r'getCodeCacheDir', - r'()Ljava/io/File;', - ); - - static final _get$codeCacheDir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.io.File getCodeCacheDir()` - /// The returned object must be released after use, by calling the [release] method. - File? get codeCacheDir { - return _get$codeCacheDir( - reference.pointer, - _id_get$codeCacheDir.pointer, - ).object(); - } - - static final _id_getColor = Context._class.instanceMethodId( - r'getColor', - r'(I)I', - ); - - static final _getColor = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public final int getColor(int i)` - core$_.int getColor(core$_.int i) { - return _getColor(reference.pointer, _id_getColor.pointer, i).integer; - } - - static final _id_getColorStateList = Context._class.instanceMethodId( - r'getColorStateList', - r'(I)Landroid/content/res/ColorStateList;', - ); - - static final _getColorStateList = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public final android.content.res.ColorStateList getColorStateList(int i)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getColorStateList(core$_.int i) { - return _getColorStateList( - reference.pointer, - _id_getColorStateList.pointer, - i, - ).object(); - } - - static final _id_get$contentResolver = Context._class.instanceMethodId( - r'getContentResolver', - r'()Landroid/content/ContentResolver;', - ); - - static final _get$contentResolver = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.content.ContentResolver getContentResolver()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get contentResolver { - return _get$contentResolver( - reference.pointer, - _id_get$contentResolver.pointer, - ).object(); - } - - static final _id_get$dataDir = Context._class.instanceMethodId( - r'getDataDir', - r'()Ljava/io/File;', - ); - - static final _get$dataDir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.io.File getDataDir()` - /// The returned object must be released after use, by calling the [release] method. - File? get dataDir { - return _get$dataDir( - reference.pointer, - _id_get$dataDir.pointer, - ).object(); - } - - static final _id_getDatabasePath = Context._class.instanceMethodId( - r'getDatabasePath', - r'(Ljava/lang/String;)Ljava/io/File;', - ); - - static final _getDatabasePath = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract java.io.File getDatabasePath(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - File? getDatabasePath(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _getDatabasePath( - reference.pointer, - _id_getDatabasePath.pointer, - _$string.pointer, - ).object(); - } - - static final _id_get$deviceId = Context._class.instanceMethodId( - r'getDeviceId', - r'()I', - ); - - static final _get$deviceId = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public int getDeviceId()` - core$_.int get deviceId { - return _get$deviceId(reference.pointer, _id_get$deviceId.pointer).integer; - } - - static final _id_getDir = Context._class.instanceMethodId( - r'getDir', - r'(Ljava/lang/String;I)Ljava/io/File;', - ); - - static final _getDir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract java.io.File getDir(java.lang.String string, int i)` - /// The returned object must be released after use, by calling the [release] method. - File? getDir(jni$_.JString? string, core$_.int i) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _getDir( - reference.pointer, - _id_getDir.pointer, - _$string.pointer, - i, - ).object(); - } - - static final _id_get$display = Context._class.instanceMethodId( - r'getDisplay', - r'()Landroid/view/Display;', - ); - - static final _get$display = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public android.view.Display getDisplay()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get display { - return _get$display( - reference.pointer, - _id_get$display.pointer, - ).object(); - } - - static final _id_getDrawable = Context._class.instanceMethodId( - r'getDrawable', - r'(I)Landroid/graphics/drawable/Drawable;', - ); - - static final _getDrawable = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public final android.graphics.drawable.Drawable getDrawable(int i)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getDrawable(core$_.int i) { - return _getDrawable( - reference.pointer, - _id_getDrawable.pointer, - i, - ).object(); - } - - static final _id_get$externalCacheDir = Context._class.instanceMethodId( - r'getExternalCacheDir', - r'()Ljava/io/File;', - ); - - static final _get$externalCacheDir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.io.File getExternalCacheDir()` - /// The returned object must be released after use, by calling the [release] method. - File? get externalCacheDir { - return _get$externalCacheDir( - reference.pointer, - _id_get$externalCacheDir.pointer, - ).object(); - } - - static final _id_get$externalCacheDirs = Context._class.instanceMethodId( - r'getExternalCacheDirs', - r'()[Ljava/io/File;', - ); - - static final _get$externalCacheDirs = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.io.File[] getExternalCacheDirs()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? get externalCacheDirs { - return _get$externalCacheDirs( - reference.pointer, - _id_get$externalCacheDirs.pointer, - ).object?>(); - } - - static final _id_getExternalFilesDir = Context._class.instanceMethodId( - r'getExternalFilesDir', - r'(Ljava/lang/String;)Ljava/io/File;', - ); - - static final _getExternalFilesDir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract java.io.File getExternalFilesDir(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - File? getExternalFilesDir(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _getExternalFilesDir( - reference.pointer, - _id_getExternalFilesDir.pointer, - _$string.pointer, - ).object(); - } - - static final _id_getExternalFilesDirs = Context._class.instanceMethodId( - r'getExternalFilesDirs', - r'(Ljava/lang/String;)[Ljava/io/File;', - ); - - static final _getExternalFilesDirs = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract java.io.File[] getExternalFilesDirs(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? getExternalFilesDirs(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _getExternalFilesDirs( - reference.pointer, - _id_getExternalFilesDirs.pointer, - _$string.pointer, - ).object?>(); - } - - static final _id_get$externalMediaDirs = Context._class.instanceMethodId( - r'getExternalMediaDirs', - r'()[Ljava/io/File;', - ); - - static final _get$externalMediaDirs = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.io.File[] getExternalMediaDirs()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? get externalMediaDirs { - return _get$externalMediaDirs( - reference.pointer, - _id_get$externalMediaDirs.pointer, - ).object?>(); - } - - static final _id_getFileStreamPath = Context._class.instanceMethodId( - r'getFileStreamPath', - r'(Ljava/lang/String;)Ljava/io/File;', - ); - - static final _getFileStreamPath = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract java.io.File getFileStreamPath(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - File? getFileStreamPath(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _getFileStreamPath( - reference.pointer, - _id_getFileStreamPath.pointer, - _$string.pointer, - ).object(); - } - - static final _id_get$filesDir = Context._class.instanceMethodId( - r'getFilesDir', - r'()Ljava/io/File;', - ); - - static final _get$filesDir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.io.File getFilesDir()` - /// The returned object must be released after use, by calling the [release] method. - File? get filesDir { - return _get$filesDir( - reference.pointer, - _id_get$filesDir.pointer, - ).object(); - } - - static final _id_get$mainExecutor = Context._class.instanceMethodId( - r'getMainExecutor', - r'()Ljava/util/concurrent/Executor;', - ); - - static final _get$mainExecutor = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.util.concurrent.Executor getMainExecutor()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get mainExecutor { - return _get$mainExecutor( - reference.pointer, - _id_get$mainExecutor.pointer, - ).object(); - } - - static final _id_get$mainLooper = Context._class.instanceMethodId( - r'getMainLooper', - r'()Landroid/os/Looper;', - ); - - static final _get$mainLooper = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.os.Looper getMainLooper()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get mainLooper { - return _get$mainLooper( - reference.pointer, - _id_get$mainLooper.pointer, - ).object(); - } - - static final _id_get$noBackupFilesDir = Context._class.instanceMethodId( - r'getNoBackupFilesDir', - r'()Ljava/io/File;', - ); - - static final _get$noBackupFilesDir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.io.File getNoBackupFilesDir()` - /// The returned object must be released after use, by calling the [release] method. - File? get noBackupFilesDir { - return _get$noBackupFilesDir( - reference.pointer, - _id_get$noBackupFilesDir.pointer, - ).object(); - } - - static final _id_get$obbDir = Context._class.instanceMethodId( - r'getObbDir', - r'()Ljava/io/File;', - ); - - static final _get$obbDir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.io.File getObbDir()` - /// The returned object must be released after use, by calling the [release] method. - File? get obbDir { - return _get$obbDir( - reference.pointer, - _id_get$obbDir.pointer, - ).object(); - } - - static final _id_get$obbDirs = Context._class.instanceMethodId( - r'getObbDirs', - r'()[Ljava/io/File;', - ); - - static final _get$obbDirs = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.io.File[] getObbDirs()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? get obbDirs { - return _get$obbDirs( - reference.pointer, - _id_get$obbDirs.pointer, - ).object?>(); - } - - static final _id_get$opPackageName = Context._class.instanceMethodId( - r'getOpPackageName', - r'()Ljava/lang/String;', - ); - - static final _get$opPackageName = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String getOpPackageName()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? get opPackageName { - return _get$opPackageName( - reference.pointer, - _id_get$opPackageName.pointer, - ).object(); - } - - static final _id_get$packageCodePath = Context._class.instanceMethodId( - r'getPackageCodePath', - r'()Ljava/lang/String;', - ); - - static final _get$packageCodePath = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.lang.String getPackageCodePath()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? get packageCodePath { - return _get$packageCodePath( - reference.pointer, - _id_get$packageCodePath.pointer, - ).object(); - } - - static final _id_get$packageManager = Context._class.instanceMethodId( - r'getPackageManager', - r'()Landroid/content/pm/PackageManager;', - ); - - static final _get$packageManager = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.content.pm.PackageManager getPackageManager()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get packageManager { - return _get$packageManager( - reference.pointer, - _id_get$packageManager.pointer, - ).object(); - } - - static final _id_get$packageName = Context._class.instanceMethodId( - r'getPackageName', - r'()Ljava/lang/String;', - ); - - static final _get$packageName = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.lang.String getPackageName()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? get packageName { - return _get$packageName( - reference.pointer, - _id_get$packageName.pointer, - ).object(); - } - - static final _id_get$packageResourcePath = Context._class.instanceMethodId( - r'getPackageResourcePath', - r'()Ljava/lang/String;', - ); - - static final _get$packageResourcePath = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract java.lang.String getPackageResourcePath()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? get packageResourcePath { - return _get$packageResourcePath( - reference.pointer, - _id_get$packageResourcePath.pointer, - ).object(); - } - - static final _id_get$params = Context._class.instanceMethodId( - r'getParams', - r'()Landroid/content/ContextParams;', - ); - - static final _get$params = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public android.content.ContextParams getParams()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get params { - return _get$params( - reference.pointer, - _id_get$params.pointer, - ).object(); - } - - static final _id_get$resources = Context._class.instanceMethodId( - r'getResources', - r'()Landroid/content/res/Resources;', - ); - - static final _get$resources = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.content.res.Resources getResources()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get resources { - return _get$resources( - reference.pointer, - _id_get$resources.pointer, - ).object(); - } - - static final _id_getSharedPreferences = Context._class.instanceMethodId( - r'getSharedPreferences', - r'(Ljava/lang/String;I)Landroid/content/SharedPreferences;', - ); - - static final _getSharedPreferences = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract android.content.SharedPreferences getSharedPreferences(java.lang.String string, int i)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getSharedPreferences(jni$_.JString? string, core$_.int i) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _getSharedPreferences( - reference.pointer, - _id_getSharedPreferences.pointer, - _$string.pointer, - i, - ).object(); - } - - static final _id_getString = Context._class.instanceMethodId( - r'getString', - r'(I)Ljava/lang/String;', - ); - - static final _getString = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public final java.lang.String getString(int i)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getString(core$_.int i) { - return _getString( - reference.pointer, - _id_getString.pointer, - i, - ).object(); - } - - static final _id_getString$1 = Context._class.instanceMethodId( - r'getString', - r'(I[Ljava/lang/Object;)Ljava/lang/String;', - ); - - static final _getString$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32, jni$_.Pointer)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public final java.lang.String getString(int i, java.lang.Object[] objects)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getString$1( - core$_.int i, - jni$_.JArray? objects, - ) { - final _$objects = objects?.reference ?? jni$_.jNullReference; - return _getString$1( - reference.pointer, - _id_getString$1.pointer, - i, - _$objects.pointer, - ).object(); - } - - static final _id_getSystemService = Context._class.instanceMethodId( - r'getSystemService', - r'(Ljava/lang/Class;)Ljava/lang/Object;', - ); - - static final _getSystemService = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public final T getSystemService(java.lang.Class class)` - /// The returned object must be released after use, by calling the [release] method. - $T? getSystemService<$T extends jni$_.JObject?>(jni$_.JObject? class$) { - final _$class$ = class$?.reference ?? jni$_.jNullReference; - return _getSystemService( - reference.pointer, - _id_getSystemService.pointer, - _$class$.pointer, - ).object<$T?>(); - } - - static final _id_getSystemService$1 = Context._class.instanceMethodId( - r'getSystemService', - r'(Ljava/lang/String;)Ljava/lang/Object;', - ); - - static final _getSystemService$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract java.lang.Object getSystemService(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getSystemService$1(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _getSystemService$1( - reference.pointer, - _id_getSystemService$1.pointer, - _$string.pointer, - ).object(); - } - - static final _id_getSystemServiceName = Context._class.instanceMethodId( - r'getSystemServiceName', - r'(Ljava/lang/Class;)Ljava/lang/String;', - ); - - static final _getSystemServiceName = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract java.lang.String getSystemServiceName(java.lang.Class class)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? getSystemServiceName(jni$_.JObject? class$) { - final _$class$ = class$?.reference ?? jni$_.jNullReference; - return _getSystemServiceName( - reference.pointer, - _id_getSystemServiceName.pointer, - _$class$.pointer, - ).object(); - } - - static final _id_getText = Context._class.instanceMethodId( - r'getText', - r'(I)Ljava/lang/CharSequence;', - ); - - static final _getText = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public final java.lang.CharSequence getText(int i)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? getText(core$_.int i) { - return _getText( - reference.pointer, - _id_getText.pointer, - i, - ).object(); - } - - static final _id_get$theme = Context._class.instanceMethodId( - r'getTheme', - r'()Landroid/content/res/Resources$Theme;', - ); - - static final _get$theme = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.content.res.Resources$Theme getTheme()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get theme { - return _get$theme( - reference.pointer, - _id_get$theme.pointer, - ).object(); - } - - static final _id_get$wallpaper = Context._class.instanceMethodId( - r'getWallpaper', - r'()Landroid/graphics/drawable/Drawable;', - ); - - static final _get$wallpaper = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.graphics.drawable.Drawable getWallpaper()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? get wallpaper { - return _get$wallpaper( - reference.pointer, - _id_get$wallpaper.pointer, - ).object(); - } - - static final _id_get$wallpaperDesiredMinimumHeight = Context._class - .instanceMethodId(r'getWallpaperDesiredMinimumHeight', r'()I'); - - static final _get$wallpaperDesiredMinimumHeight = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract int getWallpaperDesiredMinimumHeight()` - core$_.int get wallpaperDesiredMinimumHeight { - return _get$wallpaperDesiredMinimumHeight( - reference.pointer, - _id_get$wallpaperDesiredMinimumHeight.pointer, - ).integer; - } - - static final _id_get$wallpaperDesiredMinimumWidth = Context._class - .instanceMethodId(r'getWallpaperDesiredMinimumWidth', r'()I'); - - static final _get$wallpaperDesiredMinimumWidth = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract int getWallpaperDesiredMinimumWidth()` - core$_.int get wallpaperDesiredMinimumWidth { - return _get$wallpaperDesiredMinimumWidth( - reference.pointer, - _id_get$wallpaperDesiredMinimumWidth.pointer, - ).integer; - } - - static final _id_grantUriPermission = Context._class.instanceMethodId( - r'grantUriPermission', - r'(Ljava/lang/String;Landroid/net/Uri;I)V', - ); - - static final _grantUriPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract void grantUriPermission(java.lang.String string, android.net.Uri uri, int i)` - void grantUriPermission( - jni$_.JString? string, - jni$_.JObject? uri, - core$_.int i, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$uri = uri?.reference ?? jni$_.jNullReference; - _grantUriPermission( - reference.pointer, - _id_grantUriPermission.pointer, - _$string.pointer, - _$uri.pointer, - i, - ).check(); - } - - static final _id_get$isDeviceProtectedStorage = Context._class - .instanceMethodId(r'isDeviceProtectedStorage', r'()Z'); - - static final _get$isDeviceProtectedStorage = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract boolean isDeviceProtectedStorage()` - core$_.bool get isDeviceProtectedStorage { - return _get$isDeviceProtectedStorage( - reference.pointer, - _id_get$isDeviceProtectedStorage.pointer, - ).boolean; - } - - static final _id_get$isRestricted = Context._class.instanceMethodId( - r'isRestricted', - r'()Z', - ); - - static final _get$isRestricted = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isRestricted()` - core$_.bool get isRestricted { - return _get$isRestricted( - reference.pointer, - _id_get$isRestricted.pointer, - ).boolean; - } - - static final _id_get$isUiContext = Context._class.instanceMethodId( - r'isUiContext', - r'()Z', - ); - - static final _get$isUiContext = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isUiContext()` - core$_.bool get isUiContext { - return _get$isUiContext( - reference.pointer, - _id_get$isUiContext.pointer, - ).boolean; - } - - static final _id_moveDatabaseFrom = Context._class.instanceMethodId( - r'moveDatabaseFrom', - r'(Landroid/content/Context;Ljava/lang/String;)Z', - ); - - static final _moveDatabaseFrom = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract boolean moveDatabaseFrom(android.content.Context context, java.lang.String string)` - core$_.bool moveDatabaseFrom(Context? context, jni$_.JString? string) { - final _$context = context?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - return _moveDatabaseFrom( - reference.pointer, - _id_moveDatabaseFrom.pointer, - _$context.pointer, - _$string.pointer, - ).boolean; - } - - static final _id_moveSharedPreferencesFrom = Context._class.instanceMethodId( - r'moveSharedPreferencesFrom', - r'(Landroid/content/Context;Ljava/lang/String;)Z', - ); - - static final _moveSharedPreferencesFrom = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract boolean moveSharedPreferencesFrom(android.content.Context context, java.lang.String string)` - core$_.bool moveSharedPreferencesFrom( - Context? context, - jni$_.JString? string, - ) { - final _$context = context?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - return _moveSharedPreferencesFrom( - reference.pointer, - _id_moveSharedPreferencesFrom.pointer, - _$context.pointer, - _$string.pointer, - ).boolean; - } - - static final _id_obtainStyledAttributes = Context._class.instanceMethodId( - r'obtainStyledAttributes', - r'(Landroid/util/AttributeSet;[I)Landroid/content/res/TypedArray;', - ); - - static final _obtainStyledAttributes = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public final android.content.res.TypedArray obtainStyledAttributes(android.util.AttributeSet attributeSet, int[] is)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? obtainStyledAttributes( - jni$_.JObject? attributeSet, - jni$_.JIntArray? is$, - ) { - final _$attributeSet = attributeSet?.reference ?? jni$_.jNullReference; - final _$is$ = is$?.reference ?? jni$_.jNullReference; - return _obtainStyledAttributes( - reference.pointer, - _id_obtainStyledAttributes.pointer, - _$attributeSet.pointer, - _$is$.pointer, - ).object(); - } - - static final _id_obtainStyledAttributes$1 = Context._class.instanceMethodId( - r'obtainStyledAttributes', - r'(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;', - ); - - static final _obtainStyledAttributes$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public final android.content.res.TypedArray obtainStyledAttributes(android.util.AttributeSet attributeSet, int[] is, int i, int i1)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? obtainStyledAttributes$1( - jni$_.JObject? attributeSet, - jni$_.JIntArray? is$, - core$_.int i, - core$_.int i1, - ) { - final _$attributeSet = attributeSet?.reference ?? jni$_.jNullReference; - final _$is$ = is$?.reference ?? jni$_.jNullReference; - return _obtainStyledAttributes$1( - reference.pointer, - _id_obtainStyledAttributes$1.pointer, - _$attributeSet.pointer, - _$is$.pointer, - i, - i1, - ).object(); - } - - static final _id_obtainStyledAttributes$2 = Context._class.instanceMethodId( - r'obtainStyledAttributes', - r'(I[I)Landroid/content/res/TypedArray;', - ); - - static final _obtainStyledAttributes$2 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32, jni$_.Pointer)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public final android.content.res.TypedArray obtainStyledAttributes(int i, int[] is)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? obtainStyledAttributes$2(core$_.int i, jni$_.JIntArray? is$) { - final _$is$ = is$?.reference ?? jni$_.jNullReference; - return _obtainStyledAttributes$2( - reference.pointer, - _id_obtainStyledAttributes$2.pointer, - i, - _$is$.pointer, - ).object(); - } - - static final _id_obtainStyledAttributes$3 = Context._class.instanceMethodId( - r'obtainStyledAttributes', - r'([I)Landroid/content/res/TypedArray;', - ); - - static final _obtainStyledAttributes$3 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public final android.content.res.TypedArray obtainStyledAttributes(int[] is)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? obtainStyledAttributes$3(jni$_.JIntArray? is$) { - final _$is$ = is$?.reference ?? jni$_.jNullReference; - return _obtainStyledAttributes$3( - reference.pointer, - _id_obtainStyledAttributes$3.pointer, - _$is$.pointer, - ).object(); - } - - static final _id_openFileInput = Context._class.instanceMethodId( - r'openFileInput', - r'(Ljava/lang/String;)Ljava/io/FileInputStream;', - ); - - static final _openFileInput = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract java.io.FileInputStream openFileInput(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? openFileInput(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _openFileInput( - reference.pointer, - _id_openFileInput.pointer, - _$string.pointer, - ).object(); - } - - static final _id_openFileOutput = Context._class.instanceMethodId( - r'openFileOutput', - r'(Ljava/lang/String;I)Ljava/io/FileOutputStream;', - ); - - static final _openFileOutput = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract java.io.FileOutputStream openFileOutput(java.lang.String string, int i)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? openFileOutput(jni$_.JString? string, core$_.int i) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _openFileOutput( - reference.pointer, - _id_openFileOutput.pointer, - _$string.pointer, - i, - ).object(); - } - - static final _id_openOrCreateDatabase = Context._class.instanceMethodId( - r'openOrCreateDatabase', - r'(Ljava/lang/String;ILandroid/database/sqlite/SQLiteDatabase$CursorFactory;)Landroid/database/sqlite/SQLiteDatabase;', - ); - - static final _openOrCreateDatabase = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String string, int i, android.database.sqlite.SQLiteDatabase$CursorFactory cursorFactory)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? openOrCreateDatabase( - jni$_.JString? string, - core$_.int i, - jni$_.JObject? cursorFactory, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$cursorFactory = cursorFactory?.reference ?? jni$_.jNullReference; - return _openOrCreateDatabase( - reference.pointer, - _id_openOrCreateDatabase.pointer, - _$string.pointer, - i, - _$cursorFactory.pointer, - ).object(); - } - - static final _id_openOrCreateDatabase$1 = Context._class.instanceMethodId( - r'openOrCreateDatabase', - r'(Ljava/lang/String;ILandroid/database/sqlite/SQLiteDatabase$CursorFactory;Landroid/database/DatabaseErrorHandler;)Landroid/database/sqlite/SQLiteDatabase;', - ); - - static final _openOrCreateDatabase$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract android.database.sqlite.SQLiteDatabase openOrCreateDatabase(java.lang.String string, int i, android.database.sqlite.SQLiteDatabase$CursorFactory cursorFactory, android.database.DatabaseErrorHandler databaseErrorHandler)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? openOrCreateDatabase$1( - jni$_.JString? string, - core$_.int i, - jni$_.JObject? cursorFactory, - jni$_.JObject? databaseErrorHandler, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$cursorFactory = cursorFactory?.reference ?? jni$_.jNullReference; - final _$databaseErrorHandler = - databaseErrorHandler?.reference ?? jni$_.jNullReference; - return _openOrCreateDatabase$1( - reference.pointer, - _id_openOrCreateDatabase$1.pointer, - _$string.pointer, - i, - _$cursorFactory.pointer, - _$databaseErrorHandler.pointer, - ).object(); - } - - static final _id_peekWallpaper = Context._class.instanceMethodId( - r'peekWallpaper', - r'()Landroid/graphics/drawable/Drawable;', - ); - - static final _peekWallpaper = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public abstract android.graphics.drawable.Drawable peekWallpaper()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? peekWallpaper() { - return _peekWallpaper( - reference.pointer, - _id_peekWallpaper.pointer, - ).object(); - } - - static final _id_registerComponentCallbacks = Context._class.instanceMethodId( - r'registerComponentCallbacks', - r'(Landroid/content/ComponentCallbacks;)V', - ); - - static final _registerComponentCallbacks = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public void registerComponentCallbacks(android.content.ComponentCallbacks componentCallbacks)` - void registerComponentCallbacks(jni$_.JObject? componentCallbacks) { - final _$componentCallbacks = - componentCallbacks?.reference ?? jni$_.jNullReference; - _registerComponentCallbacks( - reference.pointer, - _id_registerComponentCallbacks.pointer, - _$componentCallbacks.pointer, - ).check(); - } - - static final _id_registerDeviceIdChangeListener = Context._class - .instanceMethodId( - r'registerDeviceIdChangeListener', - r'(Ljava/util/concurrent/Executor;Ljava/util/function/IntConsumer;)V', - ); - - static final _registerDeviceIdChangeListener = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void registerDeviceIdChangeListener(java.util.concurrent.Executor executor, java.util.function.IntConsumer intConsumer)` - void registerDeviceIdChangeListener( - jni$_.JObject? executor, - jni$_.JObject? intConsumer, - ) { - final _$executor = executor?.reference ?? jni$_.jNullReference; - final _$intConsumer = intConsumer?.reference ?? jni$_.jNullReference; - _registerDeviceIdChangeListener( - reference.pointer, - _id_registerDeviceIdChangeListener.pointer, - _$executor.pointer, - _$intConsumer.pointer, - ).check(); - } - - static final _id_registerReceiver = Context._class.instanceMethodId( - r'registerReceiver', - r'(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;', - ); - - static final _registerReceiver = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract android.content.Intent registerReceiver(android.content.BroadcastReceiver broadcastReceiver, android.content.IntentFilter intentFilter)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? registerReceiver( - jni$_.JObject? broadcastReceiver, - jni$_.JObject? intentFilter, - ) { - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - final _$intentFilter = intentFilter?.reference ?? jni$_.jNullReference; - return _registerReceiver( - reference.pointer, - _id_registerReceiver.pointer, - _$broadcastReceiver.pointer, - _$intentFilter.pointer, - ).object(); - } - - static final _id_registerReceiver$1 = Context._class.instanceMethodId( - r'registerReceiver', - r'(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;I)Landroid/content/Intent;', - ); - - static final _registerReceiver$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract android.content.Intent registerReceiver(android.content.BroadcastReceiver broadcastReceiver, android.content.IntentFilter intentFilter, int i)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? registerReceiver$1( - jni$_.JObject? broadcastReceiver, - jni$_.JObject? intentFilter, - core$_.int i, - ) { - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - final _$intentFilter = intentFilter?.reference ?? jni$_.jNullReference; - return _registerReceiver$1( - reference.pointer, - _id_registerReceiver$1.pointer, - _$broadcastReceiver.pointer, - _$intentFilter.pointer, - i, - ).object(); - } - - static final _id_registerReceiver$2 = Context._class.instanceMethodId( - r'registerReceiver', - r'(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;', - ); - - static final _registerReceiver$2 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract android.content.Intent registerReceiver(android.content.BroadcastReceiver broadcastReceiver, android.content.IntentFilter intentFilter, java.lang.String string, android.os.Handler handler)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? registerReceiver$2( - jni$_.JObject? broadcastReceiver, - jni$_.JObject? intentFilter, - jni$_.JString? string, - jni$_.JObject? handler, - ) { - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - final _$intentFilter = intentFilter?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$handler = handler?.reference ?? jni$_.jNullReference; - return _registerReceiver$2( - reference.pointer, - _id_registerReceiver$2.pointer, - _$broadcastReceiver.pointer, - _$intentFilter.pointer, - _$string.pointer, - _$handler.pointer, - ).object(); - } - - static final _id_registerReceiver$3 = Context._class.instanceMethodId( - r'registerReceiver', - r'(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;I)Landroid/content/Intent;', - ); - - static final _registerReceiver$3 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract android.content.Intent registerReceiver(android.content.BroadcastReceiver broadcastReceiver, android.content.IntentFilter intentFilter, java.lang.String string, android.os.Handler handler, int i)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? registerReceiver$3( - jni$_.JObject? broadcastReceiver, - jni$_.JObject? intentFilter, - jni$_.JString? string, - jni$_.JObject? handler, - core$_.int i, - ) { - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - final _$intentFilter = intentFilter?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$handler = handler?.reference ?? jni$_.jNullReference; - return _registerReceiver$3( - reference.pointer, - _id_registerReceiver$3.pointer, - _$broadcastReceiver.pointer, - _$intentFilter.pointer, - _$string.pointer, - _$handler.pointer, - i, - ).object(); - } - - static final _id_removeStickyBroadcast = Context._class.instanceMethodId( - r'removeStickyBroadcast', - r'(Landroid/content/Intent;)V', - ); - - static final _removeStickyBroadcast = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void removeStickyBroadcast(android.content.Intent intent)` - void removeStickyBroadcast(jni$_.JObject? intent) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - _removeStickyBroadcast( - reference.pointer, - _id_removeStickyBroadcast.pointer, - _$intent.pointer, - ).check(); - } - - static final _id_removeStickyBroadcastAsUser = Context._class - .instanceMethodId( - r'removeStickyBroadcastAsUser', - r'(Landroid/content/Intent;Landroid/os/UserHandle;)V', - ); - - static final _removeStickyBroadcastAsUser = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void removeStickyBroadcastAsUser(android.content.Intent intent, android.os.UserHandle userHandle)` - void removeStickyBroadcastAsUser( - jni$_.JObject? intent, - jni$_.JObject? userHandle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$userHandle = userHandle?.reference ?? jni$_.jNullReference; - _removeStickyBroadcastAsUser( - reference.pointer, - _id_removeStickyBroadcastAsUser.pointer, - _$intent.pointer, - _$userHandle.pointer, - ).check(); - } - - static final _id_revokeSelfPermissionOnKill = Context._class.instanceMethodId( - r'revokeSelfPermissionOnKill', - r'(Ljava/lang/String;)V', - ); - - static final _revokeSelfPermissionOnKill = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public void revokeSelfPermissionOnKill(java.lang.String string)` - void revokeSelfPermissionOnKill(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - _revokeSelfPermissionOnKill( - reference.pointer, - _id_revokeSelfPermissionOnKill.pointer, - _$string.pointer, - ).check(); - } - - static final _id_revokeSelfPermissionsOnKill = Context._class - .instanceMethodId( - r'revokeSelfPermissionsOnKill', - r'(Ljava/util/Collection;)V', - ); - - static final _revokeSelfPermissionsOnKill = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public void revokeSelfPermissionsOnKill(java.util.Collection collection)` - void revokeSelfPermissionsOnKill(jni$_.JObject? collection) { - final _$collection = collection?.reference ?? jni$_.jNullReference; - _revokeSelfPermissionsOnKill( - reference.pointer, - _id_revokeSelfPermissionsOnKill.pointer, - _$collection.pointer, - ).check(); - } - - static final _id_revokeUriPermission = Context._class.instanceMethodId( - r'revokeUriPermission', - r'(Landroid/net/Uri;I)V', - ); - - static final _revokeUriPermission = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer, jni$_.Int32)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract void revokeUriPermission(android.net.Uri uri, int i)` - void revokeUriPermission(jni$_.JObject? uri, core$_.int i) { - final _$uri = uri?.reference ?? jni$_.jNullReference; - _revokeUriPermission( - reference.pointer, - _id_revokeUriPermission.pointer, - _$uri.pointer, - i, - ).check(); - } - - static final _id_revokeUriPermission$1 = Context._class.instanceMethodId( - r'revokeUriPermission', - r'(Ljava/lang/String;Landroid/net/Uri;I)V', - ); - - static final _revokeUriPermission$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - ) - >(); - - /// from: `public abstract void revokeUriPermission(java.lang.String string, android.net.Uri uri, int i)` - void revokeUriPermission$1( - jni$_.JString? string, - jni$_.JObject? uri, - core$_.int i, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$uri = uri?.reference ?? jni$_.jNullReference; - _revokeUriPermission$1( - reference.pointer, - _id_revokeUriPermission$1.pointer, - _$string.pointer, - _$uri.pointer, - i, - ).check(); - } - - static final _id_sendBroadcast = Context._class.instanceMethodId( - r'sendBroadcast', - r'(Landroid/content/Intent;)V', - ); - - static final _sendBroadcast = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendBroadcast(android.content.Intent intent)` - void sendBroadcast(jni$_.JObject? intent) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - _sendBroadcast( - reference.pointer, - _id_sendBroadcast.pointer, - _$intent.pointer, - ).check(); - } - - static final _id_sendBroadcast$1 = Context._class.instanceMethodId( - r'sendBroadcast', - r'(Landroid/content/Intent;Ljava/lang/String;)V', - ); - - static final _sendBroadcast$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendBroadcast(android.content.Intent intent, java.lang.String string)` - void sendBroadcast$1(jni$_.JObject? intent, jni$_.JString? string) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - _sendBroadcast$1( - reference.pointer, - _id_sendBroadcast$1.pointer, - _$intent.pointer, - _$string.pointer, - ).check(); - } - - static final _id_sendBroadcast$2 = Context._class.instanceMethodId( - r'sendBroadcast', - r'(Landroid/content/Intent;Ljava/lang/String;Landroid/os/Bundle;)V', - ); - - static final _sendBroadcast$2 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void sendBroadcast(android.content.Intent intent, java.lang.String string, android.os.Bundle bundle)` - void sendBroadcast$2( - jni$_.JObject? intent, - jni$_.JString? string, - jni$_.JObject? bundle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _sendBroadcast$2( - reference.pointer, - _id_sendBroadcast$2.pointer, - _$intent.pointer, - _$string.pointer, - _$bundle.pointer, - ).check(); - } - - static final _id_sendBroadcastAsUser = Context._class.instanceMethodId( - r'sendBroadcastAsUser', - r'(Landroid/content/Intent;Landroid/os/UserHandle;)V', - ); - - static final _sendBroadcastAsUser = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendBroadcastAsUser(android.content.Intent intent, android.os.UserHandle userHandle)` - void sendBroadcastAsUser(jni$_.JObject? intent, jni$_.JObject? userHandle) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$userHandle = userHandle?.reference ?? jni$_.jNullReference; - _sendBroadcastAsUser( - reference.pointer, - _id_sendBroadcastAsUser.pointer, - _$intent.pointer, - _$userHandle.pointer, - ).check(); - } - - static final _id_sendBroadcastAsUser$1 = Context._class.instanceMethodId( - r'sendBroadcastAsUser', - r'(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;)V', - ); - - static final _sendBroadcastAsUser$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendBroadcastAsUser(android.content.Intent intent, android.os.UserHandle userHandle, java.lang.String string)` - void sendBroadcastAsUser$1( - jni$_.JObject? intent, - jni$_.JObject? userHandle, - jni$_.JString? string, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$userHandle = userHandle?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - _sendBroadcastAsUser$1( - reference.pointer, - _id_sendBroadcastAsUser$1.pointer, - _$intent.pointer, - _$userHandle.pointer, - _$string.pointer, - ).check(); - } - - static final _id_sendBroadcastWithMultiplePermissions = Context._class - .instanceMethodId( - r'sendBroadcastWithMultiplePermissions', - r'(Landroid/content/Intent;[Ljava/lang/String;)V', - ); - - static final _sendBroadcastWithMultiplePermissions = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void sendBroadcastWithMultiplePermissions(android.content.Intent intent, java.lang.String[] strings)` - void sendBroadcastWithMultiplePermissions( - jni$_.JObject? intent, - jni$_.JArray? strings, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$strings = strings?.reference ?? jni$_.jNullReference; - _sendBroadcastWithMultiplePermissions( - reference.pointer, - _id_sendBroadcastWithMultiplePermissions.pointer, - _$intent.pointer, - _$strings.pointer, - ).check(); - } - - static final _id_sendOrderedBroadcast = Context._class.instanceMethodId( - r'sendOrderedBroadcast', - r'(Landroid/content/Intent;Ljava/lang/String;)V', - ); - - static final _sendOrderedBroadcast = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendOrderedBroadcast(android.content.Intent intent, java.lang.String string)` - void sendOrderedBroadcast(jni$_.JObject? intent, jni$_.JString? string) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - _sendOrderedBroadcast( - reference.pointer, - _id_sendOrderedBroadcast.pointer, - _$intent.pointer, - _$string.pointer, - ).check(); - } - - static final _id_sendOrderedBroadcast$1 = Context._class.instanceMethodId( - r'sendOrderedBroadcast', - r'(Landroid/content/Intent;Ljava/lang/String;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V', - ); - - static final _sendOrderedBroadcast$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendOrderedBroadcast(android.content.Intent intent, java.lang.String string, android.content.BroadcastReceiver broadcastReceiver, android.os.Handler handler, int i, java.lang.String string1, android.os.Bundle bundle)` - void sendOrderedBroadcast$1( - jni$_.JObject? intent, - jni$_.JString? string, - jni$_.JObject? broadcastReceiver, - jni$_.JObject? handler, - core$_.int i, - jni$_.JString? string1, - jni$_.JObject? bundle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - final _$handler = handler?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _sendOrderedBroadcast$1( - reference.pointer, - _id_sendOrderedBroadcast$1.pointer, - _$intent.pointer, - _$string.pointer, - _$broadcastReceiver.pointer, - _$handler.pointer, - i, - _$string1.pointer, - _$bundle.pointer, - ).check(); - } - - static final _id_sendOrderedBroadcast$2 = Context._class.instanceMethodId( - r'sendOrderedBroadcast', - r'(Landroid/content/Intent;Ljava/lang/String;Landroid/os/Bundle;)V', - ); - - static final _sendOrderedBroadcast$2 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void sendOrderedBroadcast(android.content.Intent intent, java.lang.String string, android.os.Bundle bundle)` - void sendOrderedBroadcast$2( - jni$_.JObject? intent, - jni$_.JString? string, - jni$_.JObject? bundle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _sendOrderedBroadcast$2( - reference.pointer, - _id_sendOrderedBroadcast$2.pointer, - _$intent.pointer, - _$string.pointer, - _$bundle.pointer, - ).check(); - } - - static final _id_sendOrderedBroadcast$3 = Context._class.instanceMethodId( - r'sendOrderedBroadcast', - r'(Landroid/content/Intent;Ljava/lang/String;Landroid/os/Bundle;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V', - ); - - static final _sendOrderedBroadcast$3 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void sendOrderedBroadcast(android.content.Intent intent, java.lang.String string, android.os.Bundle bundle, android.content.BroadcastReceiver broadcastReceiver, android.os.Handler handler, int i, java.lang.String string1, android.os.Bundle bundle1)` - void sendOrderedBroadcast$3( - jni$_.JObject? intent, - jni$_.JString? string, - jni$_.JObject? bundle, - jni$_.JObject? broadcastReceiver, - jni$_.JObject? handler, - core$_.int i, - jni$_.JString? string1, - jni$_.JObject? bundle1, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - final _$handler = handler?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - final _$bundle1 = bundle1?.reference ?? jni$_.jNullReference; - _sendOrderedBroadcast$3( - reference.pointer, - _id_sendOrderedBroadcast$3.pointer, - _$intent.pointer, - _$string.pointer, - _$bundle.pointer, - _$broadcastReceiver.pointer, - _$handler.pointer, - i, - _$string1.pointer, - _$bundle1.pointer, - ).check(); - } - - static final _id_sendOrderedBroadcast$4 = Context._class.instanceMethodId( - r'sendOrderedBroadcast', - r'(Landroid/content/Intent;Ljava/lang/String;Ljava/lang/String;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V', - ); - - static final _sendOrderedBroadcast$4 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void sendOrderedBroadcast(android.content.Intent intent, java.lang.String string, java.lang.String string1, android.content.BroadcastReceiver broadcastReceiver, android.os.Handler handler, int i, java.lang.String string2, android.os.Bundle bundle)` - void sendOrderedBroadcast$4( - jni$_.JObject? intent, - jni$_.JString? string, - jni$_.JString? string1, - jni$_.JObject? broadcastReceiver, - jni$_.JObject? handler, - core$_.int i, - jni$_.JString? string2, - jni$_.JObject? bundle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - final _$handler = handler?.reference ?? jni$_.jNullReference; - final _$string2 = string2?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _sendOrderedBroadcast$4( - reference.pointer, - _id_sendOrderedBroadcast$4.pointer, - _$intent.pointer, - _$string.pointer, - _$string1.pointer, - _$broadcastReceiver.pointer, - _$handler.pointer, - i, - _$string2.pointer, - _$bundle.pointer, - ).check(); - } - - static final _id_sendOrderedBroadcastAsUser = Context._class.instanceMethodId( - r'sendOrderedBroadcastAsUser', - r'(Landroid/content/Intent;Landroid/os/UserHandle;Ljava/lang/String;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V', - ); - - static final _sendOrderedBroadcastAsUser = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendOrderedBroadcastAsUser(android.content.Intent intent, android.os.UserHandle userHandle, java.lang.String string, android.content.BroadcastReceiver broadcastReceiver, android.os.Handler handler, int i, java.lang.String string1, android.os.Bundle bundle)` - void sendOrderedBroadcastAsUser( - jni$_.JObject? intent, - jni$_.JObject? userHandle, - jni$_.JString? string, - jni$_.JObject? broadcastReceiver, - jni$_.JObject? handler, - core$_.int i, - jni$_.JString? string1, - jni$_.JObject? bundle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$userHandle = userHandle?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - final _$handler = handler?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _sendOrderedBroadcastAsUser( - reference.pointer, - _id_sendOrderedBroadcastAsUser.pointer, - _$intent.pointer, - _$userHandle.pointer, - _$string.pointer, - _$broadcastReceiver.pointer, - _$handler.pointer, - i, - _$string1.pointer, - _$bundle.pointer, - ).check(); - } - - static final _id_sendStickyBroadcast = Context._class.instanceMethodId( - r'sendStickyBroadcast', - r'(Landroid/content/Intent;)V', - ); - - static final _sendStickyBroadcast = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendStickyBroadcast(android.content.Intent intent)` - void sendStickyBroadcast(jni$_.JObject? intent) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - _sendStickyBroadcast( - reference.pointer, - _id_sendStickyBroadcast.pointer, - _$intent.pointer, - ).check(); - } - - static final _id_sendStickyBroadcast$1 = Context._class.instanceMethodId( - r'sendStickyBroadcast', - r'(Landroid/content/Intent;Landroid/os/Bundle;)V', - ); - - static final _sendStickyBroadcast$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void sendStickyBroadcast(android.content.Intent intent, android.os.Bundle bundle)` - void sendStickyBroadcast$1(jni$_.JObject? intent, jni$_.JObject? bundle) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _sendStickyBroadcast$1( - reference.pointer, - _id_sendStickyBroadcast$1.pointer, - _$intent.pointer, - _$bundle.pointer, - ).check(); - } - - static final _id_sendStickyBroadcastAsUser = Context._class.instanceMethodId( - r'sendStickyBroadcastAsUser', - r'(Landroid/content/Intent;Landroid/os/UserHandle;)V', - ); - - static final _sendStickyBroadcastAsUser = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendStickyBroadcastAsUser(android.content.Intent intent, android.os.UserHandle userHandle)` - void sendStickyBroadcastAsUser( - jni$_.JObject? intent, - jni$_.JObject? userHandle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$userHandle = userHandle?.reference ?? jni$_.jNullReference; - _sendStickyBroadcastAsUser( - reference.pointer, - _id_sendStickyBroadcastAsUser.pointer, - _$intent.pointer, - _$userHandle.pointer, - ).check(); - } - - static final _id_sendStickyOrderedBroadcast = Context._class.instanceMethodId( - r'sendStickyOrderedBroadcast', - r'(Landroid/content/Intent;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V', - ); - - static final _sendStickyOrderedBroadcast = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendStickyOrderedBroadcast(android.content.Intent intent, android.content.BroadcastReceiver broadcastReceiver, android.os.Handler handler, int i, java.lang.String string, android.os.Bundle bundle)` - void sendStickyOrderedBroadcast( - jni$_.JObject? intent, - jni$_.JObject? broadcastReceiver, - jni$_.JObject? handler, - core$_.int i, - jni$_.JString? string, - jni$_.JObject? bundle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - final _$handler = handler?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _sendStickyOrderedBroadcast( - reference.pointer, - _id_sendStickyOrderedBroadcast.pointer, - _$intent.pointer, - _$broadcastReceiver.pointer, - _$handler.pointer, - i, - _$string.pointer, - _$bundle.pointer, - ).check(); - } - - static final _id_sendStickyOrderedBroadcastAsUser = Context._class - .instanceMethodId( - r'sendStickyOrderedBroadcastAsUser', - r'(Landroid/content/Intent;Landroid/os/UserHandle;Landroid/content/BroadcastReceiver;Landroid/os/Handler;ILjava/lang/String;Landroid/os/Bundle;)V', - ); - - static final _sendStickyOrderedBroadcastAsUser = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void sendStickyOrderedBroadcastAsUser(android.content.Intent intent, android.os.UserHandle userHandle, android.content.BroadcastReceiver broadcastReceiver, android.os.Handler handler, int i, java.lang.String string, android.os.Bundle bundle)` - void sendStickyOrderedBroadcastAsUser( - jni$_.JObject? intent, - jni$_.JObject? userHandle, - jni$_.JObject? broadcastReceiver, - jni$_.JObject? handler, - core$_.int i, - jni$_.JString? string, - jni$_.JObject? bundle, - ) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$userHandle = userHandle?.reference ?? jni$_.jNullReference; - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - final _$handler = handler?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _sendStickyOrderedBroadcastAsUser( - reference.pointer, - _id_sendStickyOrderedBroadcastAsUser.pointer, - _$intent.pointer, - _$userHandle.pointer, - _$broadcastReceiver.pointer, - _$handler.pointer, - i, - _$string.pointer, - _$bundle.pointer, - ).check(); - } - - static final _id_set$theme$1 = Context._class.instanceMethodId( - r'setTheme', - r'(I)V', - ); - - static final _set$theme$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public abstract void setTheme(int i)` - set theme$1(core$_.int i) { - _set$theme$1(reference.pointer, _id_set$theme$1.pointer, i).check(); - } - - static final _id_set$wallpaper$1 = Context._class.instanceMethodId( - r'setWallpaper', - r'(Landroid/graphics/Bitmap;)V', - ); - - static final _set$wallpaper$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void setWallpaper(android.graphics.Bitmap bitmap)` - set wallpaper$1(jni$_.JObject? bitmap) { - final _$bitmap = bitmap?.reference ?? jni$_.jNullReference; - _set$wallpaper$1( - reference.pointer, - _id_set$wallpaper$1.pointer, - _$bitmap.pointer, - ).check(); - } - - static final _id_set$wallpaper$2 = Context._class.instanceMethodId( - r'setWallpaper', - r'(Ljava/io/InputStream;)V', - ); - - static final _set$wallpaper$2 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void setWallpaper(java.io.InputStream inputStream)` - set wallpaper$2(jni$_.JObject? inputStream) { - final _$inputStream = inputStream?.reference ?? jni$_.jNullReference; - _set$wallpaper$2( - reference.pointer, - _id_set$wallpaper$2.pointer, - _$inputStream.pointer, - ).check(); - } - - static final _id_startActivities = Context._class.instanceMethodId( - r'startActivities', - r'([Landroid/content/Intent;)V', - ); - - static final _startActivities = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void startActivities(android.content.Intent[] intents)` - void startActivities(jni$_.JArray? intents) { - final _$intents = intents?.reference ?? jni$_.jNullReference; - _startActivities( - reference.pointer, - _id_startActivities.pointer, - _$intents.pointer, - ).check(); - } - - static final _id_startActivities$1 = Context._class.instanceMethodId( - r'startActivities', - r'([Landroid/content/Intent;Landroid/os/Bundle;)V', - ); - - static final _startActivities$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void startActivities(android.content.Intent[] intents, android.os.Bundle bundle)` - void startActivities$1( - jni$_.JArray? intents, - jni$_.JObject? bundle, - ) { - final _$intents = intents?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _startActivities$1( - reference.pointer, - _id_startActivities$1.pointer, - _$intents.pointer, - _$bundle.pointer, - ).check(); - } - - static final _id_startActivity = Context._class.instanceMethodId( - r'startActivity', - r'(Landroid/content/Intent;)V', - ); - - static final _startActivity = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void startActivity(android.content.Intent intent)` - void startActivity(jni$_.JObject? intent) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - _startActivity( - reference.pointer, - _id_startActivity.pointer, - _$intent.pointer, - ).check(); - } - - static final _id_startActivity$1 = Context._class.instanceMethodId( - r'startActivity', - r'(Landroid/content/Intent;Landroid/os/Bundle;)V', - ); - - static final _startActivity$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void startActivity(android.content.Intent intent, android.os.Bundle bundle)` - void startActivity$1(jni$_.JObject? intent, jni$_.JObject? bundle) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _startActivity$1( - reference.pointer, - _id_startActivity$1.pointer, - _$intent.pointer, - _$bundle.pointer, - ).check(); - } - - static final _id_startForegroundService = Context._class.instanceMethodId( - r'startForegroundService', - r'(Landroid/content/Intent;)Landroid/content/ComponentName;', - ); - - static final _startForegroundService = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract android.content.ComponentName startForegroundService(android.content.Intent intent)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? startForegroundService(jni$_.JObject? intent) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - return _startForegroundService( - reference.pointer, - _id_startForegroundService.pointer, - _$intent.pointer, - ).object(); - } - - static final _id_startInstrumentation = Context._class.instanceMethodId( - r'startInstrumentation', - r'(Landroid/content/ComponentName;Ljava/lang/String;Landroid/os/Bundle;)Z', - ); - - static final _startInstrumentation = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract boolean startInstrumentation(android.content.ComponentName componentName, java.lang.String string, android.os.Bundle bundle)` - core$_.bool startInstrumentation( - jni$_.JObject? componentName, - jni$_.JString? string, - jni$_.JObject? bundle, - ) { - final _$componentName = componentName?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - return _startInstrumentation( - reference.pointer, - _id_startInstrumentation.pointer, - _$componentName.pointer, - _$string.pointer, - _$bundle.pointer, - ).boolean; - } - - static final _id_startIntentSender = Context._class.instanceMethodId( - r'startIntentSender', - r'(Landroid/content/IntentSender;Landroid/content/Intent;III)V', - ); - - static final _startIntentSender = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - jni$_.Int32, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public abstract void startIntentSender(android.content.IntentSender intentSender, android.content.Intent intent, int i, int i1, int i2)` - void startIntentSender( - jni$_.JObject? intentSender, - jni$_.JObject? intent, - core$_.int i, - core$_.int i1, - core$_.int i2, - ) { - final _$intentSender = intentSender?.reference ?? jni$_.jNullReference; - final _$intent = intent?.reference ?? jni$_.jNullReference; - _startIntentSender( - reference.pointer, - _id_startIntentSender.pointer, - _$intentSender.pointer, - _$intent.pointer, - i, - i1, - i2, - ).check(); - } - - static final _id_startIntentSender$1 = Context._class.instanceMethodId( - r'startIntentSender', - r'(Landroid/content/IntentSender;Landroid/content/Intent;IIILandroid/os/Bundle;)V', - ); - - static final _startIntentSender$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Int32, - jni$_.Int32, - jni$_.Int32, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - core$_.int, - core$_.int, - core$_.int, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void startIntentSender(android.content.IntentSender intentSender, android.content.Intent intent, int i, int i1, int i2, android.os.Bundle bundle)` - void startIntentSender$1( - jni$_.JObject? intentSender, - jni$_.JObject? intent, - core$_.int i, - core$_.int i1, - core$_.int i2, - jni$_.JObject? bundle, - ) { - final _$intentSender = intentSender?.reference ?? jni$_.jNullReference; - final _$intent = intent?.reference ?? jni$_.jNullReference; - final _$bundle = bundle?.reference ?? jni$_.jNullReference; - _startIntentSender$1( - reference.pointer, - _id_startIntentSender$1.pointer, - _$intentSender.pointer, - _$intent.pointer, - i, - i1, - i2, - _$bundle.pointer, - ).check(); - } - - static final _id_startService = Context._class.instanceMethodId( - r'startService', - r'(Landroid/content/Intent;)Landroid/content/ComponentName;', - ); - - static final _startService = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract android.content.ComponentName startService(android.content.Intent intent)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? startService(jni$_.JObject? intent) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - return _startService( - reference.pointer, - _id_startService.pointer, - _$intent.pointer, - ).object(); - } - - static final _id_stopService = Context._class.instanceMethodId( - r'stopService', - r'(Landroid/content/Intent;)Z', - ); - - static final _stopService = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract boolean stopService(android.content.Intent intent)` - core$_.bool stopService(jni$_.JObject? intent) { - final _$intent = intent?.reference ?? jni$_.jNullReference; - return _stopService( - reference.pointer, - _id_stopService.pointer, - _$intent.pointer, - ).boolean; - } - - static final _id_unbindService = Context._class.instanceMethodId( - r'unbindService', - r'(Landroid/content/ServiceConnection;)V', - ); - - static final _unbindService = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void unbindService(android.content.ServiceConnection serviceConnection)` - void unbindService(jni$_.JObject? serviceConnection) { - final _$serviceConnection = - serviceConnection?.reference ?? jni$_.jNullReference; - _unbindService( - reference.pointer, - _id_unbindService.pointer, - _$serviceConnection.pointer, - ).check(); - } - - static final _id_unregisterComponentCallbacks = Context._class - .instanceMethodId( - r'unregisterComponentCallbacks', - r'(Landroid/content/ComponentCallbacks;)V', - ); - - static final _unregisterComponentCallbacks = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public void unregisterComponentCallbacks(android.content.ComponentCallbacks componentCallbacks)` - void unregisterComponentCallbacks(jni$_.JObject? componentCallbacks) { - final _$componentCallbacks = - componentCallbacks?.reference ?? jni$_.jNullReference; - _unregisterComponentCallbacks( - reference.pointer, - _id_unregisterComponentCallbacks.pointer, - _$componentCallbacks.pointer, - ).check(); - } - - static final _id_unregisterDeviceIdChangeListener = Context._class - .instanceMethodId( - r'unregisterDeviceIdChangeListener', - r'(Ljava/util/function/IntConsumer;)V', - ); - - static final _unregisterDeviceIdChangeListener = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public void unregisterDeviceIdChangeListener(java.util.function.IntConsumer intConsumer)` - void unregisterDeviceIdChangeListener(jni$_.JObject? intConsumer) { - final _$intConsumer = intConsumer?.reference ?? jni$_.jNullReference; - _unregisterDeviceIdChangeListener( - reference.pointer, - _id_unregisterDeviceIdChangeListener.pointer, - _$intConsumer.pointer, - ).check(); - } - - static final _id_unregisterReceiver = Context._class.instanceMethodId( - r'unregisterReceiver', - r'(Landroid/content/BroadcastReceiver;)V', - ); - - static final _unregisterReceiver = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public abstract void unregisterReceiver(android.content.BroadcastReceiver broadcastReceiver)` - void unregisterReceiver(jni$_.JObject? broadcastReceiver) { - final _$broadcastReceiver = - broadcastReceiver?.reference ?? jni$_.jNullReference; - _unregisterReceiver( - reference.pointer, - _id_unregisterReceiver.pointer, - _$broadcastReceiver.pointer, - ).check(); - } - - static final _id_updateServiceGroup = Context._class.instanceMethodId( - r'updateServiceGroup', - r'(Landroid/content/ServiceConnection;II)V', - ); - - static final _updateServiceGroup = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Int32, jni$_.Int32) - >, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public void updateServiceGroup(android.content.ServiceConnection serviceConnection, int i, int i1)` - void updateServiceGroup( - jni$_.JObject? serviceConnection, - core$_.int i, - core$_.int i1, - ) { - final _$serviceConnection = - serviceConnection?.reference ?? jni$_.jNullReference; - _updateServiceGroup( - reference.pointer, - _id_updateServiceGroup.pointer, - _$serviceConnection.pointer, - i, - i1, - ).check(); - } -} - -final class $Context$Type$ extends jni$_.JType { - @jni$_.internal - const $Context$Type$(); - - @jni$_.internal - @core$_.override - String get signature => r'Landroid/content/Context;'; -} - -/// from: `io.flutter.util.PathUtils` -extension type PathUtils._(jni$_.JObject _$this) implements jni$_.JObject { - static final _class = jni$_.JClass.forName(r'io/flutter/util/PathUtils'); - - /// The type which includes information such as the signature of this class. - static const jni$_.JType type = $PathUtils$Type$(); - static final _id_new$ = _class.constructorId(r'()V'); - - static final _new$ = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_NewObject') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public void ()` - /// The returned object must be released after use, by calling the [release] method. - factory PathUtils() { - return _new$( - _class.reference.pointer, - _id_new$.pointer, - ).object(); - } - - static final _id_getFilesDir = _class.staticMethodId( - r'getFilesDir', - r'(Landroid/content/Context;)Ljava/lang/String;', - ); - - static final _getFilesDir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public java.lang.String getFilesDir(android.content.Context context)` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString getFilesDir(Context context) { - final _$context = context.reference; - return _getFilesDir( - _class.reference.pointer, - _id_getFilesDir.pointer, - _$context.pointer, - ).object(); - } - - static final _id_getDataDirectory = _class.staticMethodId( - r'getDataDirectory', - r'(Landroid/content/Context;)Ljava/lang/String;', - ); - - static final _getDataDirectory = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public java.lang.String getDataDirectory(android.content.Context context)` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString getDataDirectory(Context context) { - final _$context = context.reference; - return _getDataDirectory( - _class.reference.pointer, - _id_getDataDirectory.pointer, - _$context.pointer, - ).object(); - } - - static final _id_getCacheDirectory = _class.staticMethodId( - r'getCacheDirectory', - r'(Landroid/content/Context;)Ljava/lang/String;', - ); - - static final _getCacheDirectory = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public java.lang.String getCacheDirectory(android.content.Context context)` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString getCacheDirectory(Context context) { - final _$context = context.reference; - return _getCacheDirectory( - _class.reference.pointer, - _id_getCacheDirectory.pointer, - _$context.pointer, - ).object(); - } -} - -final class $PathUtils$Type$ extends jni$_.JType { - @jni$_.internal - const $PathUtils$Type$(); - - @jni$_.internal - @core$_.override - String get signature => r'Lio/flutter/util/PathUtils;'; -} - -/// from: `java.io.File` -extension type File._(jni$_.JObject _$this) implements jni$_.JObject { - static final _class = jni$_.JClass.forName(r'java/io/File'); - - /// The type which includes information such as the signature of this class. - static const jni$_.JType type = $File$Type$(); - static final _id_pathSeparator = _class.staticFieldId( - r'pathSeparator', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String pathSeparator` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get pathSeparator => - _id_pathSeparator.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_pathSeparatorChar = _class.staticFieldId( - r'pathSeparatorChar', - r'C', - ); - - /// from: `static public final char pathSeparatorChar` - static core$_.int get pathSeparatorChar => - _id_pathSeparatorChar.getNullable(_class, jni$_.jchar.type) as core$_.int; - - static final _id_separator = _class.staticFieldId( - r'separator', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String separator` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get separator => - _id_separator.getNullable(_class, jni$_.JString.type) as jni$_.JString?; - - static final _id_separatorChar = _class.staticFieldId(r'separatorChar', r'C'); - - /// from: `static public final char separatorChar` - static core$_.int get separatorChar => - _id_separatorChar.getNullable(_class, jni$_.jchar.type) as core$_.int; - - static final _id_new$ = _class.constructorId( - r'(Ljava/io/File;Ljava/lang/String;)V', - ); - - static final _new$ = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_NewObject') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void (java.io.File file, java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - factory File(File? file, jni$_.JString? string) { - final _$file = file?.reference ?? jni$_.jNullReference; - final _$string = string?.reference ?? jni$_.jNullReference; - return _new$( - _class.reference.pointer, - _id_new$.pointer, - _$file.pointer, - _$string.pointer, - ).object(); - } - - static final _id_new$1 = _class.constructorId(r'(Ljava/lang/String;)V'); - - static final _new$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_NewObject') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public void (java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - factory File.new$1(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _new$1( - _class.reference.pointer, - _id_new$1.pointer, - _$string.pointer, - ).object(); - } - - static final _id_new$2 = _class.constructorId( - r'(Ljava/lang/String;Ljava/lang/String;)V', - ); - - static final _new$2 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_NewObject') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `public void (java.lang.String string, java.lang.String string1)` - /// The returned object must be released after use, by calling the [release] method. - factory File.new$2(jni$_.JString? string, jni$_.JString? string1) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - return _new$2( - _class.reference.pointer, - _id_new$2.pointer, - _$string.pointer, - _$string1.pointer, - ).object(); - } - - static final _id_new$3 = _class.constructorId(r'(Ljava/net/URI;)V'); - - static final _new$3 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_NewObject') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public void (java.net.URI uRI)` - /// The returned object must be released after use, by calling the [release] method. - factory File.new$3(jni$_.JObject? uRI) { - final _$uRI = uRI?.reference ?? jni$_.jNullReference; - return _new$3( - _class.reference.pointer, - _id_new$3.pointer, - _$uRI.pointer, - ).object(); - } - - static final _id_createTempFile = _class.staticMethodId( - r'createTempFile', - r'(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File;', - ); - - static final _createTempFile = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - (jni$_.Pointer, jni$_.Pointer) - >, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `static public java.io.File createTempFile(java.lang.String string, java.lang.String string1)` - /// The returned object must be released after use, by calling the [release] method. - static File? createTempFile(jni$_.JString? string, jni$_.JString? string1) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - return _createTempFile( - _class.reference.pointer, - _id_createTempFile.pointer, - _$string.pointer, - _$string1.pointer, - ).object(); - } - - static final _id_createTempFile$1 = _class.staticMethodId( - r'createTempFile', - r'(Ljava/lang/String;Ljava/lang/String;Ljava/io/File;)Ljava/io/File;', - ); - - static final _createTempFile$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs< - ( - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - jni$_.Pointer, - jni$_.Pointer, - ) - >(); - - /// from: `static public java.io.File createTempFile(java.lang.String string, java.lang.String string1, java.io.File file)` - /// The returned object must be released after use, by calling the [release] method. - static File? createTempFile$1( - jni$_.JString? string, - jni$_.JString? string1, - File? file, - ) { - final _$string = string?.reference ?? jni$_.jNullReference; - final _$string1 = string1?.reference ?? jni$_.jNullReference; - final _$file = file?.reference ?? jni$_.jNullReference; - return _createTempFile$1( - _class.reference.pointer, - _id_createTempFile$1.pointer, - _$string.pointer, - _$string1.pointer, - _$file.pointer, - ).object(); - } - - static final _id_listRoots = _class.staticMethodId( - r'listRoots', - r'()[Ljava/io/File;', - ); - - static final _listRoots = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public java.io.File[] listRoots()` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JArray? listRoots() { - return _listRoots( - _class.reference.pointer, - _id_listRoots.pointer, - ).object?>(); - } -} - -extension File$$Methods on File { - static final _id_canExecute = File._class.instanceMethodId( - r'canExecute', - r'()Z', - ); - - static final _canExecute = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean canExecute()` - core$_.bool canExecute() { - return _canExecute(reference.pointer, _id_canExecute.pointer).boolean; - } - - static final _id_canRead = File._class.instanceMethodId(r'canRead', r'()Z'); - - static final _canRead = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean canRead()` - core$_.bool canRead() { - return _canRead(reference.pointer, _id_canRead.pointer).boolean; - } - - static final _id_canWrite = File._class.instanceMethodId(r'canWrite', r'()Z'); - - static final _canWrite = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean canWrite()` - core$_.bool canWrite() { - return _canWrite(reference.pointer, _id_canWrite.pointer).boolean; - } - - static final _id_compareTo = File._class.instanceMethodId( - r'compareTo', - r'(Ljava/io/File;)I', - ); - - static final _compareTo = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public int compareTo(java.io.File file)` - core$_.int compareTo(File? file) { - final _$file = file?.reference ?? jni$_.jNullReference; - return _compareTo( - reference.pointer, - _id_compareTo.pointer, - _$file.pointer, - ).integer; - } - - static final _id_createNewFile = File._class.instanceMethodId( - r'createNewFile', - r'()Z', - ); - - static final _createNewFile = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean createNewFile()` - core$_.bool createNewFile() { - return _createNewFile(reference.pointer, _id_createNewFile.pointer).boolean; - } - - static final _id_delete = File._class.instanceMethodId(r'delete', r'()Z'); - - static final _delete = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean delete()` - core$_.bool delete() { - return _delete(reference.pointer, _id_delete.pointer).boolean; - } - - static final _id_deleteOnExit = File._class.instanceMethodId( - r'deleteOnExit', - r'()V', - ); - - static final _deleteOnExit = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallVoidMethod') - .asFunction< - jni$_.JThrowablePtr Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public void deleteOnExit()` - void deleteOnExit() { - _deleteOnExit(reference.pointer, _id_deleteOnExit.pointer).check(); - } - - static final _id_equals = File._class.instanceMethodId( - r'equals', - r'(Ljava/lang/Object;)Z', - ); - - static final _equals = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean equals(java.lang.Object object)` - core$_.bool equals(jni$_.JObject? object) { - final _$object = object?.reference ?? jni$_.jNullReference; - return _equals( - reference.pointer, - _id_equals.pointer, - _$object.pointer, - ).boolean; - } - - static final _id_exists = File._class.instanceMethodId(r'exists', r'()Z'); - - static final _exists = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean exists()` - core$_.bool exists() { - return _exists(reference.pointer, _id_exists.pointer).boolean; - } - - static final _id_get$absoluteFile = File._class.instanceMethodId( - r'getAbsoluteFile', - r'()Ljava/io/File;', - ); - - static final _get$absoluteFile = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.io.File getAbsoluteFile()` - /// The returned object must be released after use, by calling the [release] method. - File? get absoluteFile { - return _get$absoluteFile( - reference.pointer, - _id_get$absoluteFile.pointer, - ).object(); - } - - static final _id_get$absolutePath = File._class.instanceMethodId( - r'getAbsolutePath', - r'()Ljava/lang/String;', - ); - - static final _get$absolutePath = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String getAbsolutePath()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? get absolutePath { - return _get$absolutePath( - reference.pointer, - _id_get$absolutePath.pointer, - ).object(); - } - - static final _id_get$canonicalFile = File._class.instanceMethodId( - r'getCanonicalFile', - r'()Ljava/io/File;', - ); - - static final _get$canonicalFile = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.io.File getCanonicalFile()` - /// The returned object must be released after use, by calling the [release] method. - File? get canonicalFile { - return _get$canonicalFile( - reference.pointer, - _id_get$canonicalFile.pointer, - ).object(); - } - - static final _id_get$canonicalPath = File._class.instanceMethodId( - r'getCanonicalPath', - r'()Ljava/lang/String;', - ); - - static final _get$canonicalPath = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String getCanonicalPath()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? get canonicalPath { - return _get$canonicalPath( - reference.pointer, - _id_get$canonicalPath.pointer, - ).object(); - } - - static final _id_get$freeSpace = File._class.instanceMethodId( - r'getFreeSpace', - r'()J', - ); - - static final _get$freeSpace = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public long getFreeSpace()` - core$_.int get freeSpace { - return _get$freeSpace(reference.pointer, _id_get$freeSpace.pointer).long; - } - - static final _id_get$name = File._class.instanceMethodId( - r'getName', - r'()Ljava/lang/String;', - ); - - static final _get$name = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String getName()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? get name { - return _get$name( - reference.pointer, - _id_get$name.pointer, - ).object(); - } - - static final _id_get$parent = File._class.instanceMethodId( - r'getParent', - r'()Ljava/lang/String;', - ); - - static final _get$parent = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String getParent()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? get parent { - return _get$parent( - reference.pointer, - _id_get$parent.pointer, - ).object(); - } - - static final _id_get$parentFile = File._class.instanceMethodId( - r'getParentFile', - r'()Ljava/io/File;', - ); - - static final _get$parentFile = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.io.File getParentFile()` - /// The returned object must be released after use, by calling the [release] method. - File? get parentFile { - return _get$parentFile( - reference.pointer, - _id_get$parentFile.pointer, - ).object(); - } - - static final _id_get$path = File._class.instanceMethodId( - r'getPath', - r'()Ljava/lang/String;', - ); - - static final _get$path = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String getPath()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? get path { - return _get$path( - reference.pointer, - _id_get$path.pointer, - ).object(); - } - - static final _id_get$totalSpace = File._class.instanceMethodId( - r'getTotalSpace', - r'()J', - ); - - static final _get$totalSpace = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public long getTotalSpace()` - core$_.int get totalSpace { - return _get$totalSpace(reference.pointer, _id_get$totalSpace.pointer).long; - } - - static final _id_get$usableSpace = File._class.instanceMethodId( - r'getUsableSpace', - r'()J', - ); - - static final _get$usableSpace = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public long getUsableSpace()` - core$_.int get usableSpace { - return _get$usableSpace( - reference.pointer, - _id_get$usableSpace.pointer, - ).long; - } - - static final _id_hashCode$1 = File._class.instanceMethodId( - r'hashCode', - r'()I', - ); - - static final _hashCode$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallIntMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public int hashCode()` - core$_.int hashCode$1() { - return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; - } - - static final _id_get$isAbsolute = File._class.instanceMethodId( - r'isAbsolute', - r'()Z', - ); - - static final _get$isAbsolute = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isAbsolute()` - core$_.bool get isAbsolute { - return _get$isAbsolute( - reference.pointer, - _id_get$isAbsolute.pointer, - ).boolean; - } - - static final _id_get$isDirectory = File._class.instanceMethodId( - r'isDirectory', - r'()Z', - ); - - static final _get$isDirectory = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isDirectory()` - core$_.bool get isDirectory { - return _get$isDirectory( - reference.pointer, - _id_get$isDirectory.pointer, - ).boolean; - } - - static final _id_get$isFile = File._class.instanceMethodId(r'isFile', r'()Z'); - - static final _get$isFile = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isFile()` - core$_.bool get isFile { - return _get$isFile(reference.pointer, _id_get$isFile.pointer).boolean; - } - - static final _id_get$isHidden = File._class.instanceMethodId( - r'isHidden', - r'()Z', - ); - - static final _get$isHidden = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean isHidden()` - core$_.bool get isHidden { - return _get$isHidden(reference.pointer, _id_get$isHidden.pointer).boolean; - } - - static final _id_lastModified = File._class.instanceMethodId( - r'lastModified', - r'()J', - ); - - static final _lastModified = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public long lastModified()` - core$_.int lastModified() { - return _lastModified(reference.pointer, _id_lastModified.pointer).long; - } - - static final _id_length = File._class.instanceMethodId(r'length', r'()J'); - - static final _length = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallLongMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public long length()` - core$_.int length() { - return _length(reference.pointer, _id_length.pointer).long; - } - - static final _id_list = File._class.instanceMethodId( - r'list', - r'()[Ljava/lang/String;', - ); - - static final _list = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String[] list()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? list() { - return _list( - reference.pointer, - _id_list.pointer, - ).object?>(); - } - - static final _id_list$1 = File._class.instanceMethodId( - r'list', - r'(Ljava/io/FilenameFilter;)[Ljava/lang/String;', - ); - - static final _list$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public java.lang.String[] list(java.io.FilenameFilter filenameFilter)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? list$1(jni$_.JObject? filenameFilter) { - final _$filenameFilter = filenameFilter?.reference ?? jni$_.jNullReference; - return _list$1( - reference.pointer, - _id_list$1.pointer, - _$filenameFilter.pointer, - ).object?>(); - } - - static final _id_listFiles = File._class.instanceMethodId( - r'listFiles', - r'()[Ljava/io/File;', - ); - - static final _listFiles = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.io.File[] listFiles()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? listFiles() { - return _listFiles( - reference.pointer, - _id_listFiles.pointer, - ).object?>(); - } - - static final _id_listFiles$1 = File._class.instanceMethodId( - r'listFiles', - r'(Ljava/io/FileFilter;)[Ljava/io/File;', - ); - - static final _listFiles$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public java.io.File[] listFiles(java.io.FileFilter fileFilter)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? listFiles$1(jni$_.JObject? fileFilter) { - final _$fileFilter = fileFilter?.reference ?? jni$_.jNullReference; - return _listFiles$1( - reference.pointer, - _id_listFiles$1.pointer, - _$fileFilter.pointer, - ).object?>(); - } - - static final _id_listFiles$2 = File._class.instanceMethodId( - r'listFiles', - r'(Ljava/io/FilenameFilter;)[Ljava/io/File;', - ); - - static final _listFiles$2 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public java.io.File[] listFiles(java.io.FilenameFilter filenameFilter)` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JArray? listFiles$2(jni$_.JObject? filenameFilter) { - final _$filenameFilter = filenameFilter?.reference ?? jni$_.jNullReference; - return _listFiles$2( - reference.pointer, - _id_listFiles$2.pointer, - _$filenameFilter.pointer, - ).object?>(); - } - - static final _id_mkdir = File._class.instanceMethodId(r'mkdir', r'()Z'); - - static final _mkdir = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean mkdir()` - core$_.bool mkdir() { - return _mkdir(reference.pointer, _id_mkdir.pointer).boolean; - } - - static final _id_mkdirs = File._class.instanceMethodId(r'mkdirs', r'()Z'); - - static final _mkdirs = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean mkdirs()` - core$_.bool mkdirs() { - return _mkdirs(reference.pointer, _id_mkdirs.pointer).boolean; - } - - static final _id_renameTo = File._class.instanceMethodId( - r'renameTo', - r'(Ljava/io/File;)Z', - ); - - static final _renameTo = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `public boolean renameTo(java.io.File file)` - core$_.bool renameTo(File? file) { - final _$file = file?.reference ?? jni$_.jNullReference; - return _renameTo( - reference.pointer, - _id_renameTo.pointer, - _$file.pointer, - ).boolean; - } - - static final _id_setExecutable = File._class.instanceMethodId( - r'setExecutable', - r'(Z)Z', - ); - - static final _setExecutable = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public boolean setExecutable(boolean z)` - core$_.bool setExecutable(core$_.bool z) { - return _setExecutable( - reference.pointer, - _id_setExecutable.pointer, - z ? 1 : 0, - ).boolean; - } - - static final _id_setExecutable$1 = File._class.instanceMethodId( - r'setExecutable', - r'(ZZ)Z', - ); - - static final _setExecutable$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32, jni$_.Int32)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public boolean setExecutable(boolean z, boolean z1)` - core$_.bool setExecutable$1(core$_.bool z, core$_.bool z1) { - return _setExecutable$1( - reference.pointer, - _id_setExecutable$1.pointer, - z ? 1 : 0, - z1 ? 1 : 0, - ).boolean; - } - - static final _id_setLastModified = File._class.instanceMethodId( - r'setLastModified', - r'(J)Z', - ); - - static final _setLastModified = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int64,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public boolean setLastModified(long j)` - core$_.bool setLastModified(core$_.int j) { - return _setLastModified( - reference.pointer, - _id_setLastModified.pointer, - j, - ).boolean; - } - - static final _id_setReadOnly = File._class.instanceMethodId( - r'setReadOnly', - r'()Z', - ); - - static final _setReadOnly = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public boolean setReadOnly()` - core$_.bool setReadOnly() { - return _setReadOnly(reference.pointer, _id_setReadOnly.pointer).boolean; - } - - static final _id_setReadable = File._class.instanceMethodId( - r'setReadable', - r'(Z)Z', - ); - - static final _setReadable = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public boolean setReadable(boolean z)` - core$_.bool setReadable(core$_.bool z) { - return _setReadable( - reference.pointer, - _id_setReadable.pointer, - z ? 1 : 0, - ).boolean; - } - - static final _id_setReadable$1 = File._class.instanceMethodId( - r'setReadable', - r'(ZZ)Z', - ); - - static final _setReadable$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32, jni$_.Int32)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public boolean setReadable(boolean z, boolean z1)` - core$_.bool setReadable$1(core$_.bool z, core$_.bool z1) { - return _setReadable$1( - reference.pointer, - _id_setReadable$1.pointer, - z ? 1 : 0, - z1 ? 1 : 0, - ).boolean; - } - - static final _id_setWritable = File._class.instanceMethodId( - r'setWritable', - r'(Z)Z', - ); - - static final _setWritable = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32,)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - ) - >(); - - /// from: `public boolean setWritable(boolean z)` - core$_.bool setWritable(core$_.bool z) { - return _setWritable( - reference.pointer, - _id_setWritable.pointer, - z ? 1 : 0, - ).boolean; - } - - static final _id_setWritable$1 = File._class.instanceMethodId( - r'setWritable', - r'(ZZ)Z', - ); - - static final _setWritable$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Int32, jni$_.Int32)>, - ) - > - >('globalEnv_CallBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - core$_.int, - core$_.int, - ) - >(); - - /// from: `public boolean setWritable(boolean z, boolean z1)` - core$_.bool setWritable$1(core$_.bool z, core$_.bool z1) { - return _setWritable$1( - reference.pointer, - _id_setWritable$1.pointer, - z ? 1 : 0, - z1 ? 1 : 0, - ).boolean; - } - - static final _id_toPath = File._class.instanceMethodId( - r'toPath', - r'()Ljava/nio/file/Path;', - ); - - static final _toPath = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.nio.file.Path toPath()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? toPath() { - return _toPath( - reference.pointer, - _id_toPath.pointer, - ).object(); - } - - static final _id_toString$1 = File._class.instanceMethodId( - r'toString', - r'()Ljava/lang/String;', - ); - - static final _toString$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.lang.String toString()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JString? toString$1() { - return _toString$1( - reference.pointer, - _id_toString$1.pointer, - ).object(); - } - - static final _id_toURI = File._class.instanceMethodId( - r'toURI', - r'()Ljava/net/URI;', - ); - - static final _toURI = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.net.URI toURI()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? toURI() { - return _toURI( - reference.pointer, - _id_toURI.pointer, - ).object(); - } - - static final _id_toURL = File._class.instanceMethodId( - r'toURL', - r'()Ljava/net/URL;', - ); - - static final _toURL = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public java.net.URL toURL()` - /// The returned object must be released after use, by calling the [release] method. - jni$_.JObject? toURL() { - return _toURL( - reference.pointer, - _id_toURL.pointer, - ).object(); - } - - core$_.bool operator <(File? file) { - return compareTo(file) < 0; - } - - core$_.bool operator <=(File? file) { - return compareTo(file) <= 0; - } - - core$_.bool operator >(File? file) { - return compareTo(file) > 0; - } - - core$_.bool operator >=(File? file) { - return compareTo(file) >= 0; - } -} - -final class $File$Type$ extends jni$_.JType { - @jni$_.internal - const $File$Type$(); - - @jni$_.internal - @core$_.override - String get signature => r'Ljava/io/File;'; -} - -/// from: `android.os.Environment` -extension type Environment._(jni$_.JObject _$this) implements jni$_.JObject { - static final _class = jni$_.JClass.forName(r'android/os/Environment'); - - /// The type which includes information such as the signature of this class. - static const jni$_.JType type = $Environment$Type$(); - static final _id_DIRECTORY_ALARMS = _class.staticFieldId( - r'DIRECTORY_ALARMS', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_ALARMS` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_ALARMS => - _id_DIRECTORY_ALARMS.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_ALARMS` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_ALARMS(jni$_.JString? value) => - _id_DIRECTORY_ALARMS.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_AUDIOBOOKS = _class.staticFieldId( - r'DIRECTORY_AUDIOBOOKS', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_AUDIOBOOKS` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_AUDIOBOOKS => - _id_DIRECTORY_AUDIOBOOKS.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_AUDIOBOOKS` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_AUDIOBOOKS(jni$_.JString? value) => - _id_DIRECTORY_AUDIOBOOKS.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_DCIM = _class.staticFieldId( - r'DIRECTORY_DCIM', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_DCIM` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_DCIM => - _id_DIRECTORY_DCIM.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_DCIM` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_DCIM(jni$_.JString? value) => - _id_DIRECTORY_DCIM.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_DOCUMENTS = _class.staticFieldId( - r'DIRECTORY_DOCUMENTS', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_DOCUMENTS` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_DOCUMENTS => - _id_DIRECTORY_DOCUMENTS.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_DOCUMENTS` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_DOCUMENTS(jni$_.JString? value) => - _id_DIRECTORY_DOCUMENTS.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_DOWNLOADS = _class.staticFieldId( - r'DIRECTORY_DOWNLOADS', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_DOWNLOADS` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_DOWNLOADS => - _id_DIRECTORY_DOWNLOADS.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_DOWNLOADS` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_DOWNLOADS(jni$_.JString? value) => - _id_DIRECTORY_DOWNLOADS.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_MOVIES = _class.staticFieldId( - r'DIRECTORY_MOVIES', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_MOVIES` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_MOVIES => - _id_DIRECTORY_MOVIES.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_MOVIES` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_MOVIES(jni$_.JString? value) => - _id_DIRECTORY_MOVIES.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_MUSIC = _class.staticFieldId( - r'DIRECTORY_MUSIC', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_MUSIC` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_MUSIC => - _id_DIRECTORY_MUSIC.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_MUSIC` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_MUSIC(jni$_.JString? value) => - _id_DIRECTORY_MUSIC.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_NOTIFICATIONS = _class.staticFieldId( - r'DIRECTORY_NOTIFICATIONS', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_NOTIFICATIONS` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_NOTIFICATIONS => - _id_DIRECTORY_NOTIFICATIONS.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_NOTIFICATIONS` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_NOTIFICATIONS(jni$_.JString? value) => - _id_DIRECTORY_NOTIFICATIONS.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_PICTURES = _class.staticFieldId( - r'DIRECTORY_PICTURES', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_PICTURES` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_PICTURES => - _id_DIRECTORY_PICTURES.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_PICTURES` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_PICTURES(jni$_.JString? value) => - _id_DIRECTORY_PICTURES.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_PODCASTS = _class.staticFieldId( - r'DIRECTORY_PODCASTS', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_PODCASTS` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_PODCASTS => - _id_DIRECTORY_PODCASTS.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_PODCASTS` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_PODCASTS(jni$_.JString? value) => - _id_DIRECTORY_PODCASTS.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_RECORDINGS = _class.staticFieldId( - r'DIRECTORY_RECORDINGS', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_RECORDINGS` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_RECORDINGS => - _id_DIRECTORY_RECORDINGS.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_RECORDINGS` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_RECORDINGS(jni$_.JString? value) => - _id_DIRECTORY_RECORDINGS.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_RINGTONES = _class.staticFieldId( - r'DIRECTORY_RINGTONES', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_RINGTONES` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_RINGTONES => - _id_DIRECTORY_RINGTONES.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_RINGTONES` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_RINGTONES(jni$_.JString? value) => - _id_DIRECTORY_RINGTONES.set(_class, jni$_.JString.type, value); - - static final _id_DIRECTORY_SCREENSHOTS = _class.staticFieldId( - r'DIRECTORY_SCREENSHOTS', - r'Ljava/lang/String;', - ); - - /// from: `static public java.lang.String DIRECTORY_SCREENSHOTS` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get DIRECTORY_SCREENSHOTS => - _id_DIRECTORY_SCREENSHOTS.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - /// from: `static public java.lang.String DIRECTORY_SCREENSHOTS` - /// The returned object must be released after use, by calling the [release] method. - static set DIRECTORY_SCREENSHOTS(jni$_.JString? value) => - _id_DIRECTORY_SCREENSHOTS.set(_class, jni$_.JString.type, value); - - static final _id_MEDIA_BAD_REMOVAL = _class.staticFieldId( - r'MEDIA_BAD_REMOVAL', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_BAD_REMOVAL` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_BAD_REMOVAL => - _id_MEDIA_BAD_REMOVAL.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_CHECKING = _class.staticFieldId( - r'MEDIA_CHECKING', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_CHECKING` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_CHECKING => - _id_MEDIA_CHECKING.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_EJECTING = _class.staticFieldId( - r'MEDIA_EJECTING', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_EJECTING` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_EJECTING => - _id_MEDIA_EJECTING.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_MOUNTED = _class.staticFieldId( - r'MEDIA_MOUNTED', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_MOUNTED` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_MOUNTED => - _id_MEDIA_MOUNTED.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_MOUNTED_READ_ONLY = _class.staticFieldId( - r'MEDIA_MOUNTED_READ_ONLY', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_MOUNTED_READ_ONLY` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_MOUNTED_READ_ONLY => - _id_MEDIA_MOUNTED_READ_ONLY.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_NOFS = _class.staticFieldId( - r'MEDIA_NOFS', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_NOFS` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_NOFS => - _id_MEDIA_NOFS.getNullable(_class, jni$_.JString.type) as jni$_.JString?; - - static final _id_MEDIA_REMOVED = _class.staticFieldId( - r'MEDIA_REMOVED', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_REMOVED` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_REMOVED => - _id_MEDIA_REMOVED.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_SHARED = _class.staticFieldId( - r'MEDIA_SHARED', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_SHARED` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_SHARED => - _id_MEDIA_SHARED.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_UNKNOWN = _class.staticFieldId( - r'MEDIA_UNKNOWN', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_UNKNOWN` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_UNKNOWN => - _id_MEDIA_UNKNOWN.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_UNMOUNTABLE = _class.staticFieldId( - r'MEDIA_UNMOUNTABLE', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_UNMOUNTABLE` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_UNMOUNTABLE => - _id_MEDIA_UNMOUNTABLE.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_MEDIA_UNMOUNTED = _class.staticFieldId( - r'MEDIA_UNMOUNTED', - r'Ljava/lang/String;', - ); - - /// from: `static public final java.lang.String MEDIA_UNMOUNTED` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get MEDIA_UNMOUNTED => - _id_MEDIA_UNMOUNTED.getNullable(_class, jni$_.JString.type) - as jni$_.JString?; - - static final _id_new$ = _class.constructorId(r'()V'); - - static final _new$ = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_NewObject') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `public void ()` - /// The returned object must be released after use, by calling the [release] method. - factory Environment() { - return _new$( - _class.reference.pointer, - _id_new$.pointer, - ).object(); - } - - static final _id_get$dataDirectory = _class.staticMethodId( - r'getDataDirectory', - r'()Ljava/io/File;', - ); - - static final _get$dataDirectory = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public java.io.File getDataDirectory()` - /// The returned object must be released after use, by calling the [release] method. - static File? get dataDirectory { - return _get$dataDirectory( - _class.reference.pointer, - _id_get$dataDirectory.pointer, - ).object(); - } - - static final _id_get$downloadCacheDirectory = _class.staticMethodId( - r'getDownloadCacheDirectory', - r'()Ljava/io/File;', - ); - - static final _get$downloadCacheDirectory = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public java.io.File getDownloadCacheDirectory()` - /// The returned object must be released after use, by calling the [release] method. - static File? get downloadCacheDirectory { - return _get$downloadCacheDirectory( - _class.reference.pointer, - _id_get$downloadCacheDirectory.pointer, - ).object(); - } - - static final _id_get$externalStorageDirectory = _class.staticMethodId( - r'getExternalStorageDirectory', - r'()Ljava/io/File;', - ); - - static final _get$externalStorageDirectory = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public java.io.File getExternalStorageDirectory()` - /// The returned object must be released after use, by calling the [release] method. - static File? get externalStorageDirectory { - return _get$externalStorageDirectory( - _class.reference.pointer, - _id_get$externalStorageDirectory.pointer, - ).object(); - } - - static final _id_getExternalStoragePublicDirectory = _class.staticMethodId( - r'getExternalStoragePublicDirectory', - r'(Ljava/lang/String;)Ljava/io/File;', - ); - - static final _getExternalStoragePublicDirectory = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public java.io.File getExternalStoragePublicDirectory(java.lang.String string)` - /// The returned object must be released after use, by calling the [release] method. - static File? getExternalStoragePublicDirectory(jni$_.JString? string) { - final _$string = string?.reference ?? jni$_.jNullReference; - return _getExternalStoragePublicDirectory( - _class.reference.pointer, - _id_getExternalStoragePublicDirectory.pointer, - _$string.pointer, - ).object(); - } - - static final _id_get$externalStorageState = _class.staticMethodId( - r'getExternalStorageState', - r'()Ljava/lang/String;', - ); - - static final _get$externalStorageState = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public java.lang.String getExternalStorageState()` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? get externalStorageState { - return _get$externalStorageState( - _class.reference.pointer, - _id_get$externalStorageState.pointer, - ).object(); - } - - static final _id_getExternalStorageState = _class.staticMethodId( - r'getExternalStorageState', - r'(Ljava/io/File;)Ljava/lang/String;', - ); - - static final _getExternalStorageState = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public java.lang.String getExternalStorageState(java.io.File file)` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? getExternalStorageState(File? file) { - final _$file = file?.reference ?? jni$_.jNullReference; - return _getExternalStorageState( - _class.reference.pointer, - _id_getExternalStorageState.pointer, - _$file.pointer, - ).object(); - } - - static final _id_get$rootDirectory = _class.staticMethodId( - r'getRootDirectory', - r'()Ljava/io/File;', - ); - - static final _get$rootDirectory = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public java.io.File getRootDirectory()` - /// The returned object must be released after use, by calling the [release] method. - static File? get rootDirectory { - return _get$rootDirectory( - _class.reference.pointer, - _id_get$rootDirectory.pointer, - ).object(); - } - - static final _id_get$storageDirectory = _class.staticMethodId( - r'getStorageDirectory', - r'()Ljava/io/File;', - ); - - static final _get$storageDirectory = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public java.io.File getStorageDirectory()` - /// The returned object must be released after use, by calling the [release] method. - static File? get storageDirectory { - return _get$storageDirectory( - _class.reference.pointer, - _id_get$storageDirectory.pointer, - ).object(); - } - - static final _id_getStorageState = _class.staticMethodId( - r'getStorageState', - r'(Ljava/io/File;)Ljava/lang/String;', - ); - - static final _getStorageState = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticObjectMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public java.lang.String getStorageState(java.io.File file)` - /// The returned object must be released after use, by calling the [release] method. - static jni$_.JString? getStorageState(File? file) { - final _$file = file?.reference ?? jni$_.jNullReference; - return _getStorageState( - _class.reference.pointer, - _id_getStorageState.pointer, - _$file.pointer, - ).object(); - } - - static final _id_get$isExternalStorageEmulated = _class.staticMethodId( - r'isExternalStorageEmulated', - r'()Z', - ); - - static final _get$isExternalStorageEmulated = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public boolean isExternalStorageEmulated()` - static core$_.bool get isExternalStorageEmulated { - return _get$isExternalStorageEmulated( - _class.reference.pointer, - _id_get$isExternalStorageEmulated.pointer, - ).boolean; - } - - static final _id_isExternalStorageEmulated$1 = _class.staticMethodId( - r'isExternalStorageEmulated', - r'(Ljava/io/File;)Z', - ); - - static final _isExternalStorageEmulated$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public boolean isExternalStorageEmulated(java.io.File file)` - static core$_.bool isExternalStorageEmulated$1(File? file) { - final _$file = file?.reference ?? jni$_.jNullReference; - return _isExternalStorageEmulated$1( - _class.reference.pointer, - _id_isExternalStorageEmulated$1.pointer, - _$file.pointer, - ).boolean; - } - - static final _id_get$isExternalStorageLegacy = _class.staticMethodId( - r'isExternalStorageLegacy', - r'()Z', - ); - - static final _get$isExternalStorageLegacy = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public boolean isExternalStorageLegacy()` - static core$_.bool get isExternalStorageLegacy { - return _get$isExternalStorageLegacy( - _class.reference.pointer, - _id_get$isExternalStorageLegacy.pointer, - ).boolean; - } - - static final _id_isExternalStorageLegacy$1 = _class.staticMethodId( - r'isExternalStorageLegacy', - r'(Ljava/io/File;)Z', - ); - - static final _isExternalStorageLegacy$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public boolean isExternalStorageLegacy(java.io.File file)` - static core$_.bool isExternalStorageLegacy$1(File? file) { - final _$file = file?.reference ?? jni$_.jNullReference; - return _isExternalStorageLegacy$1( - _class.reference.pointer, - _id_isExternalStorageLegacy$1.pointer, - _$file.pointer, - ).boolean; - } - - static final _id_get$isExternalStorageManager = _class.staticMethodId( - r'isExternalStorageManager', - r'()Z', - ); - - static final _get$isExternalStorageManager = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public boolean isExternalStorageManager()` - static core$_.bool get isExternalStorageManager { - return _get$isExternalStorageManager( - _class.reference.pointer, - _id_get$isExternalStorageManager.pointer, - ).boolean; - } - - static final _id_isExternalStorageManager$1 = _class.staticMethodId( - r'isExternalStorageManager', - r'(Ljava/io/File;)Z', - ); - - static final _isExternalStorageManager$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public boolean isExternalStorageManager(java.io.File file)` - static core$_.bool isExternalStorageManager$1(File? file) { - final _$file = file?.reference ?? jni$_.jNullReference; - return _isExternalStorageManager$1( - _class.reference.pointer, - _id_isExternalStorageManager$1.pointer, - _$file.pointer, - ).boolean; - } - - static final _id_get$isExternalStorageRemovable = _class.staticMethodId( - r'isExternalStorageRemovable', - r'()Z', - ); - - static final _get$isExternalStorageRemovable = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - > - >('globalEnv_CallStaticBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - ) - >(); - - /// from: `static public boolean isExternalStorageRemovable()` - static core$_.bool get isExternalStorageRemovable { - return _get$isExternalStorageRemovable( - _class.reference.pointer, - _id_get$isExternalStorageRemovable.pointer, - ).boolean; - } - - static final _id_isExternalStorageRemovable$1 = _class.staticMethodId( - r'isExternalStorageRemovable', - r'(Ljava/io/File;)Z', - ); - - static final _isExternalStorageRemovable$1 = - jni$_.ProtectedJniExtensions.lookup< - jni$_.NativeFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.VarArgs<(jni$_.Pointer,)>, - ) - > - >('globalEnv_CallStaticBooleanMethod') - .asFunction< - jni$_.JniResult Function( - jni$_.Pointer, - jni$_.JMethodIDPtr, - jni$_.Pointer, - ) - >(); - - /// from: `static public boolean isExternalStorageRemovable(java.io.File file)` - static core$_.bool isExternalStorageRemovable$1(File? file) { - final _$file = file?.reference ?? jni$_.jNullReference; - return _isExternalStorageRemovable$1( - _class.reference.pointer, - _id_isExternalStorageRemovable$1.pointer, - _$file.pointer, - ).boolean; - } -} - -final class $Environment$Type$ extends jni$_.JType { - @jni$_.internal - const $Environment$Type$(); - - @jni$_.internal - @core$_.override - String get signature => r'Landroid/os/Environment;'; -} diff --git a/packages/path_provider/path_provider_android/lib/src/path_provider_android_real.dart b/packages/path_provider/path_provider_android/lib/src/path_provider_android_real.dart deleted file mode 100644 index 4055f9b33af3..000000000000 --- a/packages/path_provider/path_provider_android/lib/src/path_provider_android_real.dart +++ /dev/null @@ -1,145 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:jni/jni.dart'; -import 'package:jni_flutter/jni_flutter.dart'; -import 'package:path_provider_platform_interface/path_provider_platform_interface.dart'; - -import 'path_provider.g.dart'; - -/// The Android implementation of [PathProviderPlatform]. -class PathProviderAndroid extends PathProviderPlatform { - late final Context _applicationContext = androidApplicationContext.as( - Context.type, - ); - - /// Registers this class as the default instance of [PathProviderPlatform]. - static void registerWith() { - PathProviderPlatform.instance = PathProviderAndroid(); - } - - @override - Future getTemporaryPath() { - return getApplicationCachePath(); - } - - @override - Future getApplicationSupportPath() async { - return PathUtils.getFilesDir( - _applicationContext, - ).toDartString(releaseOriginal: true); - } - - @override - Future getApplicationDocumentsPath() async { - return PathUtils.getDataDirectory( - _applicationContext, - ).toDartString(releaseOriginal: true); - } - - @override - Future getApplicationCachePath() async { - final File? file = _applicationContext.cacheDir; - final String? path = file?.path?.toDartString(releaseOriginal: true); - file?.release(); - return path; - } - - @override - Future getExternalStoragePath() async { - final File? dir = _applicationContext.getExternalFilesDir(null); - if (dir != null) { - final String? path = dir.absolutePath?.toDartString( - releaseOriginal: true, - ); - dir.release(); - return path; - } - - return null; - } - - @override - Future?> getExternalCachePaths() async { - final JArray? files = _applicationContext.externalCacheDirs; - if (files != null) { - final List paths = _toStringList(files); - files.release(); - return paths; - } - - return null; - } - - @override - Future?> getExternalStoragePaths({ - StorageDirectory? type, - }) async { - final JString? directory = type != null - ? _toNativeStorageDirectory(type) - : null; - final JArray? files = _applicationContext.getExternalFilesDirs( - directory, - ); - directory?.release(); - if (files != null) { - final List paths = _toStringList(files); - files.release(); - return paths; - } - - return null; - } - - @override - Future getDownloadsPath() async { - final List? paths = await getExternalStoragePaths( - type: StorageDirectory.downloads, - ); - return paths?.firstOrNull; - } -} - -JString _toNativeStorageDirectory(StorageDirectory directory) { - switch (directory) { - case StorageDirectory.music: - return Environment.DIRECTORY_MUSIC!; - case StorageDirectory.podcasts: - return Environment.DIRECTORY_PODCASTS!; - case StorageDirectory.ringtones: - return Environment.DIRECTORY_RINGTONES!; - case StorageDirectory.alarms: - return Environment.DIRECTORY_ALARMS!; - case StorageDirectory.notifications: - return Environment.DIRECTORY_NOTIFICATIONS!; - case StorageDirectory.pictures: - return Environment.DIRECTORY_PICTURES!; - case StorageDirectory.movies: - return Environment.DIRECTORY_MOVIES!; - case StorageDirectory.downloads: - return Environment.DIRECTORY_DOWNLOADS!; - case StorageDirectory.dcim: - return Environment.DIRECTORY_DCIM!; - case StorageDirectory.documents: - return Environment.DIRECTORY_DOCUMENTS!; - } -} - -List _toStringList(JArray files) { - final List dartList = files.asDart(); - final paths = []; - for (final file in dartList) { - if (file != null) { - final String? path = file.absolutePath?.toDartString( - releaseOriginal: true, - ); - if (path != null) { - paths.add(path); - } - file.release(); - } - } - - return paths; -} diff --git a/packages/path_provider/path_provider_android/lib/src/path_provider_android_stub.dart b/packages/path_provider/path_provider_android/lib/src/path_provider_android_stub.dart deleted file mode 100644 index 5e24c93a8ffd..000000000000 --- a/packages/path_provider/path_provider_android/lib/src/path_provider_android_stub.dart +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'package:path_provider_platform_interface/path_provider_platform_interface.dart'; - -// This file is a stub to satisfy the analyzer by matching the public API -// surface of the real implementation. This code should never actually be -// called. - -/// The Android implementation of [PathProviderPlatform]. -class PathProviderAndroid extends PathProviderPlatform { - /// Registers this class as the default instance of [PathProviderPlatform]. - static void registerWith() {} -} diff --git a/packages/path_provider/path_provider_android/pigeons/copyright.txt b/packages/path_provider/path_provider_android/pigeons/copyright.txt new file mode 100644 index 000000000000..07e5f8598a80 --- /dev/null +++ b/packages/path_provider/path_provider_android/pigeons/copyright.txt @@ -0,0 +1,3 @@ +Copyright 2013 The Flutter Authors +Use of this source code is governed by a BSD-style license that can be +found in the LICENSE file. diff --git a/packages/path_provider/path_provider_android/pigeons/messages.dart b/packages/path_provider/path_provider_android/pigeons/messages.dart new file mode 100644 index 000000000000..848018cedd1c --- /dev/null +++ b/packages/path_provider/path_provider_android/pigeons/messages.dart @@ -0,0 +1,49 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +import 'package:pigeon/pigeon.dart'; + +@ConfigurePigeon( + PigeonOptions( + input: 'pigeons/messages.dart', + javaOut: + 'android/src/main/java/io/flutter/plugins/pathprovider/Messages.java', + javaOptions: JavaOptions( + className: 'Messages', + package: 'io.flutter.plugins.pathprovider', + ), + dartOut: 'lib/messages.g.dart', + copyrightHeader: 'pigeons/copyright.txt', + ), +) +enum StorageDirectory { + root, + music, + podcasts, + ringtones, + alarms, + notifications, + pictures, + movies, + downloads, + dcim, + documents, +} + +@HostApi() +abstract class PathProviderApi { + @TaskQueue(type: TaskQueueType.serialBackgroundThread) + String? getTemporaryPath(); + @TaskQueue(type: TaskQueueType.serialBackgroundThread) + String? getApplicationSupportPath(); + @TaskQueue(type: TaskQueueType.serialBackgroundThread) + String? getApplicationDocumentsPath(); + @TaskQueue(type: TaskQueueType.serialBackgroundThread) + String? getApplicationCachePath(); + @TaskQueue(type: TaskQueueType.serialBackgroundThread) + String? getExternalStoragePath(); + @TaskQueue(type: TaskQueueType.serialBackgroundThread) + List getExternalCachePaths(); + @TaskQueue(type: TaskQueueType.serialBackgroundThread) + List getExternalStoragePaths(StorageDirectory directory); +} diff --git a/packages/path_provider/path_provider_android/pubspec.yaml b/packages/path_provider/path_provider_android/pubspec.yaml index 599b42abe9da..227aabd459ef 100644 --- a/packages/path_provider/path_provider_android/pubspec.yaml +++ b/packages/path_provider/path_provider_android/pubspec.yaml @@ -2,7 +2,7 @@ name: path_provider_android description: Android implementation of the path_provider plugin. repository: https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22 -version: 2.3.0 +version: 2.3.1 environment: sdk: ^3.9.0 @@ -13,19 +13,19 @@ flutter: implements: path_provider platforms: android: + package: io.flutter.plugins.pathprovider + pluginClass: PathProviderPlugin dartPluginClass: PathProviderAndroid dependencies: flutter: sdk: flutter - jni: ^1.0.0 - jni_flutter: ^1.0.1 path_provider_platform_interface: ^2.1.0 dev_dependencies: flutter_test: sdk: flutter - jnigen: ^0.16.0 + pigeon: ^26.1.0 test: ^1.16.0 topics: diff --git a/packages/path_provider/path_provider_android/test/path_provider_android_test.dart b/packages/path_provider/path_provider_android/test/path_provider_android_test.dart index 49763a37397f..7b1f2d5d94ec 100644 --- a/packages/path_provider/path_provider_android/test/path_provider_android_test.dart +++ b/packages/path_provider/path_provider_android/test/path_provider_android_test.dart @@ -2,16 +2,127 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'package:flutter/src/services/binary_messenger.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:path_provider_android/messages.g.dart' as messages; import 'package:path_provider_android/path_provider_android.dart'; import 'package:path_provider_platform_interface/path_provider_platform_interface.dart'; -// Most tests are in integration_test rather than here, because anything that -// needs to create Java objects has to run in the real runtime. +const String kTemporaryPath = 'temporaryPath'; +const String kApplicationSupportPath = 'applicationSupportPath'; +const String kApplicationDocumentsPath = 'applicationDocumentsPath'; +const String kApplicationCachePath = 'applicationCachePath'; +const String kExternalCachePaths = 'externalCachePaths'; +const String kExternalStoragePaths = 'externalStoragePaths'; + +class _Api implements messages.PathProviderApi { + bool returnsExternalStoragePaths = true; + + @override + Future getApplicationDocumentsPath() async => + kApplicationDocumentsPath; + + @override + Future getApplicationSupportPath() async => kApplicationSupportPath; + + @override + Future getApplicationCachePath() async => kApplicationCachePath; + + @override + Future> getExternalCachePaths() async => [ + kExternalCachePaths, + ]; + + @override + Future getExternalStoragePath() async => kExternalStoragePaths; + + @override + Future> getExternalStoragePaths( + messages.StorageDirectory directory, + ) async { + return [if (returnsExternalStoragePaths) kExternalStoragePaths]; + } + + @override + Future getTemporaryPath() async => kTemporaryPath; + + @override + // ignore: non_constant_identifier_names + BinaryMessenger? get pigeonVar_binaryMessenger => null; + + @override + // ignore: non_constant_identifier_names + String get pigeonVar_messageChannelSuffix => ''; +} void main() { - test('registers instance', () { - PathProviderAndroid.registerWith(); - expect(PathProviderPlatform.instance, isA()); + late _Api api; + + group('PathProviderAndroid', () { + late PathProviderAndroid pathProvider; + + setUp(() async { + api = _Api(); + pathProvider = PathProviderAndroid(api: api); + }); + + test('getTemporaryPath', () async { + final String? path = await pathProvider.getTemporaryPath(); + expect(path, kTemporaryPath); + }); + + test('getApplicationSupportPath', () async { + final String? path = await pathProvider.getApplicationSupportPath(); + expect(path, kApplicationSupportPath); + }); + + test('getApplicationCachePath', () async { + final String? path = await pathProvider.getApplicationCachePath(); + expect(path, kApplicationCachePath); + }); + + test('getLibraryPath fails', () async { + try { + await pathProvider.getLibraryPath(); + fail('should throw UnsupportedError'); + } catch (e) { + expect(e, isUnsupportedError); + } + }); + + test('getApplicationDocumentsPath', () async { + final String? path = await pathProvider.getApplicationDocumentsPath(); + expect(path, kApplicationDocumentsPath); + }); + + test('getExternalCachePaths succeeds', () async { + final List? result = await pathProvider.getExternalCachePaths(); + expect(result!.length, 1); + expect(result.first, kExternalCachePaths); + }); + + for (final StorageDirectory? type in [ + ...StorageDirectory.values, + ]) { + test('getExternalStoragePaths (type: $type) android succeeds', () async { + final List? result = await pathProvider.getExternalStoragePaths( + type: type, + ); + expect(result!.length, 1); + expect(result.first, kExternalStoragePaths); + }); + } // end of for-loop + + test('getDownloadsPath succeeds', () async { + final String? path = await pathProvider.getDownloadsPath(); + expect(path, kExternalStoragePaths); + }); + + test('getDownloadsPath returns null, when getExternalStoragePaths returns ' + 'an empty list', () async { + api.returnsExternalStoragePaths = false; + final String? path = await pathProvider.getDownloadsPath(); + expect(path, null); + }); }); } diff --git a/packages/path_provider/path_provider_android/tool/jnigen.dart b/packages/path_provider/path_provider_android/tool/jnigen.dart deleted file mode 100644 index 8584dea58b08..000000000000 --- a/packages/path_provider/path_provider_android/tool/jnigen.dart +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright 2013 The Flutter Authors -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -import 'dart:io'; - -import 'package:jnigen/jnigen.dart'; - -void main() { - final Uri packageRoot = Platform.script.resolve('../'); - generateJniBindings( - Config( - outputConfig: OutputConfig( - dartConfig: DartCodeOutputConfig( - path: packageRoot.resolve('lib/src/path_provider.g.dart'), - structure: OutputStructure.singleFile, - ), - ), - androidSdkConfig: AndroidSdkConfig( - addGradleDeps: true, - androidExample: 'example/', - ), - classes: [ - 'android.content.Context', - 'io.flutter.util.PathUtils', - 'java.io.File', - 'android.os.Environment', - ], - ), - ); -} diff --git a/script/configs/allowed_unpinned_deps.yaml b/script/configs/allowed_unpinned_deps.yaml index d5384884c993..f139fc20c341 100644 --- a/script/configs/allowed_unpinned_deps.yaml +++ b/script/configs/allowed_unpinned_deps.yaml @@ -43,9 +43,6 @@ - intl - io - js -- jni -- jni_flutter -- jnigen - json_serializable - leak_tracker - leak_tracker_flutter_testing diff --git a/script/tool/lib/src/analyze_command.dart b/script/tool/lib/src/analyze_command.dart index 91f247eed2c2..216f8c75811c 100644 --- a/script/tool/lib/src/analyze_command.dart +++ b/script/tool/lib/src/analyze_command.dart @@ -371,11 +371,10 @@ class AnalyzeCommand extends PackageLoopingCommand { RepositoryPackage package, ) async { if (!pluginSupportsPlatform( - platformAndroid, - package, - requiredMode: PlatformSupport.inline, - ) || - !package.platformDirectory(FlutterPlatform.android).existsSync()) { + platformAndroid, + package, + requiredMode: PlatformSupport.inline, + )) { return PackageResult.skip( 'Package does not contain native Android plugin code', ); diff --git a/script/tool/lib/src/gradle_check_command.dart b/script/tool/lib/src/gradle_check_command.dart index af0b32bad6e2..499b332177cd 100644 --- a/script/tool/lib/src/gradle_check_command.dart +++ b/script/tool/lib/src/gradle_check_command.dart @@ -9,8 +9,10 @@ import 'package:file/file.dart'; import 'package:meta/meta.dart'; import 'package:pub_semver/pub_semver.dart'; +import 'common/core.dart'; import 'common/output_utils.dart'; import 'common/package_looping_command.dart'; +import 'common/plugin_utils.dart'; import 'common/repository_package.dart'; /// The lowest `ext.kotlin_version` that example apps are allowed to use. @@ -786,12 +788,11 @@ Which is below the minimum required. Use at least "JavaVersion.VERSION_$_minimum List gradleLines, ) { final RepositoryPackage enclosingPackage = example.getEnclosingPackage()!; - // This checks for android/ rather than using pluginSupportsPlatform because - // Dart-only implementations (e.g., usin jnigen) won't have this - // configuration since there's no native plugin code to check. - if (!enclosingPackage - .platformDirectory(FlutterPlatform.android) - .existsSync()) { + if (!pluginSupportsPlatform( + platformAndroid, + enclosingPackage, + requiredMode: PlatformSupport.inline, + )) { return true; } final String enclosingPackageName = enclosingPackage.directory.basename; diff --git a/script/tool/test/analyze_command_test.dart b/script/tool/test/analyze_command_test.dart index 2cc4947e6d29..ef2a609579ac 100644 --- a/script/tool/test/analyze_command_test.dart +++ b/script/tool/test/analyze_command_test.dart @@ -57,9 +57,6 @@ void main() { platformMacOS: const PlatformDetails(PlatformSupport.inline), }, ); - plugin - .platformDirectory(FlutterPlatform.android) - .createSync(recursive: true); // Simulate Android analysis failure only. final String gradlewPath = plugin @@ -796,9 +793,6 @@ packages/package_a/CHANGELOG.md platformAndroid: const PlatformDetails(PlatformSupport.inline), }, ); - plugin - .platformDirectory(FlutterPlatform.android) - .createSync(recursive: true); final Directory androidDir = plugin.getExamples().first.platformDirectory( FlutterPlatform.android, @@ -842,9 +836,6 @@ packages/package_a/CHANGELOG.md platformAndroid: const PlatformDetails(PlatformSupport.inline), }, ); - plugin - .platformDirectory(FlutterPlatform.android) - .createSync(recursive: true); final Iterable exampleAndroidDirs = plugin.getExamples().map( (RepositoryPackage example) => @@ -884,9 +875,6 @@ packages/package_a/CHANGELOG.md platformAndroid: const PlatformDetails(PlatformSupport.inline), }, ); - plugin - .platformDirectory(FlutterPlatform.android) - .createSync(recursive: true); final Directory androidDir = plugin.getExamples().first.platformDirectory( FlutterPlatform.android, @@ -922,16 +910,13 @@ packages/package_a/CHANGELOG.md }); test('fails if gradlew generation fails', () async { - final RepositoryPackage plugin = createFakePlugin( + createFakePlugin( 'plugin1', packagesDir, platformSupport: { platformAndroid: const PlatformDetails(PlatformSupport.inline), }, ); - plugin - .platformDirectory(FlutterPlatform.android) - .createSync(recursive: true); processRunner.mockProcessesForExecutable[getFlutterCommand( mockPlatform, @@ -966,9 +951,6 @@ packages/package_a/CHANGELOG.md platformAndroid: const PlatformDetails(PlatformSupport.inline), }, ); - plugin - .platformDirectory(FlutterPlatform.android) - .createSync(recursive: true); final String gradlewPath = plugin .getExamples() @@ -1042,31 +1024,6 @@ packages/package_a/CHANGELOG.md ); }); - test('skips Dart-only plugins', () async { - createFakePlugin( - 'plugin1', - packagesDir, - platformSupport: { - platformAndroid: const PlatformDetails(PlatformSupport.inline), - }, - ); - - final List output = await runCapturingPrint(runner, [ - 'analyze', - '--android', - '--no-dart', - ]); - - expect( - output, - containsAllInOrder([ - contains( - 'SKIPPING: Package does not contain native Android plugin code', - ), - ]), - ); - }); - group('file filtering', () { const files = ['foo.java', 'foo.kt']; for (final file in files) { diff --git a/script/tool/test/gradle_check_command_test.dart b/script/tool/test/gradle_check_command_test.dart index 238e7354f52b..c4fe9345d007 100644 --- a/script/tool/test/gradle_check_command_test.dart +++ b/script/tool/test/gradle_check_command_test.dart @@ -881,10 +881,9 @@ flutter { test('does not require java version in examples - groovy', () async { const pluginName = 'a_plugin'; - final RepositoryPackage package = createFakePackage( - pluginName, - packagesDir, - ); + final RepositoryPackage package = createFakePlugin(pluginName, packagesDir); + writeFakeGroovyPluginBuildGradle(package, includeLanguageVersion: true); + writeFakeManifest(package); final RepositoryPackage example = package.getExamples().first; writeFakeGroovyExampleBuildGradles(example, pluginName: pluginName); writeFakeManifest(example, isApp: true); @@ -897,17 +896,16 @@ flutter { output, containsAllInOrder([ contains('Validating android/build.gradle'), - contains('Ran for 1 package(s)'), + contains('Ran for 2 package(s)'), ]), ); }); test('does not require java version in examples - kotlin', () async { const pluginName = 'a_plugin'; - final RepositoryPackage package = createFakePackage( - pluginName, - packagesDir, - ); + final RepositoryPackage package = createFakePlugin(pluginName, packagesDir); + writeFakeKotlinPluginBuildGradle(package, includeLanguageVersion: true); + writeFakeManifest(package); final RepositoryPackage example = package.getExamples().first; writeFakeKotlinExampleBuildGradles(example, pluginName: pluginName); writeFakeManifest(example, isApp: true); @@ -920,7 +918,7 @@ flutter { output, containsAllInOrder([ contains('Validating android/build.gradle.kts'), - contains('Ran for 1 package(s)'), + contains('Ran for 2 package(s)'), ]), ); });