-
Notifications
You must be signed in to change notification settings - Fork 75
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
Skip installing APKs if not allowed by policy #502
Conversation
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.
Untested but I thought of just putting it up for a start and then it can be worked on by anyone.
app/src/main/java/com/stevesoltys/seedvault/restore/install/ApkRestore.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/stevesoltys/seedvault/restore/install/ApkRestore.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/stevesoltys/seedvault/restore/install/ApkRestore.kt
Outdated
Show resolved
Hide resolved
9439df0
to
d646900
Compare
app/src/test/java/com/stevesoltys/seedvault/restore/install/ApkBackupRestoreTest.kt
Outdated
Show resolved
Hide resolved
app/src/test/java/com/stevesoltys/seedvault/restore/install/ApkRestoreTest.kt
Outdated
Show resolved
Hide resolved
d646900
to
4cb4894
Compare
app/src/test/java/com/stevesoltys/seedvault/restore/install/ApkRestoreTest.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/stevesoltys/seedvault/restore/install/ApkRestore.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/stevesoltys/seedvault/restore/install/ApkRestore.kt
Outdated
Show resolved
Hide resolved
9ede604
to
55fafa0
Compare
app/src/test/java/com/stevesoltys/seedvault/restore/install/ApkRestoreTest.kt
Show resolved
Hide resolved
Downstream tracking issue: https://gitlab.com/CalyxOS/calyxos/-/issues/1519 |
Still needs testing :) |
55fafa0
to
5225495
Compare
app/src/main/java/com/stevesoltys/seedvault/restore/install/InstallModule.kt
Show resolved
Hide resolved
app/src/main/java/com/stevesoltys/seedvault/restore/install/ApkRestore.kt
Show resolved
Hide resolved
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.
Given what we discussed, and the fact that failing to install is intended behavior currently, I think this change is fine.
* We should not bypass the OS-wide APK install restriction. * Simply treat that as just not having the APK in the first place, since we do support that as an option. * This still lets users install apps via the store it was downloaded from, if said store is installed and allowed to install apps. * Introduce InstallRestriction to make testing easier. Co-Authored-By: Torsten Grote <[email protected]> Change-Id: Ic0a56961c9078d4dd542db5d9fc75034abb27bea
Rebased, one trivial conflict in tests fixed. |
One test failure:
|
that test failure happens everywhere, we don't know why. |
Issue: #78
When APK install is blocked by policy, this should treat it the same as if the APK just wasn't present, and then use the flow we already have for that ("Tap to install"), which is normally used when people turn off "APK Backup"