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

Skip installing APKs if not allowed by policy #502

Merged
merged 1 commit into from
May 14, 2024

Conversation

chirayudesai
Copy link
Member

@chirayudesai chirayudesai commented Jan 12, 2023

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"

Copy link
Member Author

@chirayudesai chirayudesai left a 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.

@chirayudesai chirayudesai force-pushed the 78-skipapk branch 3 times, most recently from 9439df0 to d646900 Compare January 17, 2023 16:25
@chirayudesai chirayudesai force-pushed the 78-skipapk branch 2 times, most recently from 9ede604 to 55fafa0 Compare January 18, 2023 15:21
grote
grote previously approved these changes Jan 23, 2023
@t-m-w
Copy link
Collaborator

t-m-w commented Mar 1, 2023

Downstream tracking issue: https://gitlab.com/CalyxOS/calyxos/-/issues/1519

@chirayudesai
Copy link
Member Author

Still needs testing :)

@chirayudesai chirayudesai changed the base branch from android13 to android14 April 16, 2024 13:04
@chirayudesai chirayudesai dismissed grote’s stale review April 16, 2024 13:04

The base branch was changed.

t-m-w
t-m-w previously approved these changes May 14, 2024
Copy link
Collaborator

@t-m-w t-m-w left a 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
@chirayudesai
Copy link
Member Author

Rebased, one trivial conflict in tests fixed.

@chirayudesai
Copy link
Member Author

One test failure:

Task :app:connectedDebugAndroidTest
Starting 1 tests on test(AVD) - 14

com.stevesoltys.seedvault.e2e.impl.BackupRestoreTest > backup and restore applications[test(AVD) - 14] FAILED
android.content.res.Resources$NotFoundException: Resource ID #0x7f060258 type #0x2 is not valid
at android.content.res.Resources.getColor(Resources.java:1076)
Tests on test(AVD) - 14 failed: There was 1 failure(s).

@grote
Copy link
Collaborator

grote commented May 14, 2024

that test failure happens everywhere, we don't know why.

@grote grote merged commit 6dfc058 into seedvault-app:android14 May 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants