-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dummy services for PSEUDONYMOUS_ID(52), GASS(116), ACCOUNT_DATA(1…
…53) and APP_SET(300) (#2175) Co-authored-by: Marvin W <[email protected]>
- Loading branch information
1 parent
37dd2b5
commit 9ee35e3
Showing
35 changed files
with
846 additions
and
3 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassRequestParcel.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: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.gass.internal; | ||
|
||
parcelable GassRequestParcel; |
8 changes: 8 additions & 0 deletions
8
play-services-api/src/main/aidl/com/google/android/gms/gass/internal/GassResponseParcel.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: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.gass.internal; | ||
|
||
parcelable GassResponseParcel; |
16 changes: 16 additions & 0 deletions
16
play-services-api/src/main/aidl/com/google/android/gms/gass/internal/IGassService.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,16 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.gass.internal; | ||
|
||
import android.os.Bundle; | ||
import android.os.IInterface; | ||
import com.google.android.gms.gass.internal.GassRequestParcel; | ||
import com.google.android.gms.gass.internal.GassResponseParcel; | ||
|
||
interface IGassService { | ||
GassResponseParcel getGassResponse(in GassRequestParcel gassRequestParcel) = 0; | ||
Bundle getGassBundle(in Bundle bundle, int code) = 3; | ||
} |
8 changes: 8 additions & 0 deletions
8
play-services-api/src/main/aidl/com/google/android/gms/pseudonymous/PseudonymousIdToken.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: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.pseudonymous; | ||
|
||
parcelable PseudonymousIdToken; |
15 changes: 15 additions & 0 deletions
15
.../src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdCallbacks.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,15 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.pseudonymous.internal; | ||
|
||
import com.google.android.gms.common.api.Status; | ||
import com.google.android.gms.pseudonymous.PseudonymousIdToken; | ||
|
||
interface IPseudonymousIdCallbacks { | ||
void onGetTokenResponse(in Status status, in PseudonymousIdToken token) = 0; | ||
void onSetTokenResponse(in Status status) = 1; | ||
void onGetLastResetWallTimeMsResponse(in Status status, long time) = 2; | ||
} |
15 changes: 15 additions & 0 deletions
15
...pi/src/main/aidl/com/google/android/gms/pseudonymous/internal/IPseudonymousIdService.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,15 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.pseudonymous.internal; | ||
|
||
import com.google.android.gms.pseudonymous.internal.IPseudonymousIdCallbacks; | ||
import com.google.android.gms.pseudonymous.PseudonymousIdToken; | ||
|
||
interface IPseudonymousIdService { | ||
void getToken(IPseudonymousIdCallbacks call) = 0; | ||
void setToken(IPseudonymousIdCallbacks call, in PseudonymousIdToken token) = 1; | ||
void getLastResetWallTimeMs(IPseudonymousIdCallbacks callbacks) = 2; | ||
} |
32 changes: 32 additions & 0 deletions
32
play-services-api/src/main/java/com/google/android/gms/gass/internal/GassRequestParcel.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,32 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.gass.internal; | ||
|
||
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; | ||
|
||
@SafeParcelable.Class | ||
public class GassRequestParcel extends AbstractSafeParcelable { | ||
|
||
@Field(1) | ||
public int versionCode; | ||
@Field(2) | ||
public String packageName; | ||
@Field(3) | ||
public String appVersionCode; | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<GassRequestParcel> CREATOR = findCreator(GassRequestParcel.class); | ||
} |
49 changes: 49 additions & 0 deletions
49
play-services-api/src/main/java/com/google/android/gms/gass/internal/GassResponseParcel.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,49 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.gass.internal; | ||
|
||
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 com.google.android.gms.feedback.ErrorReport; | ||
|
||
@SafeParcelable.Class | ||
public class GassResponseParcel extends AbstractSafeParcelable { | ||
|
||
@Field(1) | ||
public int versionCode; | ||
|
||
@Field(2) | ||
public byte[] data; | ||
|
||
public ErrorReport report; | ||
|
||
public GassResponseParcel() { | ||
} | ||
|
||
public GassResponseParcel(int i, byte[] bArr) { | ||
this.versionCode = i; | ||
this.report = null; | ||
this.data = bArr; | ||
} | ||
|
||
public GassResponseParcel(ErrorReport report) { | ||
this.versionCode = 1; | ||
this.report = report; | ||
this.data = null; | ||
} | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<GassResponseParcel> CREATOR = findCreator(GassResponseParcel.class); | ||
} |
34 changes: 34 additions & 0 deletions
34
play-services-api/src/main/java/com/google/android/gms/pseudonymous/PseudonymousIdToken.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,34 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.pseudonymous; | ||
|
||
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; | ||
|
||
@SafeParcelable.Class | ||
public class PseudonymousIdToken extends AbstractSafeParcelable { | ||
|
||
@Field(2) | ||
public String name; | ||
|
||
@Constructor | ||
public PseudonymousIdToken(@Param(2) String name) { | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<PseudonymousIdToken> CREATOR = findCreator(PseudonymousIdToken.class); | ||
|
||
} |
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,37 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
apply plugin: 'com.android.library' | ||
|
||
android { | ||
namespace "com.google.android.gms.appset" | ||
|
||
compileSdkVersion androidCompileSdk | ||
buildToolsVersion "$androidBuildVersionTools" | ||
|
||
buildFeatures { | ||
aidl = true | ||
} | ||
|
||
defaultConfig { | ||
versionName version | ||
minSdkVersion androidMinSdk | ||
targetSdkVersion androidTargetSdk | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
} | ||
} | ||
|
||
description = 'microG implementation of play-services-appset' | ||
|
||
dependencies { | ||
api project(':play-services-base') | ||
api project(':play-services-basement') | ||
|
||
annotationProcessor project(':safe-parcel-processor') | ||
} |
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,56 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
dependencies { | ||
api project(':play-services-appset') | ||
|
||
implementation project(':play-services-base-core') | ||
|
||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" | ||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion" | ||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion" | ||
} | ||
|
||
android { | ||
namespace "org.microg.gms.appset.core" | ||
|
||
compileSdkVersion androidCompileSdk | ||
buildToolsVersion "$androidBuildVersionTools" | ||
|
||
defaultConfig { | ||
versionName version | ||
minSdkVersion androidMinSdk | ||
targetSdkVersion androidTargetSdk | ||
} | ||
|
||
sourceSets { | ||
main { | ||
java.srcDirs = ['src/main/kotlin'] | ||
} | ||
} | ||
|
||
lintOptions { | ||
disable 'MissingTranslation' | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = 1.8 | ||
} | ||
} | ||
|
||
// Nothing to publish yet | ||
//apply from: '../gradle/publish-android.gradle' | ||
|
||
description = 'microG service implementation for play-services-appset' |
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,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ SPDX-FileCopyrightText: 2024 microG Project Team | ||
~ SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<application> | ||
|
||
<service android:name="org.microg.gms.appset.AppSetService"> | ||
<intent-filter> | ||
<action android:name="com.google.android.gms.appset.service.START" /> | ||
</intent-filter> | ||
</service> | ||
</application> | ||
</manifest> |
40 changes: 40 additions & 0 deletions
40
play-services-appset/core/src/main/kotlin/org/microg/gms/appset/AppSetService.kt
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,40 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.microg.gms.appset | ||
|
||
import android.util.Log | ||
import com.google.android.gms.appset.AppSetIdRequestParams | ||
import com.google.android.gms.appset.internal.IAppSetIdCallback | ||
import com.google.android.gms.appset.internal.IAppSetService | ||
import com.google.android.gms.common.ConnectionResult | ||
import com.google.android.gms.common.Feature | ||
import com.google.android.gms.common.api.Status | ||
import com.google.android.gms.common.internal.ConnectionInfo | ||
import com.google.android.gms.common.internal.GetServiceRequest | ||
import com.google.android.gms.common.internal.IGmsCallbacks | ||
import org.microg.gms.BaseService | ||
import org.microg.gms.common.GmsService | ||
|
||
private const val TAG = "AppSetService" | ||
private val FEATURES = arrayOf(Feature("app_set_id", 1L)) | ||
|
||
class AppSetService : BaseService(TAG, GmsService.APP_SET) { | ||
|
||
override fun handleServiceRequest(callback: IGmsCallbacks?, request: GetServiceRequest?, service: GmsService?) { | ||
callback?.onPostInitCompleteWithConnectionInfo( | ||
ConnectionResult.SUCCESS, | ||
AppSetServiceImpl().asBinder(), | ||
ConnectionInfo().apply { features = FEATURES } | ||
) | ||
} | ||
} | ||
|
||
class AppSetServiceImpl : IAppSetService.Stub() { | ||
override fun getAppSetIdInfo(params: AppSetIdRequestParams?, callback: IAppSetIdCallback?) { | ||
Log.d(TAG, "AppSetServiceImp getAppSetIdInfo is called -> ${params?.toString()} ") | ||
callback?.onAppSetInfo(Status.SUCCESS, null) | ||
} | ||
} |
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,4 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
</manifest> |
8 changes: 8 additions & 0 deletions
8
play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetIdRequestParams.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: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.appset; | ||
|
||
parcelable AppSetIdRequestParams; |
8 changes: 8 additions & 0 deletions
8
play-services-appset/src/main/aidl/com/google/android/gms/appset/AppSetInfoParcel.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: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.appset; | ||
|
||
parcelable AppSetInfoParcel; |
13 changes: 13 additions & 0 deletions
13
...rvices-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetIdCallback.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,13 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.appset.internal; | ||
|
||
import com.google.android.gms.appset.AppSetInfoParcel; | ||
import com.google.android.gms.common.api.Status; | ||
|
||
interface IAppSetIdCallback { | ||
void onAppSetInfo(in Status status, in AppSetInfoParcel info) = 0; | ||
} |
13 changes: 13 additions & 0 deletions
13
...-services-appset/src/main/aidl/com/google/android/gms/appset/internal/IAppSetService.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,13 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2023 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package com.google.android.gms.appset.internal; | ||
|
||
import com.google.android.gms.appset.AppSetIdRequestParams; | ||
import com.google.android.gms.appset.internal.IAppSetIdCallback; | ||
|
||
interface IAppSetService { | ||
void getAppSetIdInfo(in AppSetIdRequestParams params, in IAppSetIdCallback callback) = 0; | ||
} |
Oops, something went wrong.