diff --git a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/AttestationData.aidl b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/AttestationData.aidl new file mode 100644 index 00000000..f1e056b4 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/AttestationData.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.safetynet; + +parcelable AttestationData; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/HarmfulAppsData.aidl b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/HarmfulAppsData.aidl new file mode 100644 index 00000000..9e5456b0 --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/HarmfulAppsData.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.safetynet; + +parcelable HarmfulAppsData; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/SafeBrowsingData.aidl b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/SafeBrowsingData.aidl new file mode 100644 index 00000000..5b18294d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/SafeBrowsingData.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.safetynet; + +parcelable SafeBrowsingData; \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetCallbacks.aidl b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetCallbacks.aidl new file mode 100644 index 00000000..fe57be6d --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetCallbacks.aidl @@ -0,0 +1,14 @@ +package com.google.android.gms.safetynet.internal; + +import com.google.android.gms.common.api.Status; +import com.google.android.gms.safetynet.AttestationData; +import com.google.android.gms.safetynet.HarmfulAppsData; +import com.google.android.gms.safetynet.SafeBrowsingData; + +interface ISafetyNetCallbacks { + void onAttestationData(in Status status, in AttestationData attestationData) = 0; + void onString(String s) = 1; + void onSafeBrowsingData(in Status status, in SafeBrowsingData safeBrowsingData) = 2; + void onBoolean(in Status status, boolean b) = 3; + void onHarmfulAppsData(in Status status, in List harmfulAppsData) = 4; +} \ No newline at end of file diff --git a/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetService.aidl b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetService.aidl new file mode 100644 index 00000000..9e23438a --- /dev/null +++ b/play-services-api/src/main/aidl/com/google/android/gms/safetynet/internal/ISafetyNetService.aidl @@ -0,0 +1,11 @@ +package com.google.android.gms.safetynet.internal; + +import com.google.android.gms.safetynet.internal.ISafetyNetCallbacks; + +interface ISafetyNetService { + void attest(ISafetyNetCallbacks callbacks, in byte[] nonce) = 0; + void getSharedUuid(ISafetyNetCallbacks callbacks) = 1; + void lookupUri(ISafetyNetCallbacks callbacks, String s1, in int[] threatTypes, int i, String s2) = 2; + void init(ISafetyNetCallbacks callbacks) = 3; + void unknown4(ISafetyNetCallbacks callbacks) = 4; +} \ No newline at end of file diff --git a/play-services-api/src/main/java/com/google/android/gms/safetynet/AttestationData.java b/play-services-api/src/main/java/com/google/android/gms/safetynet/AttestationData.java new file mode 100644 index 00000000..91350258 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/safetynet/AttestationData.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2016 microG Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.android.gms.safetynet; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class AttestationData extends AutoSafeParcelable { + @SafeParceled(1) + private int versionCode = 1; + @SafeParceled(2) + private final String jwsResult; + + private AttestationData() { + jwsResult = null; + } + + public AttestationData(String jwsResult) { + this.jwsResult = jwsResult; + } + + public String getJwsResult() { + return jwsResult; + } + + public static final Creator CREATOR = new AutoCreator(AttestationData.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/safetynet/HarmfulAppsData.java b/play-services-api/src/main/java/com/google/android/gms/safetynet/HarmfulAppsData.java new file mode 100644 index 00000000..4837d67c --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/safetynet/HarmfulAppsData.java @@ -0,0 +1,23 @@ +/* + * Copyright 2013-2016 microG Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.android.gms.safetynet; + +import org.microg.safeparcel.AutoSafeParcelable; + +public class HarmfulAppsData extends AutoSafeParcelable { + public static final Creator CREATOR = new AutoCreator(HarmfulAppsData.class); +} diff --git a/play-services-api/src/main/java/com/google/android/gms/safetynet/SafeBrowsingData.java b/play-services-api/src/main/java/com/google/android/gms/safetynet/SafeBrowsingData.java new file mode 100644 index 00000000..ee869f75 --- /dev/null +++ b/play-services-api/src/main/java/com/google/android/gms/safetynet/SafeBrowsingData.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2016 microG Project Team + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.android.gms.safetynet; + +import com.google.android.gms.common.data.DataHolder; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class SafeBrowsingData extends AutoSafeParcelable { + @SafeParceled(1) + private int versionCode = 1; + @SafeParceled(2) + private String status; + @SafeParceled(3) + private DataHolder data; + + public static final Creator CREATOR = new AutoCreator(SafeBrowsingData.class); +}