mirror of
https://github.com/TeamVanced/VancedMicroG
synced 2025-01-06 17:45:50 +01:00
Add CredentialsService dummy
This commit is contained in:
parent
9ccb2073e0
commit
2e64427734
@ -29,6 +29,8 @@ public class CredentialRequest extends AutoSafeParcelable {
|
||||
@Field(4)
|
||||
private CredentialPickerConfig credentialHintPickerConfig;
|
||||
|
||||
private CredentialRequest() { }
|
||||
|
||||
public CredentialRequest(boolean passwordLoginSupported, String[] accountTypes, CredentialPickerConfig credentialPickerConfig, CredentialPickerConfig credentialHintPickerConfig) {
|
||||
this.passwordLoginSupported = passwordLoginSupported;
|
||||
this.accountTypes = accountTypes;
|
||||
|
@ -423,7 +423,7 @@
|
||||
android:exported="true" />
|
||||
|
||||
<activity
|
||||
android:name="org.microg.gms.ui.CredentialPickerActivity"
|
||||
android:name="org.microg.gms.auth.CredentialPickerActivity"
|
||||
android:process=":ui">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.auth.api.credentials.PICKER" />
|
||||
@ -431,6 +431,12 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<service android:name="org.microg.gms.auth.CredentialsService">
|
||||
<intent-filter>
|
||||
<action android:name="com.google.android.gms.auth.api.credentials.service.START" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
|
||||
<!-- Games -->
|
||||
|
||||
<service android:name="org.microg.gms.games.GamesStubService">
|
||||
@ -740,7 +746,6 @@
|
||||
<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.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>
|
||||
|
@ -3,7 +3,7 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.microg.gms.ui
|
||||
package org.microg.gms.auth
|
||||
|
||||
import android.app.Activity
|
||||
import android.os.Bundle
|
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021, microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package org.microg.gms.auth
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import com.google.android.gms.auth.api.credentials.CredentialRequest
|
||||
import com.google.android.gms.auth.api.credentials.internal.*
|
||||
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
|
||||
|
||||
const val TAG = "GmsCredentials"
|
||||
|
||||
class CredentialsService : BaseService(TAG, GmsService.CREDENTIALS) {
|
||||
override fun handleServiceRequest(callback: IGmsCallbacks, request: GetServiceRequest, service: GmsService) {
|
||||
callback.onPostInitComplete(CommonStatusCodes.SUCCESS, CredentialsServiceImpl(), Bundle())
|
||||
}
|
||||
}
|
||||
|
||||
class CredentialsServiceImpl : ICredentialsService.Stub() {
|
||||
override fun request(callbacks: ICredentialsCallbacks, request: CredentialRequest) {
|
||||
Log.d(TAG, "request($request)")
|
||||
callbacks.onStatus(Status.CANCELED)
|
||||
}
|
||||
|
||||
override fun save(callbacks: ICredentialsCallbacks, request: SaveRequest) {
|
||||
Log.d(TAG, "save($request)")
|
||||
callbacks.onStatus(Status.CANCELED)
|
||||
}
|
||||
|
||||
override fun delete(callbacks: ICredentialsCallbacks, request: DeleteRequest) {
|
||||
Log.d(TAG, "delete($request)")
|
||||
callbacks.onStatus(Status.CANCELED)
|
||||
}
|
||||
|
||||
override fun disableAutoSignIn(callbacks: ICredentialsCallbacks) {
|
||||
Log.d(TAG, "disableAutoSignIn()")
|
||||
callbacks.onStatus(Status.SUCCESS)
|
||||
}
|
||||
|
||||
override fun generatePassword(callbacks: ICredentialsCallbacks, request: GeneratePasswordRequest) {
|
||||
Log.d(TAG, "generatePassword($request)")
|
||||
callbacks.onStatus(Status.SUCCESS)
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user