Bug 1552601 - Annotate WebAuthn reflection methods as @ReflectionTarget r=nalexander
authorJ.C. Jones <jjones@mozilla.com>
Sat, 18 May 2019 03:18:20 +0000
changeset 533247 2c73613d29c29e9301bfeab78b9c3b756eb30837
parent 533246 366a49e70140c78e213fe86b7616e2c8c88fc906
child 533248 777492b75f9745bd78dc96155ccd91523b788db0
push id11276
push userrgurzau@mozilla.com
push dateMon, 20 May 2019 13:11:24 +0000
treeherdermozilla-beta@847755a7c325 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1552601, 1550596
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1552601 - Annotate WebAuthn reflection methods as @ReflectionTarget r=nalexander A Proguard update in Bug 1550596 optimized away the WebAuthn methods, but there's a convenient ReflectionTarget defined to say 'hey, don't do that.' Differential Revision: https://phabricator.services.mozilla.com/D31693
mobile/android/base/java/org/mozilla/gecko/util/WebAuthnUtils.java
--- a/mobile/android/base/java/org/mozilla/gecko/util/WebAuthnUtils.java
+++ b/mobile/android/base/java/org/mozilla/gecko/util/WebAuthnUtils.java
@@ -5,16 +5,17 @@
 
 package org.mozilla.gecko.util;
 
 import java.util.ArrayList;
 import java.util.List;
 
 import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.ActivityHandlerHelper;
+import org.mozilla.gecko.annotation.ReflectionTarget;
 import org.mozilla.gecko.WebAuthnTokenManager;
 import org.mozilla.gecko.GeckoActivityMonitor;
 import org.mozilla.gecko.util.ActivityResultHandler;
 import org.mozilla.gecko.util.GeckoBundle;
 
 import android.app.Activity;
 import android.content.Intent;
 import android.content.IntentSender;
@@ -70,16 +71,17 @@ public class WebAuthnUtils
         }
         if ((transports & AUTHENTICATOR_TRANSPORT_BLE) == AUTHENTICATOR_TRANSPORT_BLE) {
             result.add(Transport.BLUETOOTH_LOW_ENERGY);
         }
 
         return result;
     }
 
+    @ReflectionTarget
     public static void makeCredential(final GeckoBundle credentialBundle,
                                       final byte[] userId, final byte[] challenge,
                                       final WebAuthnTokenManager.WebAuthnPublicCredential[] excludeList,
                                       final GeckoBundle authenticatorSelection,
                                       final GeckoBundle extensions,
                                       WebAuthnTokenManager.WebAuthnMakeCredentialResponse handler) {
         final Activity currentActivity =
             GeckoActivityMonitor.getInstance().getCurrentActivity();
@@ -281,16 +283,17 @@ public class WebAuthnUtils
                 mHandler.onFailure("ABORT_ERR");
                 return;
             }
 
             mHandler.onFailure("UNKNOWN_ERR");
         }
     }
 
+    @ReflectionTarget
     public static void getAssertion(final byte[] challenge,
                                     final WebAuthnTokenManager.WebAuthnPublicCredential[] allowList,
                                     final GeckoBundle assertionBundle,
                                     final GeckoBundle extensions,
                                     WebAuthnTokenManager.WebAuthnGetAssertionResponse handler) {
         final Activity currentActivity =
             GeckoActivityMonitor.getInstance().getCurrentActivity();