Update stub services

This commit is contained in:
Marvin W 2022-01-18 18:55:28 +01:00
parent 10de88b89f
commit 552aaf856d
No known key found for this signature in database
GPG Key ID: 072E9235DB996F2A
43 changed files with 924 additions and 297 deletions

View File

@ -1,7 +1,13 @@
package com.google.android.gms.clearcut.internal; package com.google.android.gms.clearcut.internal;
import com.google.android.gms.common.api.Status; import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.data.DataHolder;
interface IClearcutLoggerCallbacks { interface IClearcutLoggerCallbacks {
oneway void onStatus(in Status status) = 0; oneway void onLogResult(in Status status) = 0;
oneway void onForceUploadResult(in Status status) = 1;
oneway void onStartCollectForDebugResult(in Status status, long l) = 2;
oneway void onStopCollectForDebugResult(in Status status) = 3;
oneway void onCollectForDebugExpiryTime(in Status status, long l) = 4;
oneway void onLogEventParcelables(in DataHolder data) = 6;
} }

View File

@ -4,5 +4,11 @@ import com.google.android.gms.clearcut.internal.IClearcutLoggerCallbacks;
import com.google.android.gms.clearcut.LogEventParcelable; import com.google.android.gms.clearcut.LogEventParcelable;
interface IClearcutLoggerService { interface IClearcutLoggerService {
void log(IClearcutLoggerCallbacks callbacks, in LogEventParcelable event) = 0; oneway void log(IClearcutLoggerCallbacks callbacks, in LogEventParcelable event) = 0;
oneway void forceUpload(IClearcutLoggerCallbacks callbacks) = 1;
oneway void startCollectForDebug(IClearcutLoggerCallbacks callbacks) = 2;
oneway void stopCollectForDebug(IClearcutLoggerCallbacks callbacks) = 3;
oneway void getCollectForDebugExpiryTime(IClearcutLoggerCallbacks callbacks) = 4;
oneway void getLogEventParcelablesLegacy(IClearcutLoggerCallbacks callbacks) = 5;
oneway void getLogEventParcelables(IClearcutLoggerCallbacks callbacks) = 6;
} }

View File

@ -0,0 +1,3 @@
package com.google.android.gms.clearcut.internal;
parcelable PlayLoggerContext;

View File

@ -0,0 +1,55 @@
package com.google.android.gms.measurement.api.internal;
import com.google.android.gms.dynamic.IObjectWrapper;
import com.google.android.gms.measurement.api.internal.IBundleReceiver;
import com.google.android.gms.measurement.api.internal.IEventHandlerProxy;
import com.google.android.gms.measurement.api.internal.IStringProvider;
import com.google.android.gms.measurement.api.internal.InitializationParams;
interface IAppMeasurementDynamiteService {
void initialize(in IObjectWrapper context, in InitializationParams params, long timestamp) = 0;
void logEvent(String str, String str2, in Bundle bundle, boolean z, boolean z2, long timestamp) = 1;
void logEventAndBundle(String str, String str2, in Bundle bundle, IBundleReceiver receiver, long j) = 2;
void setUserProperty(String str, String str2, in IObjectWrapper obj, boolean z, long j) = 3;
void getUserProperties(String str, String str2, boolean z, IBundleReceiver receiver) = 4;
void getMaxUserProperties(String str, IBundleReceiver receiver) = 5;
void setUserId(String str, long j) = 6;
void setConditionalUserProperty(in Bundle bundle, long j) = 7;
void clearConditionalUserProperty(String str, String str2, in Bundle bundle) = 8;
void getConditionalUserProperties(String str, String str2, IBundleReceiver receiver) = 9;
void setMeasurementEnabled(boolean z, long j) = 10;
void resetAnalyticsData(long j) = 11;
void setMinimumSessionDuration(long j) = 12;
void setSessionTimeoutDuration(long j) = 13;
void setCurrentScreen(in IObjectWrapper obj, String str, String str2, long j) = 14;
void getCurrentScreenName(IBundleReceiver receiver) = 15;
void getCurrentScreenClass(IBundleReceiver receiver) = 16;
void setInstanceIdProvider(IStringProvider provider) = 17;
void getCachedAppInstanceId(IBundleReceiver receiver) = 18;
void getAppInstanceId(IBundleReceiver receiver) = 19;
void getGmpAppId(IBundleReceiver receiver) = 20;
void generateEventId(IBundleReceiver receiver) = 21;
void beginAdUnitExposure(String str, long j) = 22;
void endAdUnitExposure(String str, long j) = 23;
void onActivityStarted(in IObjectWrapper activity, long j) = 24;
void onActivityStopped(in IObjectWrapper activity, long j) = 25;
void onActivityCreated(in IObjectWrapper activity, in Bundle bundle, long j) = 26;
void onActivityDestroyed(in IObjectWrapper activity, long j) = 27;
void onActivityPaused(in IObjectWrapper activity, long j) = 28;
void onActivityResumed(in IObjectWrapper activity, long j) = 29;
void onActivitySaveInstanceState(in IObjectWrapper activity, IBundleReceiver receiver, long j) = 30;
void performAction(in Bundle bundle, IBundleReceiver receiver, long j) = 31;
void logHealthData(int i, String str, in IObjectWrapper obj, in IObjectWrapper obj2, in IObjectWrapper obj3) = 32;
void setEventInterceptor(IEventHandlerProxy proxy) = 33;
void registerOnMeasurementEventListener(IEventHandlerProxy proxy) = 34;
void unregisterOnMeasurementEventListener(IEventHandlerProxy proxy) = 35;
void initForTests(in Map map) = 36;
void getTestFlag(IBundleReceiver receiver, int i) = 37;
void setDataCollectionEnabled(boolean z) = 38;
void isDataCollectionEnabled(IBundleReceiver receiver) = 39;
void setDefaultEventParameters(in Bundle bundle) = 41;
void setConsent(in Bundle bundle, long j) = 43;
void setConsentThirdParty(in Bundle bundle, long j) = 44;
void clearMeasurementEnabled(long j) = 42;
}

View File

@ -0,0 +1,5 @@
package com.google.android.gms.measurement.api.internal;
interface IBundleReceiver {
void onBundle(in Bundle bundle);
}

View File

@ -0,0 +1,6 @@
package com.google.android.gms.measurement.api.internal;
interface IEventHandlerProxy {
void f1(String s1, String s2, in Bundle bundle, long j) = 0;
int f2() = 1;
}

View File

@ -0,0 +1,4 @@
package com.google.android.gms.measurement.api.internal;
interface IStringProvider {
}

View File

@ -0,0 +1,3 @@
package com.google.android.gms.measurement.api.internal;
parcelable InitializationParams;

View File

@ -3,23 +3,25 @@ package com.google.android.gms.measurement.internal;
import com.google.android.gms.measurement.internal.AppMetadata; import com.google.android.gms.measurement.internal.AppMetadata;
import com.google.android.gms.measurement.internal.ConditionalUserPropertyParcel; import com.google.android.gms.measurement.internal.ConditionalUserPropertyParcel;
import com.google.android.gms.measurement.internal.EventParcel; import com.google.android.gms.measurement.internal.EventParcel;
import com.google.android.gms.measurement.internal.UserAttributeParcel;
interface IMeasurementService { interface IMeasurementService {
void f1(in EventParcel p0, in AppMetadata p1) = 0; void f1(in EventParcel event, in AppMetadata app) = 0;
// void zza(UserAttributeParcel p0, AppMetadata p1) = 1; void f2(in UserAttributeParcel attribute, in AppMetadata app) = 1;
void f4(in AppMetadata p0) = 3; void f4(in AppMetadata app) = 3;
// void zza(EventParcel p0, String p1, String p2) = 4; // void f5(in EventParcel p0, String p1, String p2) = 4;
// void zzb(AppMetadata p0) = 5; // void f6(in AppMetadata p0) = 5;
// List<UserAttributeParcel> zza(AppMetadata p0, boolean p1) = 6; // List<UserAttributeParcel> f7(in AppMetadata p0, boolean p1) = 6;
// byte[] zza(EventParcel p0, String p1) = 8; // byte[] f9(in EventParcel p0, String p1) = 8;
void f10(long p0, String p1, String p2, String p3) = 9; void f10(long p0, String p1, String p2, String p3) = 9;
String f11(in AppMetadata p0) = 10; String f11(in AppMetadata app) = 10;
void f12(in ConditionalUserPropertyParcel p0, in AppMetadata p1) = 11; void f12(in ConditionalUserPropertyParcel property, in AppMetadata app) = 11;
// void zza(ConditionalUserPropertyParcel p0) = 12; // void f13(ConditionalUserPropertyParcel p0) = 12;
// List<UserAttributeParcelzkr> zza(String p0, String p1, boolean p2, AppMetadata p3) = 13; // List<UserAttributeParcel> getUserProperties(String p0, String p1, boolean p2, in AppMetadata p3) = 13;
// List<UserAttributeParcel> zza(String p0, String p1, String p2, boolean p3) = 14; // List<UserAttributeParcel> getUserPropertiesAs(String p0, String p1, String p2, boolean p3) = 14;
// List<ConditionalUserPropertyParcel> zza(String p0, String p1, AppMetadata p2) = 15; // List<ConditionalUserPropertyParcel> getConditionalUserProperties(String p0, String p1, in AppMetadata p2) = 15;
// List<ConditionalUserPropertyParcel> zza(String p0, String p1, String p2) = 16; // List<ConditionalUserPropertyParcel> getCondtionalUserPropertiesAs(String p0, String p1, String p2) = 16;
// void zzd(AppMetadata p0) = 17; // void f18(in AppMetadata p0) = 17;
// void zza(Bundle p0, AppMetadata p1) = 18; void setDefaultEventParameters(in Bundle params, in AppMetadata app) = 18;
// void f20(in AppMetadata p0) = 19;
} }

