mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-08 12:04:50 +08:00
19
lib/utils/android/android_helper.dart
Normal file
19
lib/utils/android/android_helper.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:PiliPlus/utils/android/bindings.g.dart';
|
||||
import 'package:jni/jni.dart';
|
||||
|
||||
abstract final class PiliAndroidHelper {
|
||||
static void createShortcut(String id, String uri, String label, String path) {
|
||||
final jId = id.toJString();
|
||||
final jUri = uri.toJString();
|
||||
final jLabel = label.toJString();
|
||||
final jPath = path.toJString();
|
||||
try {
|
||||
AndroidHelper.createShortcut(jId, jUri, jLabel, jPath);
|
||||
} finally {
|
||||
jId.release();
|
||||
jUri.release();
|
||||
jLabel.release();
|
||||
jPath.release();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user