From 16f757a974d5df89c838fef5c1db353b7d28b2c6 Mon Sep 17 00:00:00 2001 From: ale5000 <15793015+ale5000-git@users.noreply.github.com> Date: Wed, 27 Sep 2023 02:47:36 +0200 Subject: [PATCH] Minor improvements for Work Account service --- play-services-auth-workaccount/build.gradle | 4 +--- .../core/build.gradle | 4 +++- .../core/src/main/AndroidManifest.xml | 4 +--- .../gms/auth/workaccount/WorkAccountService.kt | 18 +++++++++++------- .../src/main/AndroidManifest.xml | 2 +- .../gms/auth/account/IWorkAccountService.aidl | 9 ++++----- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/play-services-auth-workaccount/build.gradle b/play-services-auth-workaccount/build.gradle index 0b0dfff78d..59119fbeea 100644 --- a/play-services-auth-workaccount/build.gradle +++ b/play-services-auth-workaccount/build.gradle @@ -27,15 +27,13 @@ android { sourceCompatibility = 1.8 targetCompatibility = 1.8 } - } apply from: '../gradle/publish-android.gradle' -description = 'microG implementation of play-services-auth-api-phone' +description = 'microG implementation of play-services-auth-workaccount' dependencies { - // Dependencies from play-services-auth-api-phone:18.0.1 api project(':play-services-base') api project(':play-services-basement') api project(':play-services-tasks') diff --git a/play-services-auth-workaccount/core/build.gradle b/play-services-auth-workaccount/core/build.gradle index 41a453103e..1d741a4e64 100644 --- a/play-services-auth-workaccount/core/build.gradle +++ b/play-services-auth-workaccount/core/build.gradle @@ -15,7 +15,7 @@ dependencies { } android { - namespace "com.google.android.gms.auth.workaccount" + namespace "org.microg.gms.auth.workaccount.core" compileSdkVersion androidCompileSdk buildToolsVersion "$androidBuildVersionTools" @@ -43,3 +43,5 @@ android { disable 'MissingTranslation' } } + +description = 'microG service implementation for play-services-auth-workaccount' diff --git a/play-services-auth-workaccount/core/src/main/AndroidManifest.xml b/play-services-auth-workaccount/core/src/main/AndroidManifest.xml index 55635a9464..31a95ca9ea 100644 --- a/play-services-auth-workaccount/core/src/main/AndroidManifest.xml +++ b/play-services-auth-workaccount/core/src/main/AndroidManifest.xml @@ -6,9 +6,7 @@ - + diff --git a/play-services-auth-workaccount/core/src/main/kotlin/org/microg/gms/auth/workaccount/WorkAccountService.kt b/play-services-auth-workaccount/core/src/main/kotlin/org/microg/gms/auth/workaccount/WorkAccountService.kt index 0290a1f7ab..a8ff346220 100644 --- a/play-services-auth-workaccount/core/src/main/kotlin/org/microg/gms/auth/workaccount/WorkAccountService.kt +++ b/play-services-auth-workaccount/core/src/main/kotlin/org/microg/gms/auth/workaccount/WorkAccountService.kt @@ -35,8 +35,8 @@ class WorkAccountServiceImpl(val context: Context) : IWorkAccountService.Stub() return super.onTransact(code, data, reply, flags) } - override fun addWorkAccount(googleApiClient: IObjectWrapper?, s: String?): IWorkAccountService.AddAccountResult { - Log.d(TAG, "addWorkAccount with $googleApiClient, $s") + override fun addWorkAccount(googleApiClient: IObjectWrapper?, token: String?): IWorkAccountService.AddAccountResult { + Log.d(TAG, "addWorkAccount with $googleApiClient, $token") return object : AddAccountResult.Stub() { override fun getAccount(): Account? { // TODO @@ -49,16 +49,20 @@ class WorkAccountServiceImpl(val context: Context) : IWorkAccountService.Stub() } } - override fun removeWorkAccount(googleApiClient: IObjectWrapper?, account: IObjectWrapper?): IObjectWrapper { + override fun removeWorkAccount(googleApiClient: IObjectWrapper?, account: IObjectWrapper?): IObjectWrapper { + // TODO + Log.d(TAG, "removeWorkAccount with $googleApiClient, $account") return ObjectWrapper.wrap(null) } - override fun setWorkAuthenticatorEnabled(googleApiClient: IObjectWrapper?, b: Boolean) { - // TODO - Log.d(TAG, "setWorkAuthenticatorEnabled with $googleApiClient, $b") + override fun setWorkAuthenticatorEnabled(googleApiClient: IObjectWrapper?, enabled: Boolean) { + // TODO + Log.d(TAG, "setWorkAuthenticatorEnabled with $googleApiClient, $enabled") } - override fun setWorkAuthenticatorEnabledWithResult(googleApiClient: IObjectWrapper?, b: Boolean): IObjectWrapper { + override fun setWorkAuthenticatorEnabledWithResult(googleApiClient: IObjectWrapper?, enabled: Boolean): IObjectWrapper { + // TODO + Log.d(TAG, "setWorkAuthenticatorEnabledWithResult with $googleApiClient, $enabled") return ObjectWrapper.wrap(null) } } diff --git a/play-services-auth-workaccount/src/main/AndroidManifest.xml b/play-services-auth-workaccount/src/main/AndroidManifest.xml index fe3a9e6548..115884d0b0 100644 --- a/play-services-auth-workaccount/src/main/AndroidManifest.xml +++ b/play-services-auth-workaccount/src/main/AndroidManifest.xml @@ -3,4 +3,4 @@ ~ SPDX-FileCopyrightText: 2023 microG Project Team ~ SPDX-License-Identifier: Apache-2.0 --> - \ No newline at end of file + diff --git a/play-services-auth-workaccount/src/main/aidl/com/google/android/gms/auth/account/IWorkAccountService.aidl b/play-services-auth-workaccount/src/main/aidl/com/google/android/gms/auth/account/IWorkAccountService.aidl index 3108d7a0b9..678ad0a959 100644 --- a/play-services-auth-workaccount/src/main/aidl/com/google/android/gms/auth/account/IWorkAccountService.aidl +++ b/play-services-auth-workaccount/src/main/aidl/com/google/android/gms/auth/account/IWorkAccountService.aidl @@ -10,12 +10,11 @@ interface IWorkAccountService { IObjectWrapper getStatus(); } - void setWorkAuthenticatorEnabled(IObjectWrapper googleApiClient, boolean b); - - AddAccountResult addWorkAccount(IObjectWrapper googleApiClient, String s); + AddAccountResult addWorkAccount(IObjectWrapper googleApiClient, String token); IObjectWrapper removeWorkAccount(IObjectWrapper googleApiClient, IObjectWrapper account); + void setWorkAuthenticatorEnabled(IObjectWrapper googleApiClient, boolean enabled); - IObjectWrapper setWorkAuthenticatorEnabledWithResult(IObjectWrapper googleApiClient, boolean b); -} \ No newline at end of file + IObjectWrapper setWorkAuthenticatorEnabledWithResult(IObjectWrapper googleApiClient, boolean enabled); +}