Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class GuardedSafetyNetClient {
- private final SafetyNetClient client;
- private GuardedSafetyNetClient(Context context) {
- client = SafetyNet.getClient(context);
- }
- public static SafetyNetClient getClient(Context context) {
- return new GuardedSafetyNetClient(context);
- }
- public Task<SafeBrowsingResponse> lookupUri(String uri, String apiKey, int... threatTypes) {
- return GoogleApiAvailability.isGooglePlayServicesAvailable(getContext())?
- lookupUri(uri, apiKey, threatTypes) : Tasks.forException(new WhateverException("..."));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement