You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* workaccount: Eliminate call to `AccountManager.addAccount`
Intune now sets a policy such that users are not allowed to create work
profiles anymore. This is good in principle because users are never
supposed to do this manually (and are, in fact, incapable of doing so).
Our code is also affected because `WorkAccountService` triggered sign-in
flow in `WorkAccountAuthenticator` through `AccountManager.addAccount`,
which is the action prohibited by the policy. We can still (and need to)
call `AccountManager.addAccountExplicitly` to register the account with
the system.
* workaccount: fix sign in
like 3a68bc3
i.e. same fix as #3257
* workaccount: cleanup
Copy file name to clipboardExpand all lines: play-services-auth-workaccount/core/src/main/kotlin/com/google/android/gms/auth/account/authenticator/WorkAccountAuthenticator.kt
+53-75Lines changed: 53 additions & 75 deletions
Original file line number
Diff line number
Diff line change
@@ -38,74 +38,52 @@ class WorkAccountAuthenticator(val context: Context) : AbstractAccountAuthentica
38
38
authTokenType:String?,
39
39
requiredFeatures:Array<outString>?,
40
40
options:Bundle
41
-
): Bundle? {
42
-
43
-
if (!WorkProfileSettings(context).allowCreateWorkAccount) {
0 commit comments