Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.asterism;

parcelable GetAsterismConsentRequest;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.asterism;

parcelable GetAsterismConsentResponse;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.asterism;

parcelable SetAsterismConsentRequest;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.asterism;

parcelable SetAsterismConsentResponse;
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.google.android.gms.asterism.internal;

import com.google.android.gms.asterism.internal.IAsterismCallbacks;
import com.google.android.gms.asterism.GetAsterismConsentRequest;
import com.google.android.gms.asterism.SetAsterismConsentRequest;

interface IAsterismApiService {
oneway void getAsterismConsent(IAsterismCallbacks callbacks, in GetAsterismConsentRequest request) = 0;
oneway void setAsterismConsent(IAsterismCallbacks callbacks, in SetAsterismConsentRequest request) = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.google.android.gms.asterism.internal;

import com.google.android.gms.common.api.Status;
import com.google.android.gms.asterism.GetAsterismConsentResponse;
import com.google.android.gms.asterism.SetAsterismConsentResponse;

interface IAsterismCallbacks {
oneway void onGetAsterismConsent(in Status status, in GetAsterismConsentResponse response) = 0;
oneway void onSetAsterismConsent(in Status status, in SetAsterismConsentResponse response) = 1;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.constellation;

parcelable GetIidTokenRequest;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.constellation;

parcelable GetIidTokenResponse;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.constellation;

parcelable GetPnvCapabilitiesRequest;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.constellation;

parcelable GetPnvCapabilitiesResponse;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.constellation;

parcelable PhoneNumberInfo;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.constellation;

parcelable VerifyPhoneNumberRequest;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.google.android.gms.constellation;

parcelable VerifyPhoneNumberResponse;
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package com.google.android.gms.constellation.internal;

import com.google.android.gms.constellation.internal.IConstellationCallbacks;
import com.google.android.gms.constellation.GetIidTokenRequest;
import com.google.android.gms.constellation.GetPnvCapabilitiesRequest;
import com.google.android.gms.constellation.VerifyPhoneNumberRequest;

interface IConstellationApiService {
oneway void getIidToken(IConstellationCallbacks callbacks, in GetIidTokenRequest request) = 0;
oneway void verifyPhoneNumberV1(IConstellationCallbacks callbacks, in VerifyPhoneNumberRequest request) = 1;
oneway void verifyPhoneNumberSingleUse(IConstellationCallbacks callbacks, in VerifyPhoneNumberRequest request) = 2;
oneway void verifyPhoneNumber(IConstellationCallbacks callbacks, in VerifyPhoneNumberRequest request) = 3;
oneway void getPnvCapabilities(IConstellationCallbacks callbacks, in GetPnvCapabilitiesRequest request) = 4;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.google.android.gms.constellation.internal;

import com.google.android.gms.common.api.Status;
import com.google.android.gms.constellation.GetIidTokenResponse;
import com.google.android.gms.constellation.GetPnvCapabilitiesResponse;
import com.google.android.gms.constellation.VerifyPhoneNumberResponse;

interface IConstellationCallbacks {
oneway void onGetIidToken(in Status status, in GetIidTokenResponse response) = 0;
oneway void onVerifyPhoneNumber(in Status status, in VerifyPhoneNumberResponse response) = 1;
oneway void onGetPnvCapabilities(in Status status, in GetPnvCapabilitiesResponse response) = 2;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.asterism;

import org.microg.safeparcel.AutoSafeParcelable;

public class GetAsterismConsentRequest extends AutoSafeParcelable {
@Field(1)
public String[] gcmCapablePackageNames;

public static final Creator<GetAsterismConsentRequest> CREATOR = new AutoCreator<>(GetAsterismConsentRequest.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.asterism;

import org.microg.safeparcel.AutoSafeParcelable;

public class GetAsterismConsentResponse extends AutoSafeParcelable {
@Field(1)
public boolean consented;
@Field(2)
public String consentToken;

public static final Creator<GetAsterismConsentResponse> CREATOR = new AutoCreator<>(GetAsterismConsentResponse.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.asterism;

import org.microg.safeparcel.AutoSafeParcelable;

public class SetAsterismConsentRequest extends AutoSafeParcelable {
@Field(1)
public String[] gcmCapablePackageNames;
@Field(2)
public boolean consented;

public static final Creator<SetAsterismConsentRequest> CREATOR = new AutoCreator<>(SetAsterismConsentRequest.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.asterism;

import org.microg.safeparcel.AutoSafeParcelable;

public class SetAsterismConsentResponse extends AutoSafeParcelable {
@Field(1)
public boolean success;

public static final Creator<SetAsterismConsentResponse> CREATOR = new AutoCreator<>(SetAsterismConsentResponse.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.constellation;

import org.microg.safeparcel.AutoSafeParcelable;

public class GetIidTokenRequest extends AutoSafeParcelable {
@Field(1)
public String[] gcmCapablePackageNames;
@Field(2)
public boolean preferUntrusted;

public static final Creator<GetIidTokenRequest> CREATOR = new AutoCreator<>(GetIidTokenRequest.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.constellation;

import org.microg.safeparcel.AutoSafeParcelable;

public class GetIidTokenResponse extends AutoSafeParcelable {
@Field(1)
public String iidToken;

public static final Creator<GetIidTokenResponse> CREATOR = new AutoCreator<>(GetIidTokenResponse.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.constellation;

import org.microg.safeparcel.AutoSafeParcelable;

public class GetPnvCapabilitiesRequest extends AutoSafeParcelable {
@Field(1)
public int[] simSlots;
@Field(2)
public String[] gcmCapablePackageNames;

public static final Creator<GetPnvCapabilitiesRequest> CREATOR = new AutoCreator<>(GetPnvCapabilitiesRequest.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.constellation;

import org.microg.safeparcel.AutoSafeParcelable;

public class GetPnvCapabilitiesResponse extends AutoSafeParcelable {
@Field(1)
public boolean capable;
@Field(2)
public boolean hasDroidGuard;

public static final Creator<GetPnvCapabilitiesResponse> CREATOR = new AutoCreator<>(GetPnvCapabilitiesResponse.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.constellation;

import org.microg.safeparcel.AutoSafeParcelable;

public class PhoneNumberInfo extends AutoSafeParcelable {
@Field(1)
public String phoneNumber;
@Field(2)
public int carrierId;
@Field(3)
public int transportType;

public static final Creator<PhoneNumberInfo> CREATOR = new AutoCreator<>(PhoneNumberInfo.class);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.constellation;

import org.microg.safeparcel.AutoSafeParcelable;

public class VerifyPhoneNumberRequest extends AutoSafeParcelable {
@Field(1)
public String policyId;
@Field(2)
public String[] gcmCapablePackageNames;
@Field(3)
public boolean forceSmsVerification;
@Field(4)
public int simSlot;
@Field(5)
public ImsiRequest[] imsiRequests;
@Field(6)
public String verificationMethod;

public static final Creator<VerifyPhoneNumberRequest> CREATOR = new AutoCreator<>(VerifyPhoneNumberRequest.class);

public static class ImsiRequest extends AutoSafeParcelable {
@Field(1)
public String imsi;
@Field(2)
public String msisdn;

public static final Creator<ImsiRequest> CREATOR = new AutoCreator<>(ImsiRequest.class);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package com.google.android.gms.constellation;

import org.microg.safeparcel.AutoSafeParcelable;

public class VerifyPhoneNumberResponse extends AutoSafeParcelable {
@Field(1)
public String verifiedPhoneNumber;
@Field(2)
public PhoneNumberInfo[] phoneNumberInfos;
@Field(3)
public int verificationStatus;
@Field(4)
public String iidToken;

public static final Creator<VerifyPhoneNumberResponse> CREATOR = new AutoCreator<>(VerifyPhoneNumberResponse.class);
}
19 changes: 18 additions & 1 deletion play-services-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,24 @@
</intent-filter>
</service>

<service android:name="org.microg.gms.rcs.RcsService">
<intent-filter>
<action android:name="com.google.android.gms.rcs.START" />
</intent-filter>
</service>

<service android:name="org.microg.gms.constellation.ConstellationService">
<intent-filter>
<action android:name="com.google.android.gms.constellation.service.START" />
</intent-filter>
</service>

<service android:name="org.microg.gms.asterism.AsterismService">
<intent-filter>
<action android:name="com.google.android.gms.asterism.service.START" />
</intent-filter>
</service>

<!-- Help -->

<service
Expand Down Expand Up @@ -1419,7 +1437,6 @@
<action android:name="com.google.android.gms.plus.service.image.INTENT" />
<action android:name="com.google.android.gms.plus.service.internal.START" />
<action android:name="com.google.android.gms.plus.service.START" />
<action android:name="com.google.android.gms.rcs.START" />
<action android:name="com.google.android.gms.romanesco.MODULE_BACKUP_AGENT" />
<action android:name="com.google.android.gms.romanesco.service.START" />
<action android:name="com.google.android.gms.search.service.SEARCH_AUTH_START" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package org.microg.gms.asterism

import android.util.Log
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
import org.microg.gms.common.PackageUtils

private const val TAG = "GmsAsterismSvc"

class AsterismService : BaseService(TAG, GmsService.ASTERISM) {
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest?, service: GmsService?) {
val packageName = PackageUtils.getAndCheckCallingPackage(this, request?.packageName)
Log.d(TAG, "handleServiceRequest from $packageName")
callback.onPostInitComplete(0, AsterismServiceImpl().asBinder(), null)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* SPDX-FileCopyrightText: 2026 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/

package org.microg.gms.asterism

import android.content.Context
import android.util.Log
import com.google.android.gms.asterism.*
import com.google.android.gms.asterism.internal.IAsterismApiService
import com.google.android.gms.asterism.internal.IAsterismCallbacks
import com.google.android.gms.common.api.Status

private const val TAG = "GmsAsterism"

class AsterismServiceImpl : IAsterismApiService.Stub() {

override fun getAsterismConsent(callbacks: IAsterismCallbacks?, request: GetAsterismConsentRequest?) {
Log.d(TAG, "getAsterismConsent($request)")
val response = GetAsterismConsentResponse()
response.consented = true
response.consentToken = "microg-consent-token"
callbacks?.onGetAsterismConsent(Status.SUCCESS, response)
}

override fun setAsterismConsent(callbacks: IAsterismCallbacks?, request: SetAsterismConsentRequest?) {
Log.d(TAG, "setAsterismConsent(consented=${request?.consented})")
val response = SetAsterismConsentResponse()
response.success = true
callbacks?.onSetAsterismConsent(Status.SUCCESS, response)
}
}
Loading