@@ -189,12 +189,14 @@ private void handleOpenAuthorizeURLWithWebView(PluginCall call, ActivityResult a
189189 @ PluginMethod
190190 public void checkBiometricSupported (PluginCall call ) {
191191 JSObject android = call .getObject ("android" );
192- JSONArray constraint = this .jsObjectGetArray (android , "constraint" );
193- int flags = this .constraintToFlag (constraint );
192+ JSONArray allowedAuthenticatorsOnEnable = this .jsObjectGetArray (android , "allowedAuthenticatorsOnEnable" );
193+ JSONArray allowedAuthenticatorsOnAuthenticate = this .jsObjectGetArray (android , "allowedAuthenticatorsOnAuthenticate" );
194+ int allowedAuthenticatorsOnEnableFlags = this .constraintToFlag (allowedAuthenticatorsOnEnable );
195+ int allowedAuthenticatorsOnAuthenticateFlags = this .constraintToFlag (allowedAuthenticatorsOnAuthenticate );
194196
195197 Context ctx = this .getContext ();
196198 try {
197- int result = this .implementation .checkBiometricSupported (ctx , flags );
199+ int result = this .implementation .checkBiometricSupported (ctx , allowedAuthenticatorsOnEnableFlags , allowedAuthenticatorsOnAuthenticateFlags );
198200 if (result == BiometricManager .BIOMETRIC_SUCCESS ) {
199201 call .resolve ();
200202 } else {
@@ -214,19 +216,23 @@ public void createBiometricPrivateKey(PluginCall call) {
214216 String kid = call .getString ("kid" );
215217 String alias = "com.authgear.keys.biometric." + kid ;
216218 JSObject android = call .getObject ("android" );
217- JSONArray constraint = this .jsObjectGetArray (android , "constraint" );
218219 boolean invalidatedByBiometricEnrollment = android .getBool ("invalidatedByBiometricEnrollment" );
219- int flags = this .constraintToFlag (constraint );
220220 String title = android .getString ("title" );
221221 String subtitle = android .getString ("subtitle" );
222222 String description = android .getString ("description" );
223223 String negativeButtonText = android .getString ("negativeButtonText" );
224224
225+ JSONArray allowedAuthenticatorsOnEnable = this .jsObjectGetArray (android , "allowedAuthenticatorsOnEnable" );
226+ JSONArray allowedAuthenticatorsOnAuthenticate = this .jsObjectGetArray (android , "allowedAuthenticatorsOnAuthenticate" );
227+ int allowedAuthenticatorsOnEnableFlags = this .constraintToFlag (allowedAuthenticatorsOnEnable );
228+ int allowedAuthenticatorsOnAuthenticateFlags = this .constraintToFlag (allowedAuthenticatorsOnAuthenticate );
229+
225230 BiometricOptions options = new BiometricOptions ();
226231 options .payload = payload ;
227232 options .kid = kid ;
228233 options .alias = alias ;
229- options .flags = flags ;
234+ options .allowedAuthenticatorsOnEnableFlags = allowedAuthenticatorsOnEnableFlags ;
235+ options .allowedAuthenticatorsOnAuthenticateFlags = allowedAuthenticatorsOnAuthenticateFlags ;
230236 options .invalidatedByBiometricEnrollment = invalidatedByBiometricEnrollment ;
231237 options .title = title ;
232238 options .subtitle = subtitle ;
@@ -269,19 +275,23 @@ public void signWithBiometricPrivateKey(PluginCall call) {
269275 String kid = call .getString ("kid" );
270276 String alias = "com.authgear.keys.biometric." + kid ;
271277 JSObject android = call .getObject ("android" );
272- JSONArray constraint = this .jsObjectGetArray (android , "constraint" );
273278 boolean invalidatedByBiometricEnrollment = android .getBool ("invalidatedByBiometricEnrollment" );
274- int flags = this .constraintToFlag (constraint );
275279 String title = android .getString ("title" );
276280 String subtitle = android .getString ("subtitle" );
277281 String description = android .getString ("description" );
278282 String negativeButtonText = android .getString ("negativeButtonText" );
279283
284+ JSONArray allowedAuthenticatorsOnEnable = this .jsObjectGetArray (android , "allowedAuthenticatorsOnEnable" );
285+ JSONArray allowedAuthenticatorsOnAuthenticate = this .jsObjectGetArray (android , "allowedAuthenticatorsOnAuthenticate" );
286+ int allowedAuthenticatorsOnEnableFlags = this .constraintToFlag (allowedAuthenticatorsOnEnable );
287+ int allowedAuthenticatorsOnAuthenticateFlags = this .constraintToFlag (allowedAuthenticatorsOnAuthenticate );
288+
280289 BiometricOptions options = new BiometricOptions ();
281290 options .payload = payload ;
282291 options .kid = kid ;
283292 options .alias = alias ;
284- options .flags = flags ;
293+ options .allowedAuthenticatorsOnEnableFlags = allowedAuthenticatorsOnEnableFlags ;
294+ options .allowedAuthenticatorsOnAuthenticateFlags = allowedAuthenticatorsOnAuthenticateFlags ;
285295 options .invalidatedByBiometricEnrollment = invalidatedByBiometricEnrollment ;
286296 options .title = title ;
287297 options .subtitle = subtitle ;
0 commit comments