-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Work app store #2553
base: master
Are you sure you want to change the base?
Work app store #2553
Conversation
Co-authored-by: Marvin W <git@larma.de>
Verify that work accounts are only added by device owners or profile owners. For instance, Microsoft Intune will create a work profile (moving itself to the work profile in the process) before using the work account servce to create a work account, so at that point it will already be profile owner. Apps that are not the profile owner will subsequently not be able to disable the work account authenticator or remove the work account. The personal account would not have an owner and thus no application could enable the work account provider there.
Nonfunctional attempt.
@fynngodau |
@ale5000-git No. This PR adds support for Device Policy Controller apps that want to register a Work google account. See #2521. |
Shelter use a work profile, and I remember it was failing on my device but I'm not sure if the issue is with microG or with the ROM. |
Allows downloading large applications
* reduces temporary storage usage * speeds up installation by a little bit
0f64199
to
09acd1a
Compare
Storage leaks can still happen if session commits have errors (for instance, because the device was shutdown during installation), as those sessions can still be reopened and retried according to docs. However, we may expect all dangling sessions to be cleared after a certain timespan in the magnitude of a day.
@fynngodau Can the download and notification process of game sub-packages be incorporated into this project? The corresponding functions have been implemented in #2506. |
@DaVinci9196 That would be beneficial, though I will not incorporate another PR into this one as it is already quite large. |
Auth files are now moved to `play-services-base-core` so they can be accessed by other the workaccount module.
Purchasing before downloading seems to be necessary in at least some cases for work profiles as well.
Support unexpected scenarios spotted in the wild on a best-effort basis: * Enterprise policies with apps missing policy fields * App not downloading due to not being purchased
// Purchase app (only needs to be done once, in theory) | ||
val parameters = mapOf( | ||
"ot" to "1", | ||
"doc" to app.packageName, | ||
"vc" to app.versionCode.toString() | ||
) | ||
client.post( | ||
url = URL_PURCHASE, | ||
headers = buildRequestHeaders(auth!!.authToken, auth!!.gsfId.toLong(16)), | ||
params = parameters, | ||
adapter = GoogleApiResponse.ADAPTER | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fynngodau
I don't know the code enough but does it check the microG option before purchase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That wouldn't make sense to me, as this is neither in-app billing nor during an app license check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean the option: Auto purchase free apps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fynngodau
It can also be a new option but it shouldn't automatically purchase apps (even if free) if not configured in microG settings.
...rc/main/kotlin/com/google/android/gms/auth/account/authenticator/WorkAccountAuthenticator.kt
Outdated
Show resolved
Hide resolved
vending-app/src/main/java/org/microg/vending/ui/VendingActivity.kt
Outdated
Show resolved
Hide resolved
vending-app/src/main/java/org/microg/vending/ui/VendingActivity.kt
Outdated
Show resolved
Hide resolved
52559d4
to
04afa56
Compare
Supersedes and contains #2500. Supersedes and contains #2521.
Allows users to download apps to their work profile using the special vending component "Work app store". This component is disabled, and enabled only when a work profile is added (which in turn can only be done by a device or profile admin).
Yet to do:
/getEnterpriseClientPolicy
Current screenshot: