public static FptiManager getFptiManager(Context context) { initService(context); return sFptiManager; }
public static void useHardcodedConfig(Context context, boolean useHardcodedConfig) { initService(context); sConfigManager.useHardcodedConfig(useHardcodedConfig); }
/** * Gets a {@link Result} from an {@link Intent} returned by either the PayPal Wallet app or * the browser. * * @param context * @param request the original {@link Request} that was used to get this {@link Result}. * @param data the {@link Intent} returned by either the PayPal Wallet app or the browser. * @return {@link Result} */ public static Result parseResponse(Context context, Request request, Intent data) { initService(context); if (data != null && data.getData() != null) { return BrowserSwitchHelper.parseBrowserSwitchResponse(sContextInspector, request, data.getData()); } else if (data != null && data.getExtras() != null && !data.getExtras().isEmpty()) { return AppSwitchHelper.parseAppSwitchResponse(sContextInspector, request, data); } else { request.trackFpti(context, TrackingPoint.Cancel, null); return new Result(); } }
/** * @param context * @return {@code true} if the modern wallet app is installed (one that has either v1 or v2 touch * intents), {@code false} if the wallet app is older than the touch releases, or not present. */ public static boolean isWalletAppInstalled(Context context) { initService(context); for (OAuth2Recipe recipe : sConfigManager.getConfig().getOauth2Recipes()) { if (recipe.getTarget() == RequestTarget.wallet && recipe.isValidAppTarget(context)) { return true; } } return false; }