diff --git a/play-services-auth/build.gradle b/play-services-auth/build.gradle index d95c5fa5c6..b10a6d0e50 100644 --- a/play-services-auth/build.gradle +++ b/play-services-auth/build.gradle @@ -43,4 +43,6 @@ dependencies { api project(':play-services-basement') api project(':play-services-fido') api project(':play-services-tasks') + + annotationProcessor project(':safe-parcel-processor') } diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInRequest.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInRequest.java index 9a95686e1b..22d745161b 100644 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInRequest.java +++ b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInRequest.java @@ -5,9 +5,16 @@ package com.google.android.gms.auth.api.identity; -import org.microg.safeparcel.AutoSafeParcelable; +import android.os.Parcel; -public class BeginSignInRequest extends AutoSafeParcelable { +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class BeginSignInRequest extends AbstractSafeParcelable { @Field(1) public PasswordRequestOptions passwordRequestOptions; @Field(2) @@ -19,5 +26,10 @@ public class BeginSignInRequest extends AutoSafeParcelable { @Field(5) public int code; - public static final Creator CREATOR = findCreator(BeginSignInRequest.class); + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(BeginSignInRequest.class); } diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInResult.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInResult.java index ece283b87a..7c9b887d37 100644 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInResult.java +++ b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/BeginSignInResult.java @@ -6,12 +6,23 @@ package com.google.android.gms.auth.api.identity; import android.app.PendingIntent; +import android.os.Parcel; -import org.microg.safeparcel.AutoSafeParcelable; +import androidx.annotation.NonNull; -public class BeginSignInResult extends AutoSafeParcelable { +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class BeginSignInResult extends AbstractSafeParcelable { @Field(1) public PendingIntent pendingIntent; - public static final Creator CREATOR = findCreator(BeginSignInResult.class); + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(BeginSignInResult.class); } diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.java index be1a31d014..1134388646 100644 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.java +++ b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetPhoneNumberHintIntentRequest.java @@ -5,11 +5,23 @@ package com.google.android.gms.auth.api.identity; -import org.microg.safeparcel.AutoSafeParcelable; +import android.os.Parcel; -public class GetPhoneNumberHintIntentRequest extends AutoSafeParcelable { +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class GetPhoneNumberHintIntentRequest extends AbstractSafeParcelable { @Field(1) public int code; - public static final Creator CREATOR = findCreator(GetPhoneNumberHintIntentRequest.class); + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GetPhoneNumberHintIntentRequest.class); } diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.java index e1aff85235..bbb02c7844 100644 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.java +++ b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GetSignInIntentRequest.java @@ -5,9 +5,16 @@ package com.google.android.gms.auth.api.identity; -import org.microg.safeparcel.AutoSafeParcelable; +import android.os.Parcel; -public class GetSignInIntentRequest extends AutoSafeParcelable { +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class GetSignInIntentRequest extends AbstractSafeParcelable { @Field(1) public String clientId; @Field(2) @@ -21,6 +28,11 @@ public class GetSignInIntentRequest extends AutoSafeParcelable { @Field(6) public int code; - public static final Creator CREATOR = findCreator(GetSignInIntentRequest.class); + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GetSignInIntentRequest.class); } diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GoogleIdTokenRequestOptions.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GoogleIdTokenRequestOptions.java index 418720c9da..ffdf5c5ea8 100644 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GoogleIdTokenRequestOptions.java +++ b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/GoogleIdTokenRequestOptions.java @@ -5,11 +5,18 @@ package com.google.android.gms.auth.api.identity; -import org.microg.safeparcel.AutoSafeParcelable; +import android.os.Parcel; + +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; import java.util.ArrayList; -public class GoogleIdTokenRequestOptions extends AutoSafeParcelable { +@SafeParcelable.Class +public class GoogleIdTokenRequestOptions extends AbstractSafeParcelable { @Field(1) public boolean idTokenRequested; @Field(2) @@ -21,9 +28,14 @@ public class GoogleIdTokenRequestOptions extends AutoSafeParcelable { @Field(5) public String serverClientId; @Field(6) - public ArrayList scopes; + public ArrayList scopes; @Field(7) public boolean forceCodeForRefreshToken; - public static final Creator CREATOR = findCreator(GoogleIdTokenRequestOptions.class); + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(GoogleIdTokenRequestOptions.class); } diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/PasswordRequestOptions.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/PasswordRequestOptions.java index 764e565828..dfca1e0652 100644 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/PasswordRequestOptions.java +++ b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/PasswordRequestOptions.java @@ -5,11 +5,23 @@ package com.google.android.gms.auth.api.identity; -import org.microg.safeparcel.AutoSafeParcelable; +import android.os.Parcel; -public class PasswordRequestOptions extends AutoSafeParcelable { +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class PasswordRequestOptions extends AbstractSafeParcelable { @Field(1) public boolean primary; - public static final Creator CREATOR = findCreator(PasswordRequestOptions.class); + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(PasswordRequestOptions.class); } diff --git a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInCredential.java b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInCredential.java index 9a48efca77..5d4c8d38f6 100644 --- a/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInCredential.java +++ b/play-services-auth/src/main/java/com/google/android/gms/auth/api/identity/SignInCredential.java @@ -5,9 +5,16 @@ package com.google.android.gms.auth.api.identity; -import org.microg.safeparcel.AutoSafeParcelable; +import android.os.Parcel; -public class SignInCredential extends AutoSafeParcelable { +import androidx.annotation.NonNull; + +import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelable; +import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; + +@SafeParcelable.Class +public class SignInCredential extends AbstractSafeParcelable { @Field(1) public String email; @Field(2) @@ -25,5 +32,10 @@ public class SignInCredential extends AutoSafeParcelable { @Field(8) public String obfuscatedIdentifier; - public static final Creator CREATOR = findCreator(SignInCredential.class); + @Override + public void writeToParcel(@NonNull Parcel dest, int flags) { + CREATOR.writeToParcel(this, dest, flags); + } + + public static final SafeParcelableCreatorAndWriter CREATOR = findCreator(SignInCredential.class); }