-
-
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.
supplement the num 116 <GASS> service
- Loading branch information
1 parent
42468ba
commit e7db794
Showing
7 changed files
with
158 additions
and
1 deletion.
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 { | ||
Bundle getGassBundle(in Bundle bundle, int code); | ||
GassResponseParcel getGassResponse(in GassRequestParcel gassRequestParcel); | ||
} |
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 status; | ||
@Field(3) | ||
public String desc; | ||
|
||
@Override | ||
public void writeToParcel(@NonNull Parcel dest, int flags) { | ||
CREATOR.writeToParcel(this, dest, flags); | ||
} | ||
|
||
public static final SafeParcelableCreatorAndWriter<GassRequestParcel> CREATOR = findCreator(GassRequestParcel.class); | ||
} |
51 changes: 51 additions & 0 deletions
51
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,51 @@ | ||
/* | ||
* 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; | ||
|
||
import org.microg.safeparcel.AutoSafeParcelable; | ||
|
||
@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); | ||
} |
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
36 changes: 36 additions & 0 deletions
36
play-services-core/src/main/kotlin/com/google/android/gms/gass/internal/GassService.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,36 @@ | ||
/* | ||
* 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.util.Log | ||
import com.google.android.gms.common.ConnectionResult | ||
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 = "GassService" | ||
|
||
class GassService : BaseService(TAG, GmsService.GASS) { | ||
|
||
override fun handleServiceRequest(callback: IGmsCallbacks?, request: GetServiceRequest?, service: GmsService?) { | ||
callback?.onPostInitComplete(ConnectionResult.SUCCESS, GassServiceImpl().asBinder(), null) | ||
} | ||
|
||
} | ||
|
||
class GassServiceImpl : IGassService.Stub() { | ||
override fun getGassBundle(bundle: Bundle?, code: Int): Bundle? { | ||
Log.d(TAG, "GassServiceImpl getGassBundle is Called") | ||
return null | ||
} | ||
|
||
override fun getGassResponse(gassRequestParcel: GassRequestParcel?): GassResponseParcel? { | ||
Log.d(TAG, "GassServiceImpl getGassResponse is Called") | ||
return null | ||
} | ||
|
||
} |