From 5ef9d262b405d0b0ba241d4e740d87bf22e0a5a9 Mon Sep 17 00:00:00 2001 From: mar-v-in Date: Tue, 10 Feb 2015 03:31:53 +0100 Subject: [PATCH] Add missing AuthManager method --- .../android/auth/IAuthManagerService.aidl | 4 ++ .../android/gms/auth/AccountChangeEvent.java | 5 ++- .../gms/auth/AccountChangeEventsRequest.aidl | 3 ++ .../gms/auth/AccountChangeEventsRequest.java | 37 +++++++++++++++++++ .../gms/auth/AccountChangeEventsResponse.aidl | 3 ++ .../gms/auth/AccountChangeEventsResponse.java | 37 +++++++++++++++++++ 6 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 src/com/google/android/gms/auth/AccountChangeEventsRequest.aidl create mode 100644 src/com/google/android/gms/auth/AccountChangeEventsRequest.java create mode 100644 src/com/google/android/gms/auth/AccountChangeEventsResponse.aidl create mode 100644 src/com/google/android/gms/auth/AccountChangeEventsResponse.java diff --git a/src/com/google/android/auth/IAuthManagerService.aidl b/src/com/google/android/auth/IAuthManagerService.aidl index 0b84c375..94ced65c 100644 --- a/src/com/google/android/auth/IAuthManagerService.aidl +++ b/src/com/google/android/auth/IAuthManagerService.aidl @@ -1,6 +1,10 @@ package com.google.android.auth; +import com.google.android.gms.auth.AccountChangeEventsResponse; +import com.google.android.gms.auth.AccountChangeEventsRequest; + interface IAuthManagerService { Bundle getToken(String accountName, String scope, in Bundle extras); Bundle clearToken(String token, in Bundle extras); + AccountChangeEventsResponse getChangeEvents(in AccountChangeEventsRequest request); } diff --git a/src/com/google/android/gms/auth/AccountChangeEvent.java b/src/com/google/android/gms/auth/AccountChangeEvent.java index 4f927ab8..cfa84122 100644 --- a/src/com/google/android/gms/auth/AccountChangeEvent.java +++ b/src/com/google/android/gms/auth/AccountChangeEvent.java @@ -1,4 +1,7 @@ package com.google.android.gms.auth; -public class AccountChangeEvent { +import org.microg.safeparcel.AutoSafeParcelable; + +public class AccountChangeEvent extends AutoSafeParcelable { + public static Creator CREATOR = new AutoCreator<>(AccountChangeEvent.class); } diff --git a/src/com/google/android/gms/auth/AccountChangeEventsRequest.aidl b/src/com/google/android/gms/auth/AccountChangeEventsRequest.aidl new file mode 100644 index 00000000..206b1a9d --- /dev/null +++ b/src/com/google/android/gms/auth/AccountChangeEventsRequest.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.auth; + +parcelable AccountChangeEventsRequest; \ No newline at end of file diff --git a/src/com/google/android/gms/auth/AccountChangeEventsRequest.java b/src/com/google/android/gms/auth/AccountChangeEventsRequest.java new file mode 100644 index 00000000..940301d3 --- /dev/null +++ b/src/com/google/android/gms/auth/AccountChangeEventsRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2015 µg 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.auth; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +public class AccountChangeEventsRequest extends AutoSafeParcelable { + @SafeParceled(1) + private final int versionCode; + @SafeParceled(2) + private int i; + @SafeParceled(3) + private String s; + + + private AccountChangeEventsRequest() { + versionCode = 1; + } + + public static Creator CREATOR = new AutoCreator<>(AccountChangeEventsRequest.class); + +} diff --git a/src/com/google/android/gms/auth/AccountChangeEventsResponse.aidl b/src/com/google/android/gms/auth/AccountChangeEventsResponse.aidl new file mode 100644 index 00000000..832e5859 --- /dev/null +++ b/src/com/google/android/gms/auth/AccountChangeEventsResponse.aidl @@ -0,0 +1,3 @@ +package com.google.android.gms.auth; + +parcelable AccountChangeEventsResponse; \ No newline at end of file diff --git a/src/com/google/android/gms/auth/AccountChangeEventsResponse.java b/src/com/google/android/gms/auth/AccountChangeEventsResponse.java new file mode 100644 index 00000000..a319e621 --- /dev/null +++ b/src/com/google/android/gms/auth/AccountChangeEventsResponse.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2015 µg 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.auth; + +import org.microg.safeparcel.AutoSafeParcelable; +import org.microg.safeparcel.SafeParceled; + +import java.util.ArrayList; +import java.util.List; + +public class AccountChangeEventsResponse extends AutoSafeParcelable { + @SafeParceled(1) + private final int versionCode; + @SafeParceled(value = 2, subType = "com.google.android.gms.auth.AccountChangeEvent") + private List events; + + public AccountChangeEventsResponse() { + versionCode = 1; + events = new ArrayList<>(); + } + + public static Creator CREATOR = new AutoCreator<>(AccountChangeEventsResponse.class); +}