Skip to content

Commit

Permalink
Minor improvements for Work Account service
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git committed Jan 28, 2024
1 parent 2c1c798 commit 16f757a
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 20 deletions.
4 changes: 1 addition & 3 deletions play-services-auth-workaccount/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 3 additions & 1 deletion play-services-auth-workaccount/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies {
}

android {
namespace "com.google.android.gms.auth.workaccount"
namespace "org.microg.gms.auth.workaccount.core"

compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
Expand Down Expand Up @@ -43,3 +43,5 @@ android {
disable 'MissingTranslation'
}
}

description = 'microG service implementation for play-services-auth-workaccount'
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission
android:name="android.permission.GET_ACCOUNTS"
android:maxSdkVersion="22" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />

<application>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
~ SPDX-FileCopyrightText: 2023 microG Project Team
~ SPDX-License-Identifier: Apache-2.0
-->
<manifest />
<manifest />
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
IObjectWrapper setWorkAuthenticatorEnabledWithResult(IObjectWrapper googleApiClient, boolean enabled);
}

0 comments on commit 16f757a

Please sign in to comment.