-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Game archive, ranking, and achievement functions are implemented
- Loading branch information
1 parent
a77ccf5
commit c43a801
Showing
128 changed files
with
10,052 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
play-services-auth-base/src/main/aidl/com/google/android/gms/auth/TokenData.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth; | ||
|
||
parcelable TokenData; |
46 changes: 46 additions & 0 deletions
46
...services-auth-base/src/main/java/com/google/android/gms/auth/AccessAccountDataBinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth; | ||
|
||
import android.os.Bundle; | ||
import android.os.IBinder; | ||
import android.os.IInterface; | ||
|
||
import com.google.android.auth.IAuthManagerService; | ||
|
||
import java.util.Objects; | ||
|
||
public class AccessAccountDataBinder implements DataBinder<Boolean> { | ||
|
||
private final String clientPackageName; | ||
|
||
public AccessAccountDataBinder(String clientPackageName) { | ||
this.clientPackageName = clientPackageName; | ||
} | ||
|
||
@Override | ||
public Boolean getBinderData(IBinder iBinder) throws Exception { | ||
IAuthManagerService service; | ||
if (iBinder == null) { | ||
service = null; | ||
} else { | ||
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.auth.IAuthManagerService"); | ||
if (queryLocalInterface instanceof IAuthManagerService) { | ||
service = (IAuthManagerService) queryLocalInterface; | ||
} else { | ||
service = IAuthManagerService.Stub.asInterface(iBinder); | ||
} | ||
} | ||
if (service == null) { | ||
return null; | ||
} | ||
Bundle bundle = service.requestGoogleAccountsAccess(clientPackageName); | ||
if (bundle == null) { | ||
return false; | ||
} | ||
return Objects.equals(bundle.getString("Error"), "OK"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
play-services-auth-base/src/main/java/com/google/android/gms/auth/ChangeEventDataBinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth; | ||
|
||
import android.accounts.Account; | ||
import android.os.IBinder; | ||
import android.os.IInterface; | ||
|
||
import com.google.android.auth.IAuthManagerService; | ||
|
||
import java.util.List; | ||
|
||
public class ChangeEventDataBinder implements DataBinder<List<AccountChangeEvent>> { | ||
|
||
private final String accountName; | ||
private final int since; | ||
|
||
public ChangeEventDataBinder(String accountName, int since) { | ||
this.accountName = accountName; | ||
this.since = since; | ||
} | ||
|
||
@Override | ||
public List<AccountChangeEvent> getBinderData(IBinder iBinder) throws Exception { | ||
IAuthManagerService service; | ||
if (iBinder == null) { | ||
service = null; | ||
} else { | ||
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.auth.IAuthManagerService"); | ||
if (queryLocalInterface instanceof IAuthManagerService) { | ||
service = (IAuthManagerService) queryLocalInterface; | ||
} else { | ||
service = IAuthManagerService.Stub.asInterface(iBinder); | ||
} | ||
} | ||
if (service == null) { | ||
return null; | ||
} | ||
AccountChangeEventsRequest request = new AccountChangeEventsRequest(1, since, accountName, new Account(accountName, GoogleAuthUtil.GOOGLE_ACCOUNT_TYPE)); | ||
AccountChangeEventsResponse changeEvents = service.getChangeEvents(request); | ||
return changeEvents.getEvents(); | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
play-services-auth-base/src/main/java/com/google/android/gms/auth/ClearTokenDataBinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth; | ||
|
||
import android.os.Bundle; | ||
import android.os.IBinder; | ||
import android.os.IInterface; | ||
|
||
import com.google.android.auth.IAuthManagerService; | ||
|
||
public class ClearTokenDataBinder implements DataBinder<Void> { | ||
|
||
private final String token; | ||
private final Bundle extras; | ||
|
||
public ClearTokenDataBinder(String token, Bundle extras) { | ||
this.token = token; | ||
this.extras = extras; | ||
} | ||
|
||
@Override | ||
public Void getBinderData(IBinder iBinder) throws Exception { | ||
IAuthManagerService service; | ||
if (iBinder == null) { | ||
service = null; | ||
} else { | ||
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.auth.IAuthManagerService"); | ||
if (queryLocalInterface instanceof IAuthManagerService) { | ||
service = (IAuthManagerService) queryLocalInterface; | ||
} else { | ||
service = IAuthManagerService.Stub.asInterface(iBinder); | ||
} | ||
} | ||
if (service == null) { | ||
return null; | ||
} | ||
service.clearToken(token, extras); | ||
return Void.TYPE.newInstance(); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
play-services-auth-base/src/main/java/com/google/android/gms/auth/DataBinder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/** | ||
* SPDX-FileCopyrightText: 2024 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.auth; | ||
|
||
import android.os.IBinder; | ||
|
||
public interface DataBinder<T> { | ||
T getBinderData(IBinder iBinder) throws Exception; | ||
} |
Oops, something went wrong.