Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
Add issue references to TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
mahesh-hegde committed Jul 14, 2022
1 parent f92678a commit a72f63b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:

## TODO: More minimal test on windows after fixing dev dependency.
## i.e do not rerun analyze and format steps, and do not require flutter.
## IssueRef: https://github.com/dart-lang/jni_gen/issues/15

test_jni:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions jni/bin/setup.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ class CommandRunner {
int? time;
// TODO: time commands
// TODO: Run all commands in single shell instance
// IssueRef: https://github.com/dart-lang/jni_gen/issues/14
Future<CommandRunner> run(
String exec, List<String> args, String workingDir) async {
if (printCmds) {
Expand Down
1 change: 0 additions & 1 deletion jni/example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ android {
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "dev.dart.jni_example"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
Expand Down
7 changes: 4 additions & 3 deletions jni/lib/src/extensions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,10 @@ extension AdditionalJniEnvMethods on Pointer<JniEnv> {
void checkException({bool describe = false}) {
final exc = ExceptionOccurred();
if (exc != nullptr) {
// TODO: Doing this every time is expensive
// Should lookup and cache method reference
// and keep it alive by keeping a reference to Exception class
// TODO: Doing this every time is expensive.
// Should lookup and cache method reference,
// and keep it alive by keeping a reference to Exception class.
// IssueRef: https://github.com/dart-lang/jni_gen/issues/13
final ecls = GetObjectClass(exc);
final toStr = GetMethodID(ecls, _toString, _toStringSig);
final jstr = CallObjectMethod(exc, toStr);
Expand Down
2 changes: 0 additions & 2 deletions jni/lib/src/jni_class.dart
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ class JniClass {
///
/// Useful in expression chains.
T use<T>(T Function(JniClass) callback) {
// TODO: Maybe use a mixin or something?
// JniClass and JniObject have some similar functionality.
_checkDeleted();
final result = callback(this);
delete();
Expand Down
1 change: 1 addition & 0 deletions jni/src/dartjni.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ void SetJNILogging(int level) {

void jni_log(int level, const char *format, ...) {
// TODO: Not working
// IssueRef: https://github.com/dart-lang/jni_gen/issues/16
if (level >= jni_log_level) {
va_list args;
va_start(args, format);
Expand Down

0 comments on commit a72f63b

Please sign in to comment.