Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 42b7728

Browse files
authored
Use post instead of postDelayed (#1676)
1 parent 7372170 commit 42b7728

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

packages/local_auth/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 0.5.2+1
2+
* Use post instead of postDelayed to show the dialog onResume.
3+
14
## 0.5.2
25
* Executor thread needs to be UI thread.
36

packages/local_auth/android/src/main/java/io/flutter/plugins/localauth/AuthenticationHelper.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,13 @@ public void onActivityResumed(Activity ignored) {
173173
final BiometricPrompt prompt = new BiometricPrompt(activity, uiThreadExecutor, this);
174174
// When activity is resuming, we cannot show the prompt right away. We need to post it to the
175175
// UI queue.
176-
uiThreadExecutor.handler.postDelayed(
176+
uiThreadExecutor.handler.post(
177177
new Runnable() {
178178
@Override
179179
public void run() {
180180
prompt.authenticate(promptInfo);
181181
}
182-
},
183-
100);
182+
});
184183
}
185184
}
186185

packages/local_auth/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: Flutter plugin for Android and iOS device authentication sensors
33
such as Fingerprint Reader and Touch ID.
44
author: Flutter Team <flutter-dev@googlegroups.com>
55
homepage: https://github.com/flutter/plugins/tree/master/packages/local_auth
6-
version: 0.5.2
6+
version: 0.5.2+1
77

88
flutter:
99
plugin:

0 commit comments

Comments
 (0)