0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-11-27 21:53:00 +00:00

Update SafetyNet API to latest version

This commit is contained in:
Marvin W 2017-02-11 21:42:38 +01:00
parent e45e2d283a
commit d7fd34402f
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A
3 changed files with 20 additions and 7 deletions

2
extern/GmsApi vendored

@ -1 +1 @@
Subproject commit 3dabc13028b56c792573743107b2a56f2fdd3148 Subproject commit 05c12cab6d65444b0c5d9882f8df6224168ff7aa

View file

@ -26,7 +26,6 @@ import android.util.Log;
import com.google.android.gms.common.api.Status; import com.google.android.gms.common.api.Status;
import com.google.android.gms.location.ActivityRecognitionResult; import com.google.android.gms.location.ActivityRecognitionResult;
import com.google.android.gms.location.Geofence;
import com.google.android.gms.location.GeofencingRequest; import com.google.android.gms.location.GeofencingRequest;
import com.google.android.gms.location.GestureRequest; import com.google.android.gms.location.GestureRequest;
import com.google.android.gms.location.ILocationListener; import com.google.android.gms.location.ILocationListener;
@ -40,6 +39,7 @@ import com.google.android.gms.location.internal.IGoogleLocationManagerService;
import com.google.android.gms.location.internal.ISettingsCallbacks; import com.google.android.gms.location.internal.ISettingsCallbacks;
import com.google.android.gms.location.internal.LocationRequestInternal; import com.google.android.gms.location.internal.LocationRequestInternal;
import com.google.android.gms.location.internal.LocationRequestUpdateData; import com.google.android.gms.location.internal.LocationRequestUpdateData;
import com.google.android.gms.location.internal.ParcelableGeofence;
import com.google.android.gms.location.places.AutocompleteFilter; import com.google.android.gms.location.places.AutocompleteFilter;
import com.google.android.gms.location.places.NearbyAlertRequest; import com.google.android.gms.location.places.NearbyAlertRequest;
import com.google.android.gms.location.places.PlaceFilter; import com.google.android.gms.location.places.PlaceFilter;
@ -72,7 +72,7 @@ public class GoogleLocationManagerServiceImpl extends IGoogleLocationManagerServ
} }
@Override @Override
public void addGeofencesList(List<Geofence> geofences, PendingIntent pendingIntent, public void addGeofencesList(List<ParcelableGeofence> geofences, PendingIntent pendingIntent,
IGeofencerCallbacks callbacks, String packageName) throws RemoteException { IGeofencerCallbacks callbacks, String packageName) throws RemoteException {
Log.d(TAG, "addGeofencesList: " + geofences); Log.d(TAG, "addGeofencesList: " + geofences);
} }

View file

@ -18,10 +18,12 @@ package org.microg.gms.snet;
import android.content.Context; import android.content.Context;
import android.os.Bundle; import android.os.Bundle;
import android.os.Parcel;
import android.os.RemoteException; import android.os.RemoteException;
import android.util.Base64; import android.util.Base64;
import android.util.Log; import android.util.Log;
import com.google.android.gms.common.api.CommonStatusCodes;
import com.google.android.gms.common.api.Status; import com.google.android.gms.common.api.Status;
import com.google.android.gms.safetynet.AttestationData; import com.google.android.gms.safetynet.AttestationData;
import com.google.android.gms.safetynet.HarmfulAppsData; import com.google.android.gms.safetynet.HarmfulAppsData;
@ -30,7 +32,6 @@ import com.google.android.gms.safetynet.internal.ISafetyNetService;
import org.microg.gms.checkin.LastCheckinInfo; import org.microg.gms.checkin.LastCheckinInfo;
import org.microg.gms.common.PackageUtils; import org.microg.gms.common.PackageUtils;
import org.microg.gms.common.Utils;
import org.microg.gms.droidguard.RemoteDroidGuardConnector; import org.microg.gms.droidguard.RemoteDroidGuardConnector;
import java.io.IOException; import java.io.IOException;
@ -50,9 +51,14 @@ public class SafetyNetClientServiceImpl extends ISafetyNetService.Stub {
} }
@Override @Override
public void attest(final ISafetyNetCallbacks callbacks, final byte[] nonce) throws RemoteException { public void attest(ISafetyNetCallbacks callbacks, byte[] nonce) throws RemoteException {
attestWithApiKey(callbacks, nonce, null);
}
@Override
public void attestWithApiKey(final ISafetyNetCallbacks callbacks, final byte[] nonce, String apiKey) throws RemoteException {
if (nonce == null) { if (nonce == null) {
callbacks.onAttestationData(new Status(10), null); callbacks.onAttestationData(new Status(CommonStatusCodes.DEVELOPER_ERROR), null);
return; return;
} }
@ -115,8 +121,15 @@ public class SafetyNetClientServiceImpl extends ISafetyNetService.Stub {
} }
@Override @Override
public void unknown4(ISafetyNetCallbacks callbacks) throws RemoteException { public void getHarmfulAppsList(ISafetyNetCallbacks callbacks) throws RemoteException {
Log.d(TAG, "dummy Method: unknown4"); Log.d(TAG, "dummy Method: unknown4");
callbacks.onHarmfulAppsData(Status.SUCCESS, new ArrayList<HarmfulAppsData>()); callbacks.onHarmfulAppsData(Status.SUCCESS, new ArrayList<HarmfulAppsData>());
} }
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
if (super.onTransact(code, data, reply, flags)) return true;
Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
return false;
}
} }