View File

@ -4,5 +4,6 @@ import com.google.android.gms.phenotype.internal.IPhenotypeCallbacks;
interface IPhenotypeService { interface IPhenotypeService {
void register(IPhenotypeCallbacks callbacks, String p1, int p2, in String[] p3, in byte[] p4) = 0; void register(IPhenotypeCallbacks callbacks, String p1, int p2, in String[] p3, in byte[] p4) = 0;
void register2(IPhenotypeCallbacks callbacks, String p1, int p2, in String[] p3, in int[] p4, in byte[] p5) = 1;
void getConfigurationSnapshot(IPhenotypeCallbacks callbacks, String p1, String p2, String p3) = 10; void getConfigurationSnapshot(IPhenotypeCallbacks callbacks, String p1, String p2, String p3) = 10;
} }

View File

@ -1,8 +1,9 @@
package com.google.android.gms.playlog.internal; package com.google.android.gms.playlog.internal;
import com.google.android.gms.clearcut.internal.PlayLoggerContext;
import com.google.android.gms.playlog.internal.LogEvent; import com.google.android.gms.playlog.internal.LogEvent;
import com.google.android.gms.playlog.internal.PlayLoggerContext;
// Deprecated
interface IPlayLogService { interface IPlayLogService {
void onEvent(String packageName, in PlayLoggerContext context, in LogEvent event) = 1; void onEvent(String packageName, in PlayLoggerContext context, in LogEvent event) = 1;
void onMultiEvent(String packageName, in PlayLoggerContext context, in List<LogEvent> events) = 2; void onMultiEvent(String packageName, in PlayLoggerContext context, in List<LogEvent> events) = 2;

View File

@ -1,3 +0,0 @@
package com.google.android.gms.playlog.internal;
parcelable PlayLoggerContext;

View File

@ -0,0 +1,3 @@
package com.google.android.gms.usagereporting;
parcelable UsageReportingOptInOptions;

View File

@ -0,0 +1,11 @@
package com.google.android.gms.usagereporting.internal;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.usagereporting.UsageReportingOptInOptions;
interface IUsageReportingCallbacks {
oneway void onOptInOptions(in Status status, in UsageReportingOptInOptions options) = 1;
oneway void onOptInOptionsSet(in Status status) = 2;
oneway void onOptInOptionsChangedListenerAdded(in Status status) = 3;
oneway void onOptInOptionsChangedListenerRemoved(in Status status) = 4;
}

View File

@ -0,0 +1,5 @@
package com.google.android.gms.usagereporting.internal;
interface IUsageReportingOptInOptionsChangedListener {
oneway void onOptionsChanged() = 1;
}

View File

@ -0,0 +1,12 @@
package com.google.android.gms.usagereporting.internal;
import com.google.android.gms.usagereporting.internal.IUsageReportingCallbacks;
import com.google.android.gms.usagereporting.internal.IUsageReportingOptInOptionsChangedListener;
import com.google.android.gms.usagereporting.UsageReportingOptInOptions;
interface IUsageReportingService {
oneway void getOptInOptions(IUsageReportingCallbacks callbacks) = 1;
oneway void setOptInOptions(in UsageReportingOptInOptions options, IUsageReportingCallbacks callbacks) = 2;
oneway void addOptInOptionsChangedListener(IUsageReportingOptInOptionsChangedListener listener, IUsageReportingCallbacks callbacks) = 3;
oneway void removeOptInOptionsChangedListener(IUsageReportingOptInOptionsChangedListener listener, IUsageReportingCallbacks callbacks) = 4;
}

View File

@ -18,12 +18,12 @@ package com.google.android.gms.clearcut;
import android.util.Base64; import android.util.Base64;
import com.google.android.gms.clearcut.internal.LogVerifierResultParcelable;
import com.google.android.gms.phenotype.ExperimentToken; import com.google.android.gms.phenotype.ExperimentToken;
import com.google.android.gms.phenotype.GenericDimension; import com.google.android.gms.phenotype.GenericDimension;
import com.google.android.gms.playlog.internal.PlayLoggerContext; import com.google.android.gms.clearcut.internal.PlayLoggerContext;
import org.microg.safeparcel.AutoSafeParcelable; import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.CharBuffer; import java.nio.CharBuffer;
@ -62,6 +62,9 @@ public class LogEventParcelable extends AutoSafeParcelable {
@Field(10) @Field(10)
public final GenericDimension[] genericDimensions; public final GenericDimension[] genericDimensions;
@Field(11)
public final LogVerifierResultParcelable logVerifierResult;
private LogEventParcelable() { private LogEventParcelable() {
context = null; context = null;
bytes = null; bytes = null;
@ -71,6 +74,7 @@ public class LogEventParcelable extends AutoSafeParcelable {
addPhenotypeExperimentTokens = false; addPhenotypeExperimentTokens = false;
experimentTokenParcelables = null; experimentTokenParcelables = null;
genericDimensions = null; genericDimensions = null;
logVerifierResult = null;
} }
public LogEventParcelable(PlayLoggerContext context, byte[] bytes, int[] testCodes, String[] mendelPackages, int[] experimentIds, byte[][] experimentTokens, boolean addPhenotypeExperimentTokens) { public LogEventParcelable(PlayLoggerContext context, byte[] bytes, int[] testCodes, String[] mendelPackages, int[] experimentIds, byte[][] experimentTokens, boolean addPhenotypeExperimentTokens) {
@ -83,6 +87,7 @@ public class LogEventParcelable extends AutoSafeParcelable {
this.addPhenotypeExperimentTokens = addPhenotypeExperimentTokens; this.addPhenotypeExperimentTokens = addPhenotypeExperimentTokens;
this.experimentTokenParcelables = null; this.experimentTokenParcelables = null;
this.genericDimensions = null; this.genericDimensions = null;
this.logVerifierResult = null;
} }
@Override @Override

View File

@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: 2022 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.clearcut.internal;
import org.microg.safeparcel.AutoSafeParcelable;
public class LogVerifierResultParcelable extends AutoSafeParcelable {
@Field(1)
public boolean b;
public static final Creator<LogVerifierResultParcelable> CREATOR = new AutoCreator<>(LogVerifierResultParcelable.class);
}

View File

@ -1,23 +1,11 @@
/* /*
* Copyright (C) 2013-2017 microG Project Team * SPDX-FileCopyrightText: 2022 microG Project Team
* * SPDX-License-Identifier: Apache-2.0
* 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.playlog.internal; package com.google.android.gms.clearcut.internal;
import org.microg.safeparcel.AutoSafeParcelable; import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class PlayLoggerContext extends AutoSafeParcelable { public class PlayLoggerContext extends AutoSafeParcelable {
@ -33,9 +21,6 @@ public class PlayLoggerContext extends AutoSafeParcelable {
@Field(4) @Field(4)
public final int logSource; public final int logSource;
@Field(8)
public final String logSourceName;
@Field(5) @Field(5)
public final String uploadAccount; public final String uploadAccount;
@ -45,6 +30,9 @@ public class PlayLoggerContext extends AutoSafeParcelable {
@Field(7) @Field(7)
public final boolean logAndroidId; public final boolean logAndroidId;
@Field(8)
public final String logSourceName;
@Field(9) @Field(9)
public final boolean isAnonymous; public final boolean isAnonymous;
@ -57,13 +45,16 @@ public class PlayLoggerContext extends AutoSafeParcelable {
@Field(12) @Field(12)
public final boolean scrubMccMnc; public final boolean scrubMccMnc;
@Field(13)
public final Integer piiLevelset;
private PlayLoggerContext() { private PlayLoggerContext() {
packageName = uploadAccount = logSourceName = loggingId = null; packageName = uploadAccount = logSourceName = loggingId = null;
qosTier = packageVersionCode = logSource = appMobileSpecId = -1; qosTier = packageVersionCode = logSource = appMobileSpecId = piiLevelset = -1;
isAnonymous = logAndroidId = scrubMccMnc = false; isAnonymous = logAndroidId = scrubMccMnc = false;
} }
public PlayLoggerContext(String packageName, int packageVersionCode, int logSource, String logSourceName, String uploadAccount, String loggingId, boolean isAnonymous, int qosTier, boolean scrubMccMnc) { public PlayLoggerContext(String packageName, int packageVersionCode, int logSource, String logSourceName, String uploadAccount, String loggingId, boolean isAnonymous, int qosTier, boolean scrubMccMnc, int piiLevelset) {
this.packageName = packageName; this.packageName = packageName;
this.packageVersionCode = packageVersionCode; this.packageVersionCode = packageVersionCode;
this.logSource = logSource; this.logSource = logSource;
@ -75,6 +66,7 @@ public class PlayLoggerContext extends AutoSafeParcelable {
this.qosTier = qosTier; this.qosTier = qosTier;
this.appMobileSpecId = null; this.appMobileSpecId = null;
this.scrubMccMnc = scrubMccMnc; this.scrubMccMnc = scrubMccMnc;
this.piiLevelset = piiLevelset;
} }
@Override @Override
@ -89,6 +81,9 @@ public class PlayLoggerContext extends AutoSafeParcelable {
sb.append(", logSourceName=").append(logSourceName); sb.append(", logSourceName=").append(logSourceName);
sb.append(", isAnonymous=").append(isAnonymous); sb.append(", isAnonymous=").append(isAnonymous);
sb.append(", qosTier=").append(qosTier); sb.append(", qosTier=").append(qosTier);
sb.append(", appMobileSpecId=").append(appMobileSpecId);
sb.append(", scrubMccMnc=").append(scrubMccMnc);
sb.append(", piiLevelset=").append(piiLevelset);
sb.append(']'); sb.append(']');
return sb.toString(); return sb.toString();
} }

View File

@ -0,0 +1,45 @@
/*
* SPDX-FileCopyrightText: 2022 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.measurement.api.internal;
import android.os.Bundle;
import org.microg.safeparcel.AutoSafeParcelable;
public class InitializationParams extends AutoSafeParcelable {
@Field(1)
public long field1;
@Field(2)
public long field2;
@Field(3)
public boolean field3;
@Field(4)
public String field4;
@Field(5)
public String field5;
@Field(6)
public String field6;
@Field(7)
public Bundle field7;
@Field(8)
public String field8;
@Override
public String toString() {
return "InitializationParams{" +
"field1=" + field1 +
", field2=" + field2 +
", field3=" + field3 +
", field4='" + field4 + '\'' +
", field5='" + field5 + '\'' +
", field6='" + field6 + '\'' +
", field7=" + field7 +
", field8='" + field8 + '\'' +
'}';
}
public static final Creator<InitializationParams> CREATOR = new AutoCreator<>(InitializationParams.class);
}

View File

@ -57,5 +57,9 @@ public class AppMetadata extends AutoSafeParcelable {
@Field(25) @Field(25)
private String field25; private String field25;
public String toString() {
return "AppMetadata[" + packageName + "]";
}
public static final Creator<AppMetadata> CREATOR = new AutoCreator<>(AppMetadata.class); public static final Creator<AppMetadata> CREATOR = new AutoCreator<>(AppMetadata.class);
} }

View File

@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2020, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.measurement.internal;
import android.os.Bundle;
import org.microg.safeparcel.AutoSafeParcelable;
public class EventParams extends AutoSafeParcelable {
@Field(2)
public Bundle data;
public static final Creator<EventParams> CREATOR = new AutoCreator<>(EventParams.class);
}

View File

@ -8,5 +8,14 @@ package com.google.android.gms.measurement.internal;
import org.microg.safeparcel.AutoSafeParcelable; import org.microg.safeparcel.AutoSafeParcelable;
public class EventParcel extends AutoSafeParcelable { public class EventParcel extends AutoSafeParcelable {
@Field(2)
public String name;
@Field(3)
public EventParams params;
@Field(4)
public String origin;
@Field(5)
public long timestamp;
public static final Creator<EventParcel> CREATOR = new AutoCreator<>(EventParcel.class); public static final Creator<EventParcel> CREATOR = new AutoCreator<>(EventParcel.class);
} }

View File

@ -8,5 +8,20 @@ package com.google.android.gms.measurement.internal;
import org.microg.safeparcel.AutoSafeParcelable; import org.microg.safeparcel.AutoSafeParcelable;
public class UserAttributeParcel extends AutoSafeParcelable { public class UserAttributeParcel extends AutoSafeParcelable {
@Field(1)
public int field1;
@Field(2)
public String name;
@Field(3)
public long timestamp;
@Field(4)
public Long field4;
@Field(6)
public String field6;
@Field(7)
public String field7;
@Field(8)
public Double field8;
public static final Creator<UserAttributeParcel> CREATOR = new AutoCreator<>(UserAttributeParcel.class); public static final Creator<UserAttributeParcel> CREATOR = new AutoCreator<>(UserAttributeParcel.class);
} }

View File

@ -21,6 +21,7 @@ import org.microg.safeparcel.SafeParceled;
import java.util.Date; import java.util.Date;
@Deprecated
public class LogEvent extends AutoSafeParcelable { public class LogEvent extends AutoSafeParcelable {
@SafeParceled(1) @SafeParceled(1)

View File

@ -0,0 +1,15 @@
/*
* SPDX-FileCopyrightText: 2022 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.usagereporting;
import org.microg.safeparcel.AutoSafeParcelable;
public class UsageReportingOptInOptions extends AutoSafeParcelable {
@Field(2)
public int optInUsageReporting;
public static final Creator<UsageReportingOptInOptions> CREATOR = new AutoCreator<>(UsageReportingOptInOptions.class);
}

View File

@ -112,15 +112,15 @@
<application <application
android:allowBackup="true" android:allowBackup="true"
android:fullBackupOnly="true"
android:extractNativeLibs="false" android:extractNativeLibs="false"
android:forceQueryable="true" android:forceQueryable="true"
android:multiArch="true" android:fullBackupOnly="true"
android:icon="@mipmap/ic_core_service_app" android:icon="@mipmap/ic_core_service_app"
android:label="@string/gms_app_name" android:label="@string/gms_app_name"
android:multiArch="true"
android:theme="@style/Theme.AppCompat.DayNight"> android:theme="@style/Theme.AppCompat.DayNight">
<library android:name="com.google.android.gms"/> <library android:name="com.google.android.gms" />
<meta-data <meta-data
android:name="fake-signature" android:name="fake-signature"
@ -297,20 +297,6 @@
</intent-filter> </intent-filter>
</receiver> </receiver>
<!-- DroidGuard / SafetyNet / reCAPTCHA -->
<service android:name="org.microg.gms.safetynet.SafetyNetClientService">
<intent-filter>
<action android:name="com.google.android.gms.safetynet.service.START" />
</intent-filter>
</service>
<receiver android:name="org.microg.gms.safetynet.ServiceInfoReceiver" />
<!-- TODO: Should be in :ui process and contact DroidGuardService instead of directly invoking droidguard -->
<activity
android:name="org.microg.gms.recaptcha.ReCaptchaActivity"
android:theme="@style/Theme.AppCompat.Light.Dialog.NoActionBar" />
<!-- Car --> <!-- Car -->
<service android:name="org.microg.gms.car.CarService"> <service android:name="org.microg.gms.car.CarService">
@ -415,7 +401,7 @@
android:exported="true" /> android:exported="true" />
<activity <activity
android:name="org.microg.gms.auth.CredentialPickerActivity" android:name="org.microg.gms.auth.credentials.CredentialPickerActivity"
android:process=":ui"> android:process=":ui">
<intent-filter> <intent-filter>
<action android:name="com.google.android.gms.auth.api.credentials.PICKER" /> <action android:name="com.google.android.gms.auth.api.credentials.PICKER" />
@ -423,12 +409,24 @@
</intent-filter> </intent-filter>
</activity> </activity>
<service android:name="org.microg.gms.auth.CredentialsService"> <service android:name="org.microg.gms.auth.credentials.CredentialsService">
<intent-filter> <intent-filter>
<action android:name="com.google.android.gms.auth.api.credentials.service.START" /> <action android:name="com.google.android.gms.auth.api.credentials.service.START" />
</intent-filter> </intent-filter>
</service> </service>
<service android:name="org.microg.gms.auth.proxy.AuthProxyService">
<intent-filter>
<action android:name="com.google.android.gms.auth.service.START" />
</intent-filter>
</service>
<service android:name="org.microg.gms.auth.appcert.AppCertService">
<intent-filter>
<action android:name="com.google.android.gms.auth.be.appcert.AppCertService" />
</intent-filter>
</service>
<!-- Games --> <!-- Games -->
<service android:name="org.microg.gms.games.GamesStubService"> <service android:name="org.microg.gms.games.GamesStubService">
@ -466,7 +464,7 @@
<provider <provider
android:name="org.microg.gms.fonts.FontsProvider" android:name="org.microg.gms.fonts.FontsProvider"
android:authorities="com.google.android.gms.fonts" android:authorities="com.google.android.gms.fonts"
android:exported="true"/> android:exported="true" />
<!-- microG Settings shown in Launcher --> <!-- microG Settings shown in Launcher -->
<activity <activity
@ -474,7 +472,8 @@
android:icon="@mipmap/ic_microg_settings" android:icon="@mipmap/ic_microg_settings"
android:label="@string/gms_settings_name" android:label="@string/gms_settings_name"
android:process=":ui" android:process=":ui"
android:roundIcon="@mipmap/ic_microg_settings"> android:roundIcon="@mipmap/ic_microg_settings"
android:taskAffinity="org.microg.gms.settings">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.VIEW" />
<data <data
@ -499,7 +498,8 @@
android:icon="@mipmap/ic_microg_settings" android:icon="@mipmap/ic_microg_settings"
android:label="Legacy microG Settings" android:label="Legacy microG Settings"
android:process=":ui" android:process=":ui"
android:roundIcon="@mipmap/ic_microg_settings" /> android:roundIcon="@mipmap/ic_microg_settings"
android:taskAffinity="org.microg.gms.settings" />
<!-- microG Settings embedded in System Settings on SDK 23 and newer --> <!-- microG Settings embedded in System Settings on SDK 23 and newer -->
<activity-alias <activity-alias
@ -507,7 +507,8 @@
android:icon="@drawable/microg_light_color_24" android:icon="@drawable/microg_light_color_24"
android:label="@string/gms_settings_name" android:label="@string/gms_settings_name"
android:process=":ui" android:process=":ui"
android:targetActivity="org.microg.gms.ui.SettingsActivity"> android:targetActivity="org.microg.gms.ui.SettingsActivity"
android:taskAffinity="org.microg.gms.settings">
<intent-filter> <intent-filter>
<action android:name="com.android.settings.action.EXTRA_SETTINGS" /> <action android:name="com.android.settings.action.EXTRA_SETTINGS" />
</intent-filter> </intent-filter>
@ -532,26 +533,25 @@
<activity <activity
android:name="org.microg.gms.ui.AboutFragment$AsActivity" android:name="org.microg.gms.ui.AboutFragment$AsActivity"
android:label="@string/pref_about_title" android:label="@string/pref_about_title"
android:process=":ui" /> android:process=":ui"
android:taskAffinity="org.microg.gms.settings" />
<activity <activity
android:name="org.microg.gms.ui.GoogleMoreFragment$AsActivity" android:name="org.microg.gms.ui.GoogleMoreFragment$AsActivity"
android:label="@string/gms_settings_name" android:label="@string/gms_settings_name"
android:process=":ui" /> android:process=":ui"
android:taskAffinity="org.microg.gms.settings" />
<activity
android:name="org.microg.gms.ui.SafetyNetAdvancedFragment$AsActivity"
android:label="@string/service_name_snet"
android:process=":ui" />
<activity <activity
android:name="org.microg.gms.ui.SelfCheckFragment$AsActivity" android:name="org.microg.gms.ui.SelfCheckFragment$AsActivity"
android:label="@string/self_check_title" android:label="@string/self_check_title"
android:process=":ui" /> android:process=":ui"
android:taskAffinity="org.microg.gms.settings" />
<activity <activity
android:name="org.microg.gms.ui.AccountSettingsActivity" android:name="org.microg.gms.ui.AccountSettingsActivity"
android:process=":ui"> android:process=":ui"
android:taskAffinity="org.microg.gms.settings">
<intent-filter> <intent-filter>
<action android:name="com.google.android.gms.accountsettings.ACCOUNT_PREFERENCES_SETTINGS" /> <action android:name="com.google.android.gms.accountsettings.ACCOUNT_PREFERENCES_SETTINGS" />
<action android:name="com.google.android.gms.accountsettings.PRIVACY_SETTINGS" /> <action android:name="com.google.android.gms.accountsettings.PRIVACY_SETTINGS" />
@ -564,7 +564,8 @@
<activity <activity
android:name="org.microg.gms.ui.LocationSettingsActivity" android:name="org.microg.gms.ui.LocationSettingsActivity"
android:process=":ui"> android:process=":ui"
android:taskAffinity="org.microg.gms.settings">
<intent-filter> <intent-filter>
<action android:name="com.google.android.gms.location.settings.LOCATION_HISTORY" /> <action android:name="com.google.android.gms.location.settings.LOCATION_HISTORY" />
<action android:name="com.google.android.location.settings.LOCATION_REPORTING_SETTINGS" /> <action android:name="com.google.android.location.settings.LOCATION_REPORTING_SETTINGS" />
@ -590,7 +591,7 @@
<!-- Other --> <!-- Other -->
<service <service
android:name="org.microg.gms.measurement.MeasurementBrokerService" android:name="org.microg.gms.measurement.MeasurementService"
android:exported="true"> android:exported="true">
<intent-filter> <intent-filter>
<action android:name="com.google.android.gms.measurement.START" /> <action android:name="com.google.android.gms.measurement.START" />
@ -705,37 +706,173 @@
</intent-filter> </intent-filter>
</service> </service>
<service android:name="org.microg.gms.usagereporting.UsageReportingService">
<intent-filter>
<action android:name="com.google.android.gms.usagereporting.service.START" />
</intent-filter>
</service>
<service android:name="org.microg.gms.DummyService"> <service android:name="org.microg.gms.DummyService">
<intent-filter> <intent-filter>
<action android:name="com.google.android.gms.plus.service.START" />
<action android:name="com.google.android.gms.plus.service.internal.START" />
<action android:name="com.google.android.gms.panorama.service.START" />
<action android:name="com.google.android.gms.appstate.service.START" />
<action android:name="com.google.android.gms.ads.service.START" />
<action android:name="com.google.android.gms.accounts.ACCOUNT_SERVICE" />
<action android:name="com.google.android.gms.identity.service.BIND" />
<action android:name="com.google.android.gms.wearable.BIND" />
<action android:name="com.google.android.gms.auth.service.START" />
<action android:name="com.google.android.gms.fitness.GoogleFitnessService.START" />
<action android:name="com.google.android.gms.deviceconnection.service.START" />
<action android:name="com.google.android.gms.droidguard.service.START" />
<action android:name="com.google.android.gms.lockbox.service.START" />
<action android:name="com.google.android.gms.cast_mirroring.service.START" />
<action android:name="com.google.android.gms.photos.autobackup.service.START" />
<action android:name="com.google.android.gms.udc.service.START" />
<action android:name="com.google.android.gms.mdm.services.DeviceManagerApiService.START" />
<action android:name="com.google.android.gms.pseudonymous.service.START" />
<action android:name="com.google.android.gms.common.service.START" />
<action android:name="com.google.android.gms.usagereporting.service.START" />
<action android:name="com.google.android.gms.kids.service.START" />
<action android:name="com.google.android.gms.common.download.START" />
<action android:name="com.google.android.contextmanager.service.ContextManagerService.START" /> <action android:name="com.google.android.contextmanager.service.ContextManagerService.START" />
<action android:name="com.google.android.gms.accounts.ACCOUNT_SERVICE" />
<action android:name="com.google.android.gms.ads.identifier.service.EVENT_ATTESTATION" />
<action android:name="com.google.android.gms.ads.service.CACHE" />
<action android:name="com.google.android.gms.ads.service.CONSENT_LOOKUP" />
<action android:name="com.google.android.gms.ads.service.HTTP" />
<action android:name="com.google.android.gms.ads.service.START" />
<action android:name="com.google.android.gms.appstate.service.START" />
<action android:name="com.google.android.gms.appusage.service.START" />
<action android:name="com.google.android.gms.asterism.service.START" />
<action android:name="com.google.android.gms.audiomodem.service.AudioModemService.START" /> <action android:name="com.google.android.gms.audiomodem.service.AudioModemService.START" />
<action android:name="com.google.android.gms.nearby.sharing.service.NearbySharingService.START" />
<action android:name="com.google.android.gms.herrevad.services.LightweightNetworkQualityAndroidService.START" />
<action android:name="com.google.android.gms.gass.START" />
<action android:name="com.google.android.gms.audit.service.START" /> <action android:name="com.google.android.gms.audit.service.START" />
<action android:name="com.google.android.gms.auth.account.authapi.START" />
<action android:name="com.google.android.gms.auth.account.authenticator.auto.service.START" />
<action android:name="com.google.android.gms.auth.account.authenticator.chromeos.START" />
<action android:name="com.google.android.gms.auth.account.authenticator.tv.service.START" />
<action android:name="com.google.android.gms.auth.account.data.service.START" />
<action android:name="com.google.android.gms.auth.api.identity.service.authorization.START" />
<action android:name="com.google.android.gms.auth.api.identity.service.credentialsaving.START" />
<action android:name="com.google.android.gms.auth.api.identity.service.signin.START" />
<action android:name="com.google.android.gms.auth.api.phone.service.InternalService.START" />
<action android:name="com.google.android.gms.auth.api.signin.service.START" />
<action android:name="com.google.android.gms.auth.config.service.START" />
<action android:name="com.google.android.gms.auth.cryptauth.cryptauthservice.START" />
<action android:name="com.google.android.gms.auth.proximity.devicesyncservice.START" />
<action android:name="com.google.android.gms.auth.proximity.securechannelservice.START" />
<action android:name="com.google.android.gms.auth.proximity.START" />
<action android:name="com.google.android.gms.auth.service.START" />
<action android:name="com.google.android.gms.backup.G1_BACKUP" />
<action android:name="com.google.android.gms.backup.G1_RESTORE" />
<action android:name="com.google.android.gms.backup.GMS_MODULE_RESTORE" />
<action android:name="com.google.android.gms.beacon.internal.IBleService.START" />
<action android:name="com.google.android.gms.carrierauth.service.START" />
<action android:name="com.google.android.gms.cast.firstparty.START" />
<action android:name="com.google.android.gms.cast_mirroring.service.START" />
<action android:name="com.google.android.gms.cast.remote_display.service.START" />
<action android:name="com.google.android.gms.chromesync.service.START" />
<action android:name="com.google.android.gms.common.download.START" />
<action android:name="com.google.android.gms.common.service.START" />
<action android:name="com.google.android.gms.common.telemetry.service.START" />
<action android:name="com.google.android.gms.config.START" />
<action android:name="com.google.android.gms.constellation.service.START" />
<action android:name="com.google.android.gms.deviceconnection.service.START" />
<action android:name="com.google.android.gms.enterprise.loader.service.START" />
<action android:name="com.google.android.gms.facs.internal.service.START" />
<action android:name="com.google.android.gms.fido.credentialstore.internal_service.START" />
<action android:name="com.google.android.gms.fido.fido2.privileged.START" />
<action android:name="com.google.android.gms.fido.fido2.regular.START" />
<action android:name="com.google.android.gms.fido.fido2.zeroparty.START" />
<action android:name="com.google.android.gms.fido.sourcedevice.service.START" />
<action android:name="com.google.android.gms.fido.targetdevice.internal_service.START" />
<action android:name="com.google.android.gms.fido.u2f.privileged.START" />
<action android:name="com.google.android.gms.fido.u2f.thirdparty.START" />
<action android:name="com.google.android.gms.fido.u2f.zeroparty.START" />
<action android:name="com.google.android.gms.fitness.BleApi" />
<action android:name="com.google.android.gms.fitness.ConfigApi" />
<action android:name="com.google.android.gms.fitness.GoalsApi" />
<action android:name="com.google.android.gms.fitness.GoogleFitnessService.START" />
<action android:name="com.google.android.gms.fitness.HistoryApi" />
<action android:name="com.google.android.gms.fitness.InternalApi" />
<action android:name="com.google.android.gms.fitness.RecordingApi" />
<action android:name="com.google.android.gms.fitness.SensorsApi" />
<action android:name="com.google.android.gms.fitness.SessionsApi" />
<action android:name="com.google.android.gms.fonts.service.START" />
<action android:name="com.google.android.gms.freighter.service.START" />
<action android:name="com.google.android.gms.gass.START" />
<action android:name="com.google.android.gms.growth.service.START" />
<action android:name="com.google.android.gms.gmscompliance.service.START" />
<action android:name="com.google.android.gms.googlehelp.service.GoogleHelpService.START" />
<action android:name="com.google.android.gms.herrevad.services.LightweightNetworkQualityAndroidService.START" />
<action android:name="com.google.android.gms.identity.service.BIND" />
<action android:name="com.google.android.gms.instantapps.START" />
<action android:name="com.google.android.gms.kids.service.START" />
<action android:name="com.google.android.gms.languageprofile.service.START" />
<action android:name="com.google.android.gms.learning.internal.dynamitesupport.START" />
<action android:name="com.google.android.gms.learning.intservice.START" />
<action android:name="com.google.android.gms.learning.predictor.START" />
<action android:name="com.google.android.gms.learning.trainer.START" />
<action android:name="com.google.android.gms.learning.training.background.START" />
<action android:name="com.google.android.gms.locationsharing.api.START" />
<action android:name="com.google.android.gms.locationsharingreporter.service.START" />
<action android:name="com.google.android.gms.lockbox.service.START" />
<action android:name="com.google.android.gms.matchstick.lighter.service.START" />
<action android:name="com.google.android.gms.mdm.services.DeviceManagerApiService.START" />
<action android:name="com.google.android.gms.mdns.service.START" />
<action android:name="com.google.android.gms.nearby.bootstrap.service.NearbyBootstrapService.START" />
<action android:name="com.google.android.gms.nearby.connection.service.START" />
<action android:name="com.google.android.gms.nearby.fastpair.START" />
<action android:name="com.google.android.gms.nearby.messages.service.NearbyMessagesService.START" />
<action android:name="com.google.android.gms.nearby.sharing.service.NearbySharingService.START" />
<action android:name="com.google.android.gms.nearby.sharing.START_SERVICE" />
<action android:name="com.google.android.gms.notifications.service.START" />
<action android:name="com.google.android.gms.ocr.service.internal.START" />
<action android:name="com.google.android.gms.ocr.service.START" />
<action android:name="com.google.android.gms.panorama.service.START" />
<action android:name="com.google.android.gms.pay.service.BIND" />
<action android:name="com.google.android.gms.payse.service.BIND" />
<action android:name="com.google.android.gms.people.contactssync.service.START" />
<action android:name="com.google.android.gms.photos.autobackup.service.START" />
<action android:name="com.google.android.gms.plus.service.default.INTENT" />
<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.pseudonymous.service.START" />
<action android:name="com.google.android.gms.rcs.START" />
<action android:name="com.google.android.gms.recaptcha.service.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" />
<action android:name="com.google.android.gms.semanticlocation.service.START_ODLH" />
<action android:name="com.google.android.gms.sesame.service.BIND" />
<action android:name="com.google.android.gms.telephonyspam.service.START" />
<action android:name="com.google.android.gms.testsupport.service.START" />
<action android:name="com.google.android.gms.scheduler.ACTION_PROXY_SCHEDULE" />
<action android:name="com.google.android.gms.setup.auth.SecondDeviceAuth.START" />
<action android:name="com.google.android.gms.smartdevice.d2d.SourceDeviceService.START" />
<action android:name="com.google.android.gms.smartdevice.d2d.TargetDeviceService.START" />
<action android:name="com.google.android.gms.smartdevice.directtransfer.SourceDirectTransferService.START" />
<action android:name="com.google.android.gms.smartdevice.directtransfer.TargetDirectTransferService.START" />
<action android:name="com.google.android.gms.smartdevice.postsetup.PostSetupService.START" />
<action android:name="com.google.android.gms.smartdevice.setup.accounts.AccountsService.START" />
<action android:name="com.google.android.gms.smartdevice.wifi.START_WIFI_HELPER_SERVICE" />
<action android:name="com.google.android.gms.social.location.activity.service.START" />
<action android:name="com.google.android.gms.statementservice.EXECUTE" />
<action android:name="com.google.android.gms.stats.ACTION_UPLOAD_DROPBOX_ENTRIES" />
<action android:name="com.google.android.gms.speech.service.START" />
<action android:name="com.google.android.gms.thunderbird.service.START" />
<action android:name="com.google.android.gms.trustagent.BridgeApi.START" />
<action android:name="com.google.android.gms.trustagent.StateApi.START" />
<action android:name="com.google.android.gms.trustagent.trustlet.trustletmanagerservice.BIND" />
<action android:name="com.google.android.gms.trustlet.bluetooth.service.BIND" />
<action android:name="com.google.android.gms.trustlet.connectionlessble.service.BIND" />
<action android:name="com.google.android.gms.trustlet.face.service.BIND" />
<action android:name="com.google.android.gms.trustlet.nfc.service.BIND" />
<action android:name="com.google.android.gms.trustlet.onbody.service.BIND" />
<action android:name="com.google.android.gms.trustlet.place.service.BIND" />
<action android:name="com.google.android.gms.trustlet.voiceunlock.service.BIND" />
<action android:name="com.google.android.gms.udc.service.START" />
<action android:name="com.google.android.gms.update.START_API_SERVICE" />
<action android:name="com.google.android.gms.update.START_SERVICE" />
<action android:name="com.google.android.gms.update.START_SINGLE_USER_API_SERVICE" />
<action android:name="com.google.android.gms.update.START_TV_API_SERVICE" />
<action android:name="com.google.android.gms.userlocation.service.START" />
<action android:name="com.google.android.gms.vehicle.cabin.service.START" />
<action android:name="com.google.android.gms.vehicle.climate.service.START" />
<action android:name="com.google.android.gms.vehicle.info.service.START" />
<action android:name="com.google.android.gms.walletp2p.service.firstparty.BIND" />
<action android:name="com.google.android.gms.walletp2p.service.zeroparty.BIND" />
<action android:name="com.google.android.gms.wearable.BIND" />
<action android:name="com.google.android.gms.wearable.DATA_CHANGED" />
<action android:name="com.google.android.gms.wearable.NODE_CHANGED" />
<action android:name="com.google.android.mdd.service.START" />
<action android:name="com.google.android.mdh.service.START" />
<action android:name="com.google.android.mdh.service.listener.START" />
<action android:name="com.google.android.mobstore.service.START" /> <action android:name="com.google.android.mobstore.service.START" />
<action
android:name="com.google.android.gms.wearable.BIND_LISTENER"
tools:ignore="WearableBindListener" />
</intent-filter> </intent-filter>
</service> </service>
</application> </application>

View File

@ -0,0 +1,22 @@
/*
* Copyright (C) 2013-2017 microG 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.dynamite.descriptors.com.google.android.gms.measurement.dynamite;
public class ModuleDescriptor {
public static final String MODULE_ID = "com.google.android.gms.measurement.dynamite";
public static final int MODULE_VERSION = 53;
}

View File

@ -1,38 +0,0 @@
/*
* Copyright (C) 2013-2017 microG 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 org.microg.gms.clearcut;
import android.os.RemoteException;
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;
public class ClearcutLoggerService extends BaseService {
private ClearcutLoggerServiceImpl clearcutService = new ClearcutLoggerServiceImpl();
public ClearcutLoggerService() {
super("GmsClearcutSvc", GmsService.CLEARCUT_LOGGER);
}
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
callback.onPostInitComplete(0, clearcutService.asBinder(), null);
}
}

View File

@ -1,38 +0,0 @@
/*
* Copyright (C) 2013-2017 microG 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 org.microg.gms.clearcut;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.clearcut.LogEventParcelable;
import com.google.android.gms.clearcut.internal.IClearcutLoggerCallbacks;
import com.google.android.gms.clearcut.internal.IClearcutLoggerService;
import com.google.android.gms.common.api.Status;
public class ClearcutLoggerServiceImpl extends IClearcutLoggerService.Stub {
private static final String TAG = "GmsClearcutLogSvcImpl";
@Override
public void log(IClearcutLoggerCallbacks callbacks, LogEventParcelable event) throws RemoteException {
// These logs are not really helpful for us, so let's just ignore it.
try {
callbacks.onStatus(Status.SUCCESS);
} catch (Exception ignored) {
}
}
}

View File

@ -1,39 +0,0 @@
/*
* Copyright (C) 2018 microG 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 org.microg.gms.measurement;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.common.api.CommonStatusCodes;
import com.google.android.gms.common.api.Status;
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;
public class MeasurementBrokerService extends BaseService {
public MeasurementBrokerService() {
super("GmsMeasureBrokerSvc", GmsService.MEASUREMENT);
}
@Override
public void handleServiceRequest(IGmsCallbacks callback, GetServiceRequest request, GmsService service) throws RemoteException {
callback.onPostInitComplete(CommonStatusCodes.SUCCESS, new MeasurementServiceImpl().asBinder(), null);
}
}

View File

@ -1,63 +0,0 @@
/*
* Copyright (C) 2018 microG 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 org.microg.gms.measurement;
import android.os.Parcel;
import android.os.RemoteException;
import android.util.Log;
import com.google.android.gms.measurement.internal.AppMetadata;
import com.google.android.gms.measurement.internal.ConditionalUserPropertyParcel;
import com.google.android.gms.measurement.internal.EventParcel;
import com.google.android.gms.measurement.internal.IMeasurementService;
public class MeasurementServiceImpl extends IMeasurementService.Stub {
private static final String TAG = "GmsMeasureSvcImpl";
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags) throws RemoteException {
if (super.onTransact(code, data, reply, flags)) return true;
Log.d(TAG, "onTransact [unknown]: " + code + ", " + data + ", " + flags);
return false;
}
@Override
public void f1(EventParcel p0, AppMetadata p1) throws RemoteException {
Log.d(TAG, "f1: " + p1.packageName);
}
@Override
public void f4(AppMetadata p0) throws RemoteException {
Log.d(TAG, "f4: " + p0.packageName);
}
@Override
public void f10(long p0, String p1, String p2, String p3) throws RemoteException {
Log.d(TAG, "f10: " + p1);
}
@Override
public String f11(AppMetadata p0) throws RemoteException {
Log.d(TAG, "f11: " + p0.packageName);
return null;
}
@Override
public void f12(ConditionalUserPropertyParcel p0, AppMetadata p1) throws RemoteException {
Log.d(TAG, "f12: " + p1.packageName);
}
}

View File

@ -24,6 +24,7 @@ import com.google.android.gms.common.internal.IGmsCallbacks;
import org.microg.gms.BaseService; import org.microg.gms.BaseService;
import org.microg.gms.common.GmsService; import org.microg.gms.common.GmsService;
@Deprecated
public class PlayLogService extends BaseService { public class PlayLogService extends BaseService {
private PlayLogServiceImpl playLogService = new PlayLogServiceImpl(); private PlayLogServiceImpl playLogService = new PlayLogServiceImpl();

View File

@ -22,10 +22,11 @@ import android.util.Log;
import com.google.android.gms.playlog.internal.IPlayLogService; import com.google.android.gms.playlog.internal.IPlayLogService;
import com.google.android.gms.playlog.internal.LogEvent; import com.google.android.gms.playlog.internal.LogEvent;
import com.google.android.gms.playlog.internal.PlayLoggerContext; import com.google.android.gms.clearcut.internal.PlayLoggerContext;
import java.util.List; import java.util.List;
@Deprecated
public class PlayLogServiceImpl extends IPlayLogService.Stub { public class PlayLogServiceImpl extends IPlayLogService.Stub {
private static final String TAG = "GmsPlayLogSvcImpl"; private static final String TAG = "GmsPlayLogSvcImpl";

View File

@ -0,0 +1,198 @@
/*
* SPDX-FileCopyrightText: 2022 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.measurement.internal
import android.os.Bundle
import android.os.Parcelable
import android.util.Log
import com.google.android.gms.dynamic.IObjectWrapper
import com.google.android.gms.measurement.api.internal.*
private const val TAG = "AppMeasurementService"
class AppMeasurementDynamiteService : IAppMeasurementDynamiteService.Stub() {
override fun initialize(context: IObjectWrapper?, params: InitializationParams?, timestamp: Long) {
Log.d(TAG, "Not yet implemented: initialize")
}
override fun logEvent(str: String?, str2: String?, bundle: Bundle?, z: Boolean, z2: Boolean, timestamp: Long) {
Log.d(TAG, "Not yet implemented: logEvent")
}
override fun logEventAndBundle(str: String?, str2: String?, bundle: Bundle?, receiver: IBundleReceiver?, j: Long) {
Log.d(TAG, "Not yet implemented: logEventAndBundle")
receiver?.onBundle(Bundle().apply { putByteArray("r", ByteArray(0)) })
}
override fun setUserProperty(str: String?, str2: String?, obj: IObjectWrapper?, z: Boolean, j: Long) {
Log.d(TAG, "Not yet implemented: setUserProperty")
}
override fun getUserProperties(str: String?, str2: String?, z: Boolean, receiver: IBundleReceiver?) {
Log.d(TAG, "Not yet implemented: getUserProperties")
receiver?.onBundle(Bundle())
}
override fun getMaxUserProperties(str: String?, receiver: IBundleReceiver?) {
Log.d(TAG, "Not yet implemented: getMaxUserProperties")
receiver?.onBundle(Bundle().apply { putInt("r", 25) })
}
override fun setUserId(str: String?, j: Long) {
Log.d(TAG, "Not yet implemented: setUserId")
}
override fun setConditionalUserProperty(bundle: Bundle?, j: Long) {
Log.d(TAG, "Not yet implemented: setConditionalUserProperty")
}
override fun clearConditionalUserProperty(str: String?, str2: String?, bundle: Bundle?) {
Log.d(TAG, "Not yet implemented: clearConditionalUserProperty")
}
override fun getConditionalUserProperties(str: String?, str2: String?, receiver: IBundleReceiver?) {
Log.d(TAG, "Not yet implemented: getConditionalUserProperties")
receiver?.onBundle(Bundle().apply { putParcelableArrayList("r", arrayListOf<Parcelable>()) })
}
override fun setMeasurementEnabled(z: Boolean, j: Long) {
Log.d(TAG, "Not yet implemented: setMeasurementEnabled")
}
override fun resetAnalyticsData(j: Long) {
Log.d(TAG, "Not yet implemented: resetAnalyticsData")
}
override fun setMinimumSessionDuration(j: Long) {
Log.d(TAG, "Not yet implemented: setMinimumSessionDuration")
}
override fun setSessionTimeoutDuration(j: Long) {
Log.d(TAG, "Not yet implemented: setSessionTimeoutDuration")
}
override fun setCurrentScreen(obj: IObjectWrapper?, str: String?, str2: String?, j: Long) {
Log.d(TAG, "Not yet implemented: setCurrentScreen")
}
override fun getCurrentScreenName(receiver: IBundleReceiver?) {
Log.d(TAG, "Not yet implemented: getCurrentScreenName")
}
override fun getCurrentScreenClass(receiver: IBundleReceiver?) {
Log.d(TAG, "Not yet implemented: getCurrentScreenClass")
}
override fun setInstanceIdProvider(provider: IStringProvider?) {
Log.d(TAG, "Not yet implemented: setInstanceIdProvider")
}
override fun getCachedAppInstanceId(receiver: IBundleReceiver?) {
Log.d(TAG, "Not yet implemented: getCachedAppInstanceId")
}
override fun getAppInstanceId(receiver: IBundleReceiver?) {
Log.d(TAG, "Not yet implemented: getAppInstanceId")
}
override fun getGmpAppId(receiver: IBundleReceiver?) {
Log.d(TAG, "Not yet implemented: getGmpAppId")
}
override fun generateEventId(receiver: IBundleReceiver?) {
Log.d(TAG, "Not yet implemented: generateEventId")
}
override fun beginAdUnitExposure(str: String?, j: Long) {
Log.d(TAG, "Not yet implemented: beginAdUnitExposure")
}
override fun endAdUnitExposure(str: String?, j: Long) {
Log.d(TAG, "Not yet implemented: endAdUnitExposure")
}
override fun onActivityStarted(activity: IObjectWrapper?, j: Long) {
Log.d(TAG, "Not yet implemented: onActivityStarted")
}
override fun onActivityStopped(activity: IObjectWrapper?, j: Long) {
Log.d(TAG, "Not yet implemented: onActivityStopped")
}
override fun onActivityCreated(activity: IObjectWrapper?, bundle: Bundle?, j: Long) {
Log.d(TAG, "Not yet implemented: onActivityCreated")
}
override fun onActivityDestroyed(activity: IObjectWrapper?, j: Long) {
Log.d(TAG, "Not yet implemented: onActivityDestroyed")
}
override fun onActivityPaused(activity: IObjectWrapper?, j: Long) {
Log.d(TAG, "Not yet implemented: onActivityPaused")
}
override fun onActivityResumed(activity: IObjectWrapper?, j: Long) {
Log.d(TAG, "Not yet implemented: onActivityResumed")
}
override fun onActivitySaveInstanceState(activity: IObjectWrapper?, receiver: IBundleReceiver?, j: Long) {
Log.d(TAG, "Not yet implemented: onActivitySaveInstanceState")
receiver?.onBundle(Bundle())
}
override fun performAction(bundle: Bundle?, receiver: IBundleReceiver?, j: Long) {
Log.d(TAG, "Not yet implemented: performAction")
}
override fun logHealthData(i: Int, str: String?, obj: IObjectWrapper?, obj2: IObjectWrapper?, obj3: IObjectWrapper?) {
Log.d(TAG, "Not yet implemented: logHealthData")
}
override fun setEventInterceptor(proxy: IEventHandlerProxy?) {
Log.d(TAG, "Not yet implemented: setEventInterceptor")
}
override fun registerOnMeasurementEventListener(proxy: IEventHandlerProxy?) {
Log.d(TAG, "Not yet implemented: registerOnMeasurementEventListener")
}
override fun unregisterOnMeasurementEventListener(proxy: IEventHandlerProxy?) {
Log.d(TAG, "Not yet implemented: unregisterOnMeasurementEventListener")
}
override fun initForTests(map: MutableMap<Any?, Any?>?) {
Log.d(TAG, "Not yet implemented: initForTests")
}
override fun getTestFlag(receiver: IBundleReceiver?, i: Int) {
Log.d(TAG, "Not yet implemented: getTestFlag")
}
override fun setDataCollectionEnabled(z: Boolean) {
Log.d(TAG, "Not yet implemented: setDataCollectionEnabled")
}
override fun isDataCollectionEnabled(receiver: IBundleReceiver?) {
Log.d(TAG, "Not yet implemented: isDataCollectionEnabled")
receiver?.onBundle(Bundle().apply { putBoolean("r", false) })
}
override fun setDefaultEventParameters(bundle: Bundle?) {
Log.d(TAG, "Not yet implemented: setDefaultEventParameters")
}
override fun setConsent(bundle: Bundle?, j: Long) {
Log.d(TAG, "Not yet implemented: setConsent")
}
override fun setConsentThirdParty(bundle: Bundle?, j: Long) {
Log.d(TAG, "Not yet implemented: setConsentThirdParty")
}
override fun clearMeasurementEnabled(j: Long) {
Log.d(TAG, "Not yet implemented: clearMeasurementEnabled")
}
}

View File

@ -0,0 +1,80 @@
/*
* SPDX-FileCopyrightText: 2022 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.clearcut
import android.os.Parcel
import android.os.RemoteException
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleOwner
import androidx.lifecycle.lifecycleScope
import com.google.android.gms.clearcut.LogEventParcelable
import com.google.android.gms.clearcut.internal.IClearcutLoggerCallbacks
import com.google.android.gms.clearcut.internal.IClearcutLoggerService
import com.google.android.gms.common.api.CommonStatusCodes
import com.google.android.gms.common.api.Status
import com.google.android.gms.common.data.DataHolder
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.utils.warnOnTransactionIssues
private const val TAG = "ClearcutLoggerService"
private const val COLLECT_FOR_DEBUG_DURATION = 24L * 60 * 60 * 1000
class ClearcutLoggerService : BaseService(TAG, GmsService.CLEARCUT_LOGGER) {
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) {
callback.onPostInitComplete(0, ClearcutLoggerServiceImpl(lifecycle), null)
}
}
class ClearcutLoggerServiceImpl(private val lifecycle: Lifecycle) : IClearcutLoggerService.Stub(), LifecycleOwner {
private var collectForDebugExpiryTime: Long = 0
override fun log(callbacks: IClearcutLoggerCallbacks, event: LogEventParcelable) {
lifecycleScope.launchWhenStarted {
callbacks.onLogResult(Status.SUCCESS)
}
}
override fun forceUpload(callbacks: IClearcutLoggerCallbacks) {
lifecycleScope.launchWhenStarted {
callbacks.onLogResult(Status.SUCCESS)
}
}
override fun startCollectForDebug(callbacks: IClearcutLoggerCallbacks) {
lifecycleScope.launchWhenStarted {
collectForDebugExpiryTime = System.currentTimeMillis() + COLLECT_FOR_DEBUG_DURATION
callbacks.onStartCollectForDebugResult(Status.SUCCESS, collectForDebugExpiryTime)
}
}
override fun stopCollectForDebug(callbacks: IClearcutLoggerCallbacks) {
lifecycleScope.launchWhenStarted {
callbacks.onStopCollectForDebugResult(Status.SUCCESS)
}
}
override fun getCollectForDebugExpiryTime(callbacks: IClearcutLoggerCallbacks) {
lifecycleScope.launchWhenStarted {
callbacks.onCollectForDebugExpiryTime(Status.SUCCESS, collectForDebugExpiryTime)
}
}
override fun getLogEventParcelablesLegacy(callbacks: IClearcutLoggerCallbacks) {
getLogEventParcelables(callbacks)
}
override fun getLogEventParcelables(callbacks: IClearcutLoggerCallbacks) {
lifecycleScope.launchWhenStarted {
callbacks.onLogEventParcelables(DataHolder.empty(CommonStatusCodes.SUCCESS))
}
}
override fun getLifecycle(): Lifecycle = lifecycle
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags) { super.onTransact(code, data, reply, flags) }
}

View File

@ -35,7 +35,7 @@ class FontsProvider : ContentProvider() {
selectionArgs: Array<out String>?, selectionArgs: Array<out String>?,
sortOrder: String? sortOrder: String?
): Cursor { ): Cursor {
Log.e(TAG, "query: $uri ${projection?.toList()} $selection") Log.e(TAG, "query: $uri ${projection?.toList()} $selection ${selectionArgs?.joinToString(prefix = "[", postfix = "]")}")
val cursor = MatrixCursor(COLUMNS) val cursor = MatrixCursor(COLUMNS)
// We could also return an empty cursor here, but some apps have been reported to crash // We could also return an empty cursor here, but some apps have been reported to crash
// when their expected font is not returned by Google's font provider. // when their expected font is not returned by Google's font provider.

View File

@ -0,0 +1,58 @@
/*
* SPDX-FileCopyrightText: 2022 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.measurement
import android.os.Bundle
import android.os.Parcel
import android.util.Log
import com.google.android.gms.common.api.CommonStatusCodes
import com.google.android.gms.common.internal.GetServiceRequest
import com.google.android.gms.common.internal.IGmsCallbacks
import com.google.android.gms.measurement.internal.*
import org.microg.gms.BaseService
import org.microg.gms.common.GmsService
import org.microg.gms.utils.warnOnTransactionIssues
private const val TAG = "MeasurementService"
class MeasurementService : BaseService(TAG, GmsService.MEASUREMENT) {
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) {
callback.onPostInitComplete(CommonStatusCodes.SUCCESS, MeasurementServiceImpl(), Bundle())
}
}
class MeasurementServiceImpl : IMeasurementService.Stub() {
override fun f1(event: EventParcel, app: AppMetadata) {
Log.d(TAG, "f1($event) for $app")
}
override fun f2(attribute: UserAttributeParcel?, app: AppMetadata) {
Log.d(TAG, "f2($attribute) for $app")
}
override fun f4(app: AppMetadata) {
Log.d(TAG, "f4() for $app")
}
override fun f10(p0: Long, p1: String?, p2: String?, p3: String?) {
Log.d(TAG, "f10($p0, $p1, $p2, $p3)")
}
override fun f11(app: AppMetadata): String? {
Log.d(TAG, "f11() for $app")
return null
}
override fun f12(property: ConditionalUserPropertyParcel, app: AppMetadata) {
Log.d(TAG, "f12($property) for $app")
}
override fun setDefaultEventParameters(params: Bundle, app: AppMetadata) {
Log.d(TAG, "setDefaultEventParameters($params) for $app")
}
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags) { super.onTransact(code, data, reply, flags) }
}

View File

@ -15,6 +15,7 @@ import com.google.android.gms.phenotype.internal.IPhenotypeCallbacks
import com.google.android.gms.phenotype.internal.IPhenotypeService import com.google.android.gms.phenotype.internal.IPhenotypeService
import org.microg.gms.BaseService import org.microg.gms.BaseService
import org.microg.gms.common.GmsService import org.microg.gms.common.GmsService
import org.microg.gms.utils.warnOnTransactionIssues
private const val TAG = "GmsPhenotypeSvc" private const val TAG = "GmsPhenotypeSvc"
@ -26,7 +27,12 @@ class PhenotypeService : BaseService(TAG, GmsService.PHENOTYPE) {
class PhenotypeServiceImpl : IPhenotypeService.Stub() { class PhenotypeServiceImpl : IPhenotypeService.Stub() {
override fun register(callbacks: IPhenotypeCallbacks, p1: String?, p2: Int, p3: Array<out String>?, p4: ByteArray?) { override fun register(callbacks: IPhenotypeCallbacks, p1: String?, p2: Int, p3: Array<out String>?, p4: ByteArray?) {
Log.d(TAG, "register($p1, $p2, ${p3?.contentToString()}, $p4)") Log.d(TAG, "register($p1, $p2, $p3, $p4)")
callbacks.onRegister(Status.SUCCESS)
}
override fun register2(callbacks: IPhenotypeCallbacks, p1: String?, p2: Int, p3: Array<out String>?, p4: IntArray?, p5: ByteArray?) {
Log.d(TAG, "register2($p1, $p2, $p3, $p4, $p5)")
callbacks.onRegister(Status.SUCCESS) callbacks.onRegister(Status.SUCCESS)
} }
@ -37,9 +43,5 @@ class PhenotypeServiceImpl : IPhenotypeService.Stub() {
}) })
} }
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean { override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags) { super.onTransact(code, data, reply, flags) }
if (super.onTransact(code, data, reply, flags)) return true
Log.d(TAG, "onTransact [unknown]: $code, $data, $flags")
return false
}
} }

View File

@ -14,10 +14,10 @@ import androidx.lifecycle.lifecycleScope
import kotlinx.coroutines.delay import kotlinx.coroutines.delay
import org.microg.gms.checkin.getCheckinServiceInfo import org.microg.gms.checkin.getCheckinServiceInfo
import org.microg.gms.checkin.setCheckinServiceConfiguration import org.microg.gms.checkin.setCheckinServiceConfiguration
import org.microg.gms.droidguard.core.DroidGuardPreferences
import org.microg.gms.gcm.getGcmServiceInfo import org.microg.gms.gcm.getGcmServiceInfo
import org.microg.gms.gcm.setGcmServiceConfiguration import org.microg.gms.gcm.setGcmServiceConfiguration
import org.microg.gms.safetynet.getSafetyNetServiceInfo import org.microg.gms.safetynet.SafetyNetPreferences
import org.microg.gms.safetynet.setSafetyNetServiceConfiguration
class ProvisionService : LifecycleService() { class ProvisionService : LifecycleService() {
private fun Bundle.getBooleanOrNull(key: String): Boolean? { private fun Bundle.getBooleanOrNull(key: String): Boolean? {
@ -34,7 +34,10 @@ class ProvisionService : LifecycleService() {
intent?.extras?.getBooleanOrNull("checkin_enabled")?.let { setCheckinServiceConfiguration(this@ProvisionService, getCheckinServiceInfo(this@ProvisionService).configuration.copy(enabled = it)) } intent?.extras?.getBooleanOrNull("checkin_enabled")?.let { setCheckinServiceConfiguration(this@ProvisionService, getCheckinServiceInfo(this@ProvisionService).configuration.copy(enabled = it)) }
intent?.extras?.getBooleanOrNull("gcm_enabled")?.let { setGcmServiceConfiguration(this@ProvisionService, getGcmServiceInfo(this@ProvisionService).configuration.copy(enabled = it)) } intent?.extras?.getBooleanOrNull("gcm_enabled")?.let { setGcmServiceConfiguration(this@ProvisionService, getGcmServiceInfo(this@ProvisionService).configuration.copy(enabled = it)) }
intent?.extras?.getBooleanOrNull("safetynet_enabled")?.let { setSafetyNetServiceConfiguration(this@ProvisionService, getSafetyNetServiceInfo(this@ProvisionService).configuration.copy(enabled = it)) } intent?.extras?.getBooleanOrNull("safetynet_enabled")?.let {
SafetyNetPreferences.setEnabled(this@ProvisionService, it)
DroidGuardPreferences.setEnabled(this@ProvisionService, it)
}
// What else? // What else?
delay(2 * 1000) // Wait 2 seconds to give provisioning some extra time delay(2 * 1000) // Wait 2 seconds to give provisioning some extra time

View File

@ -5,6 +5,7 @@
package org.microg.gms.udc package org.microg.gms.udc
import android.os.Parcel
import android.util.Log import android.util.Log
import com.google.android.gms.common.api.Status import com.google.android.gms.common.api.Status
import com.google.android.gms.common.internal.GetServiceRequest import com.google.android.gms.common.internal.GetServiceRequest
@ -14,6 +15,7 @@ import com.google.android.gms.facs.cache.internal.IFacsCacheCallbacks
import com.google.android.gms.facs.cache.internal.IFacsCacheService import com.google.android.gms.facs.cache.internal.IFacsCacheService
import org.microg.gms.BaseService import org.microg.gms.BaseService
import org.microg.gms.common.GmsService import org.microg.gms.common.GmsService
import org.microg.gms.utils.warnOnTransactionIssues
private const val TAG = "GmsFacsCache" private const val TAG = "GmsFacsCache"
@ -49,4 +51,5 @@ class FacsCacheServiceImpl : IFacsCacheService.Stub() {
callbacks.onWriteDeviceLevelSettingsResult(Status.CANCELED) callbacks.onWriteDeviceLevelSettingsResult(Status.CANCELED)
} }
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags) { super.onTransact(code, data, reply, flags) }
} }

View File

@ -11,10 +11,12 @@ import androidx.lifecycle.lifecycleScope
import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.findNavController
import androidx.preference.Preference import androidx.preference.Preference
import com.google.android.gms.R import com.google.android.gms.R
import org.microg.gms.checkin.getCheckinServiceInfo import org.microg.gms.checkin.CheckinPrefs
import org.microg.gms.gcm.GcmDatabase import org.microg.gms.gcm.GcmDatabase
import org.microg.gms.gcm.getGcmServiceInfo import org.microg.gms.gcm.getGcmServiceInfo
import org.microg.gms.safetynet.getSafetyNetServiceInfo import org.microg.gms.safetynet.SafetyNetPreferences
import org.microg.nlp.client.GeocodeClient
import org.microg.nlp.client.LocationClient
import org.microg.nlp.client.UnifiedLocationClient import org.microg.nlp.client.UnifiedLocationClient
import org.microg.tools.ui.ResourceSettingsFragment import org.microg.tools.ui.ResourceSettingsFragment
@ -68,10 +70,14 @@ class SettingsFragment : ResourceSettingsFragment() {
findPreference<Preference>(PREF_GCM)!!.setSummary(R.string.service_status_disabled_short) findPreference<Preference>(PREF_GCM)!!.setSummary(R.string.service_status_disabled_short)
} }
findPreference<Preference>(PREF_CHECKIN)!!.setSummary(if (getCheckinServiceInfo(context).configuration.enabled) R.string.service_status_enabled_short else R.string.service_status_disabled_short) findPreference<Preference>(PREF_CHECKIN)!!.setSummary(if (CheckinPrefs.isEnabled(context)) R.string.service_status_enabled_short else R.string.service_status_disabled_short)
findPreference<Preference>(PREF_SNET)!!.setSummary(if (getSafetyNetServiceInfo(context).configuration.enabled) R.string.service_status_enabled_short else R.string.service_status_disabled_short) findPreference<Preference>(PREF_SNET)!!.setSummary(if (SafetyNetPreferences.isEnabled(context)) R.string.service_status_enabled_short else R.string.service_status_disabled_short)
val backendCount = UnifiedLocationClient[context].getLocationBackends().size + UnifiedLocationClient[context].getGeocoderBackends().size val backendCount = try {
LocationClient(context, lifecycle).getLocationBackends().size + GeocodeClient(context, lifecycle).getGeocodeBackends().size
} catch (e: Exception) {
0
}
findPreference<Preference>(PREF_UNIFIEDNLP)!!.summary = context.resources.getQuantityString(R.plurals.pref_unifiednlp_summary, backendCount, backendCount) findPreference<Preference>(PREF_UNIFIEDNLP)!!.summary = context.resources.getQuantityString(R.plurals.pref_unifiednlp_summary, backendCount, backendCount)
findPreference<Preference>(PREF_EXPOSURE)?.isVisible = NearbyPreferencesIntegration.isAvailable findPreference<Preference>(PREF_EXPOSURE)?.isVisible = NearbyPreferencesIntegration.isAvailable

View File

@ -0,0 +1,53 @@
/*
* SPDX-FileCopyrightText: 2022 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.usagereporting
import android.os.Bundle
import android.os.Parcel
import android.util.Log
import com.google.android.gms.common.api.CommonStatusCodes
import com.google.android.gms.common.api.Status
import com.google.android.gms.common.internal.GetServiceRequest
import com.google.android.gms.common.internal.IGmsCallbacks
import com.google.android.gms.usagereporting.UsageReportingOptInOptions
import com.google.android.gms.usagereporting.internal.IUsageReportingCallbacks
import com.google.android.gms.usagereporting.internal.IUsageReportingOptInOptionsChangedListener
import com.google.android.gms.usagereporting.internal.IUsageReportingService
import org.microg.gms.BaseService
import org.microg.gms.common.GmsService
import org.microg.gms.utils.warnOnTransactionIssues
private const val TAG = "UsageReportingService"
class UsageReportingService : BaseService(TAG, GmsService.USAGE_REPORTING) {
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) {
callback.onPostInitComplete(CommonStatusCodes.SUCCESS, UsageReportingServiceImpl(), Bundle())
}
}
class UsageReportingServiceImpl : IUsageReportingService.Stub() {
override fun getOptInOptions(callbacks: IUsageReportingCallbacks) {
// Don't log to prevent log spam
callbacks.onOptInOptions(Status.SUCCESS, UsageReportingOptInOptions().apply { optInUsageReporting = 2 })
}
override fun setOptInOptions(options: UsageReportingOptInOptions, callbacks: IUsageReportingCallbacks) {
Log.d(TAG, "setOptInOptions($options)")
callbacks.onOptInOptionsSet(Status.SUCCESS)
}
override fun addOptInOptionsChangedListener(listener: IUsageReportingOptInOptionsChangedListener, callbacks: IUsageReportingCallbacks) {
Log.d(TAG, "addOptInOptionsChangedListener($listener)")
callbacks.onOptInOptionsChangedListenerAdded(Status.SUCCESS)
}
override fun removeOptInOptionsChangedListener(listener: IUsageReportingOptInOptionsChangedListener, callbacks: IUsageReportingCallbacks) {
Log.d(TAG, "removeOptInOptionsChangedListener($listener)")
callbacks.onOptInOptionsChangedListenerRemoved(Status.SUCCESS)
}
override fun onTransact(code: Int, data: Parcel, reply: Parcel?, flags: Int): Boolean = warnOnTransactionIssues(code, reply, flags) { super.onTransact(code, data, reply, flags) }
}