Skip to content
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

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
34ccbe2
SplitInstallService Additions
DaVinci9196 Aug 19, 2024
5e6f01e
add permission
DaVinci9196 Aug 19, 2024
1962f33
ISplitInstallServiceCallback added
DaVinci9196 Aug 19, 2024
c9bfbc0
remove Phenotype / Experiment
DaVinci9196 Aug 21, 2024
796c3ab
Merge branch 'microg:master' into split_install_service
DaVinci9196 Aug 22, 2024
e8a0058
Optimizing the code
DaVinci9196 Aug 22, 2024
b8d2b20
SplitInstallService add call super.onBind
DaVinci9196 Aug 22, 2024
6cdd488
Fixed the issue that multiple versions of language packs could not be…
DaVinci9196 Aug 26, 2024
36651db
Formatting Code
DaVinci9196 Aug 27, 2024
ff837d9
Formatting Code
DaVinci9196 Aug 27, 2024
8a68044
Execute processing suggestions
DaVinci9196 Sep 12, 2024
5a9f1b3
cleanup
DaVinci9196 Sep 12, 2024
7df6f93
Location/Huawei: Fix permission notification cancelling
mar-v-in Aug 22, 2024
bc57d78
Added the automatic login function for Games (#2435)
DaVinci9196 Aug 22, 2024
a7a2584
Location: Make sure current interval and configured interval stay in …
mar-v-in Aug 22, 2024
c5b7383
Create Work Account service
fynngodau Sep 20, 2023
686ab6d
Introduce WorkAccountAuthenticatorService
jonathanklee Aug 14, 2024
96e6b0c
Work account POC
fynngodau Aug 27, 2024
7f4f252
Work profile: use correct AIDL
fynngodau Aug 27, 2024
762fa53
Call account creation when app is using API to create work account
fynngodau Sep 1, 2024
999e1d3
Work account: Fix rough edges
fynngodau Sep 1, 2024
3af3991
Work account: Add security checks
fynngodau Sep 1, 2024
5e2c9d3
Work account: Redeem token when signing in to account
fynngodau Sep 2, 2024
3128c06
Add license identifiers and remove unwanted changes
fynngodau Sep 2, 2024
30f4858
Work account: Fix `NewApi` lint failure
fynngodau Sep 2, 2024
482038a
Deduplicate work account service declaration
fynngodau Sep 13, 2024
5a39c65
POC: Test activity in companion app to show client policy
fynngodau Sep 14, 2024
0db6eed
Improve visuals of vending activity
fynngodau Sep 15, 2024
c621098
Fetch bulk details for apps retrieved from policy
fynngodau Sep 15, 2024
1e17cc1
Load app details using getItems
fynngodau Sep 16, 2024
8e5ca13
Cleanup: Remove nonfunctional bulkDetails request
fynngodau Sep 16, 2024
20e04fe
UI: Add download button
fynngodau Sep 16, 2024
e99cbd3
Fetch app download URLs
fynngodau Sep 20, 2024
80c9c52
Add app installation support
fynngodau Sep 21, 2024
7ab6cf1
Add app uninstallation support
fynngodau Sep 21, 2024
c3398b9
Refactor SplitInstallManager: data types
fynngodau Sep 21, 2024
3edeb83
Refactor SplitInstallManager: structural pt. 1
fynngodau Sep 21, 2024
23d4459
`FLAG_MUTABLE` instead of `FLAG_IMMUTABLE`
fynngodau Sep 21, 2024
e434c8c
Refactor SplitInstallManager: structural pt. 2
fynngodau Sep 21, 2024
73f1a3a
Refactor SplitInstallManager: structural pt. 3
fynngodau Sep 22, 2024
3b8509d
Work vending: Show installation success without reload
fynngodau Sep 22, 2024
68ef487
Use cache dir instead of files dir
fynngodau Sep 22, 2024
f257e83
Enable work app store only after adding a work account
fynngodau Sep 22, 2024
1887759
Fix lint
fynngodau Sep 22, 2024
85bd1c9
Fix split installs
fynngodau Sep 22, 2024
2e1dfec
Organize vending protobuf files
fynngodau Sep 25, 2024
ec18cdb
Replace volley with ktor + okhttp
fynngodau Sep 25, 2024
09acd1a
Install packages directly to improve performance
fynngodau Sep 25, 2024
9ee71fb
Add progress bar to work app store
fynngodau Sep 26, 2024
352260d
Reimplement caching in `HttpClient`
fynngodau Sep 26, 2024
2109e46
Discard session after exception to clear up storage
fynngodau Sep 26, 2024
c237146
Notifications upon install progress
fynngodau Oct 1, 2024
f39a889
Deduplicate auth-related files
fynngodau Oct 19, 2024
c976df1
Clean up constants
fynngodau Oct 19, 2024
f14124c
Merge master branch into workaccount-store
fynngodau Oct 19, 2024
655cc6f
Fix crash when no apps in enterprise policy
fynngodau Oct 19, 2024
4f0665c
Fix build
fynngodau Oct 19, 2024
a6dc3b3
Purchase apps before downloading in work store
fynngodau Oct 19, 2024
b2cec33
Support additional strange behaviors
fynngodau Oct 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import org.microg.vending.billing.core.AuthData
import org.microg.vending.billing.core.GooglePlayApi.Companion.URL_ENTERPRISE_CLIENT_POLICY
import org.microg.vending.billing.core.GooglePlayApi.Companion.URL_FDFE
import org.microg.vending.billing.core.GooglePlayApi.Companion.URL_ITEM_DETAILS
import org.microg.vending.billing.core.GooglePlayApi.Companion.URL_PURCHASE
import org.microg.vending.billing.core.HttpClient
import org.microg.vending.billing.createDeviceEnvInfo
import org.microg.vending.billing.proto.GoogleApiResponse
Expand Down Expand Up @@ -97,7 +98,22 @@ class VendingActivity : ComponentActivity() {
val client = HttpClient()

// Get download links for requested package
val downloadUrls = runCatching { client.requestDownloadUrls(
val downloadUrls = runCatching {

// 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
)
Copy link
Member

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?


client.requestDownloadUrls(
app.packageName,
app.versionCode!!.toLong(),
auth!!,
Expand Down