Verified Commit f6ec0efb authored by Marvin W.'s avatar Marvin W. 🐿
Browse files

Add FACS Cache dummy

parent 3c1cb13e
package com.google.android.gms.facs.cache;
parcelable FacsCacheCallOptions;
package com.google.android.gms.facs.cache;
parcelable ForceSettingsCacheRefreshResult;
package com.google.android.gms.facs.cache;
parcelable GetActivityControlsSettingsResult;
package com.google.android.gms.facs.cache;
parcelable ReadDeviceLevelSettingsResult;
package com.google.android.gms.facs.cache;
parcelable UpdateActivityControlsSettingsResult;
package com.google.android.gms.facs.cache.internal;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.facs.cache.ForceSettingsCacheRefreshResult;
import com.google.android.gms.facs.cache.GetActivityControlsSettingsResult;
import com.google.android.gms.facs.cache.ReadDeviceLevelSettingsResult;
import com.google.android.gms.facs.cache.UpdateActivityControlsSettingsResult;
interface IFacsCacheCallbacks {
void onForceSettingsCacheRefreshResult(in Status status, in ForceSettingsCacheRefreshResult result) = 0;
void onUpdateActivityControlsSettingsResult(in Status status, in UpdateActivityControlsSettingsResult result) = 1;
void onGetActivityControlsSettingsResult(in Status status, in GetActivityControlsSettingsResult result) = 2;
void onWriteDeviceLevelSettingsResult(in Status status) = 3;
void onReadDeviceLevelSettingsResult(in Status status, in ReadDeviceLevelSettingsResult result) = 4;
}
package com.google.android.gms.facs.cache.internal;
import com.google.android.gms.facs.cache.FacsCacheCallOptions;
import com.google.android.gms.facs.cache.internal.IFacsCacheCallbacks;
interface IFacsCacheService {
void forceSettingsCacheRefresh(IFacsCacheCallbacks callbacks, in FacsCacheCallOptions options) = 0;
void updateActivityControlsSettings(IFacsCacheCallbacks callbacks, in byte[] bytes, in FacsCacheCallOptions options) = 1;
void getActivityControlsSettings(IFacsCacheCallbacks callbacks, in FacsCacheCallOptions options) = 2;
void readDeviceLevelSettings(IFacsCacheCallbacks callbacks) = 3;
void writeDeviceLevelSettings(IFacsCacheCallbacks callbacks, in byte[] bytes) = 4;
}
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.facs.cache;
import org.microg.safeparcel.AutoSafeParcelable;
public class FacsCacheCallOptions extends AutoSafeParcelable {
@Field(1)
public String instanceId;
@Field(2)
public long version;
public static final Creator<FacsCacheCallOptions> CREATOR = new AutoCreator<>(FacsCacheCallOptions.class);
}
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.facs.cache;
import org.microg.safeparcel.AutoSafeParcelable;
public class ForceSettingsCacheRefreshResult extends AutoSafeParcelable {
public static final Creator<ForceSettingsCacheRefreshResult> CREATOR = new AutoCreator<>(ForceSettingsCacheRefreshResult.class);
}
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.facs.cache;
import org.microg.safeparcel.AutoSafeParcelable;
public class GetActivityControlsSettingsResult extends AutoSafeParcelable {
public static final Creator<GetActivityControlsSettingsResult> CREATOR = new AutoCreator<>(GetActivityControlsSettingsResult.class);
}
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.facs.cache;
import org.microg.safeparcel.AutoSafeParcelable;
public class ReadDeviceLevelSettingsResult extends AutoSafeParcelable {
public static final Creator<ReadDeviceLevelSettingsResult> CREATOR = new AutoCreator<>(ReadDeviceLevelSettingsResult.class);
}
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.android.gms.facs.cache;
import org.microg.safeparcel.AutoSafeParcelable;
public class UpdateActivityControlsSettingsResult extends AutoSafeParcelable {
public static final Creator<UpdateActivityControlsSettingsResult> CREATOR = new AutoCreator<>(UpdateActivityControlsSettingsResult.class);
}
......@@ -699,6 +699,12 @@
</intent-filter>
</service>
<service android:name="org.microg.gms.udc.FacsCacheService">
<intent-filter>
<action android:name="com.google.android.gms.facs.cache.service.START" />
</intent-filter>
</service>
<service android:name="org.microg.gms.DummyService">
<intent-filter>
<action android:name="com.google.android.gms.plus.service.START" />
......@@ -729,6 +735,7 @@
<action android:name="com.google.android.gms.herrevad.services.LightweightNetworkQualityAndroidService.START" />
<action android:name="com.google.android.gms.auth.api.credentials.service.START" />
<action android:name="com.google.android.gms.gass.START" />
<action android:name="com.google.android.gms.audit.service.START" />
</intent-filter>
</service>
</application>
......
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package org.microg.gms.udc
import android.util.Log
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.facs.cache.FacsCacheCallOptions
import com.google.android.gms.facs.cache.internal.IFacsCacheCallbacks
import com.google.android.gms.facs.cache.internal.IFacsCacheService
import org.microg.gms.BaseService
import org.microg.gms.common.GmsService
private const val TAG = "GmsFacsCache"
class FacsCacheService : BaseService(TAG, GmsService.FACS_CACHE) {
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest?, service: GmsService?) {
callback.onPostInitComplete(0, FacsCacheServiceImpl().asBinder(), null)
}
}
class FacsCacheServiceImpl : IFacsCacheService.Stub() {
override fun forceSettingsCacheRefresh(callbacks: IFacsCacheCallbacks, options: FacsCacheCallOptions) {
Log.d(TAG, "forceSettingsCacheRefresh")
callbacks.onForceSettingsCacheRefreshResult(Status.CANCELED, null)
}
override fun updateActivityControlsSettings(callbacks: IFacsCacheCallbacks, bytes: ByteArray, options: FacsCacheCallOptions) {
Log.d(TAG, "updateActivityControlsSettings")
callbacks.onUpdateActivityControlsSettingsResult(Status.CANCELED, null)
}
override fun getActivityControlsSettings(callbacks: IFacsCacheCallbacks, options: FacsCacheCallOptions) {
Log.d(TAG, "getActivityControlsSettings")
callbacks.onGetActivityControlsSettingsResult(Status.CANCELED, null)
}
override fun readDeviceLevelSettings(callbacks: IFacsCacheCallbacks) {
Log.d(TAG, "readDeviceLevelSettings")
callbacks.onReadDeviceLevelSettingsResult(Status.CANCELED, null)
}
override fun writeDeviceLevelSettings(callbacks: IFacsCacheCallbacks, bytes: ByteArray) {
Log.d(TAG, "writeDeviceLevelSettings")
callbacks.onWriteDeviceLevelSettingsResult(Status.CANCELED)
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment