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 88 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
88 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
04afa56
Show info: wait before work app store can be used
fynngodau Oct 21, 2024
ed745dc
Apply review
fynngodau Oct 28, 2024
74c6e05
Fix file name of `strings.xml`
fynngodau Feb 25, 2025
7eea5f3
Merge master branch into workaccount-store
fynngodau Feb 25, 2025
e0a4bf5
Reapply "Enable multidex"
fynngodau Feb 25, 2025
2c449c4
Add interaction with work profile to self-check
fynngodau Feb 25, 2025
63c8154
Transfer settings provider URI from primary to work profile
fynngodau Mar 6, 2025
9ff41af
Fix too long app name pushing out icons
fynngodau Mar 6, 2025
0ae381d
Dependency installation (experimental)
fynngodau Mar 6, 2025
c2732da
Send URI as response data rather than activity creation data
fynngodau Mar 6, 2025
a85efb1
Improve documentation
fynngodau Mar 6, 2025
423f762
Create request activity even outside of activity contexts
fynngodau Mar 6, 2025
127184c
Always show positive self-check on INTERACT_ACROSS_USERS
fynngodau Mar 19, 2025
4490e64
Establish access to main profile's data on managed profile setup
fynngodau Mar 19, 2025
cbf4784
Avoid crash when failing to add work account
fynngodau Mar 19, 2025
d1474ca
Add preference for work account
fynngodau Mar 19, 2025
6e18e47
Work profile preferences UI
fynngodau Mar 19, 2025
bbac09b
Only share work profile-related preferences
fynngodau Mar 19, 2025
6e66498
Merge branch 'workaccount-store-cross-profile' into workaccount-store
fynngodau Mar 19, 2025
072ab8d
Install library dependencies only if not yet installed
fynngodau Mar 19, 2025
774a5bd
Rename function that accesses cross-profile prefs
fynngodau Mar 20, 2025
f140d55
Move app installation to foreground service
fynngodau Mar 20, 2025
bc30c8a
Remove app installation notification recreation
fynngodau Mar 20, 2025
0cefb34
Switch for on-demand downloading of specific app features
DaVinci9196 Feb 24, 2025
40c7a24
Minor logging adjustments
fynngodau Mar 26, 2025
c126362
Add missing license headers
fynngodau Mar 26, 2025
3ac9f2e
Remove duplicate class
fynngodau Mar 26, 2025
0d7c28f
Merge master branch into workaccount-store
fynngodau Mar 27, 2025
df9d7cb
Emit error on early install failure
fynngodau Mar 27, 2025
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
Prev Previous commit
Next Next commit
Improve documentation
fynngodau committed Mar 6, 2025
commit a85efb1d1e60ccb961f58abf953ccd5e67e2e6ce
Original file line number Diff line number Diff line change
@@ -12,6 +12,15 @@ import org.microg.gms.settings.SettingsContract.CROSS_PROFILE_PERMISSION
import org.microg.gms.settings.SettingsContract.CROSS_PROFILE_SHARED_PREFERENCES_NAME
import androidx.core.content.edit

/**
* Two-step process:
* 1. request to hear back from `CrossProfileRequestActivity`
* 2. receive resulting URI as intent data
*
* This dance so complicated because Android platform does not offer better APIs that only need
* `INTERACT_ACROSS_PROFILES`, an appops permission (and not `INTERACT_ACROSS_USERS`, a
* privileged|system permission).
*/
@RequiresApi(Build.VERSION_CODES.R)
class CrossProfileRequestActivity : Activity() {

Original file line number Diff line number Diff line change
@@ -39,9 +39,12 @@ object SettingsContract {
val sourcePackage = metaData.getString(META_DATA_KEY_SOURCE_PACKAGE, context.packageName)
return "${sourcePackage}.microg.settings"
}
// TODO here I want to add cross-profile interactivity.
// We need the URI to be normal on normal profile and special on work profile:
// On work profile it must be obtained using a special activity.
/* Cross-profile interactivity:
* URI points to our `SettingsProvider` on normal profile and is supposed to point to
* _primary_ profile's `SettingsProvider` work / managed profile. If this is not yet established,
* we need to start the `CrossProfileRequestActivity`, which asks `CrossProfileSendActivity` to
* send it a URI that entitles it to access the primary profile's settings.
*/
fun getAuthorityUri(context: Context): Uri {

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
@@ -56,7 +59,7 @@ object SettingsContract {
return "content://${getAuthority(context)}".toUri()
}

/* check special shared preferences file if it contains a URI that permits us to access
/* Check special shared preferences file if it contains a URI that permits us to access
* main profile's settings content provider
*/
val preferences = context.getSharedPreferences(CROSS_PROFILE_SHARED_PREFERENCES_NAME, MODE_PRIVATE)
@@ -78,7 +81,7 @@ object SettingsContract {
Log.d(TAG, "Initiating activity to requesting storage URI from main profile")
context.startActivity(Intent(context, CrossProfileRequestActivity::class.java))

// TODO
// while proper response is not yet available, work on local data :(
return "content://${getAuthority(context)}".toUri()
}
}