Commit Graph

512 Commits

Author SHA1 Message Date
Aayush Gupta
ac3065ab2c Improve and fix proxy setup/usage
* Switch connectivitycheck URL to HTTPS as cleartext communication is disabled
* Use GlobalScope to verify and setup proxy URL
* Ignore proxy setup in HttpClient if its empty

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-03-05 14:17:11 +05:30
Aayush Gupta
29ce733611 UpdatesFragment: Move Update All button to FAB
* Also link BlacklistFragment in in it's place as requested by users

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-03-04 14:50:15 +05:30
Aayush Gupta
caf6dd18c1 Cleanup and retire non-working download options
* External storage download uses external files directory and not the SD card
  to downloads while the description states otherwise. This is in-accurate and
  thus dropped (See #985).

* Custom download path is broken which was implemented as a workaround for the
  above (See #1003).

* Move downloads storage to internal files directory which is sandboxed and only
  accessible to us.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-03-04 12:55:39 +05:30
Aayush Gupta
2f5d39106a UpdateWorker: Merge self-updates logic for non-fdroid builds
Treat Aurora Store as a normal app for non-fdroid builds and check
for its updates based on auto-update preference.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-03-02 13:26:54 +05:30
Aayush Gupta
3b9efeed11 UpdateWorker: Move update notification logic to NotificationUtil
* All notification related logic should be in this class

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-03-02 10:48:16 +05:30
Aayush Gupta
804d37a579 MainActivity: Move search FAB to fragment_apps_games layout
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-27 22:46:08 +05:30
Aayush Gupta
361707f0cc SelfUpdateWorker: Make update check interval configurable
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-24 06:39:10 +05:30
Aayush Gupta
3091679c4c ShortcutManagerUtil: Ensure app has a launch intent
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-23 12:53:52 +05:30
Aayush Gupta
89fdf1186f AppDetailsFragment: Show menu action to create app shortcut if supported
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-23 12:25:48 +05:30
Aayush Gupta
dd584b5b7b SplashFragment: Remove from backstack when launching an intent
SplashFragment always removes itself from backstack in every other case, do same
when launching the app detail page to handle intents as well.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-22 18:27:48 +05:30
Aayush Gupta
98fe3e3cb3 fixup! DownloadWorkerUtil: Rework cancelAll logic to only cancel request downloads
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-22 13:50:39 +05:30
Aayush Gupta
14729ad7ca fixup! DownloadWorkerUtil: Cancel all failed downloads on init
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-22 11:49:30 +05:30
Aayush Gupta
defd6272d2 SplashFragment: Build secure anonymous data when requested
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-21 21:08:24 +05:30
Aayush Gupta
e0d1185f16 DownloadWorker: Always run onSuccess block as NonCancellable
* Change context in SessionInstaller when starting activity instead

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-21 20:31:17 +05:30
Aayush Gupta
1108edc303 DownloadWorkerUtil: Cancel all failed downloads on init
WorkManager downloads can fail due to n number of reason. Regardless of the reason
there might be not enough time to mark the download as failed within the worker
causing the download to keep the status as downloading on next startup, thus blocking
the queue.

Always check for downloads with downloading status on init and cancel them if work
manager cannot find atleast one ongoing work for it.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-21 20:00:22 +05:30
Aayush Gupta
1a01f96f08 DownloadWorkerUtil: Rework cancelAll logic to only cancel request downloads
We don't want to cancel all downloads when user requests to cancel only updates.
Also, update the download's status to cancelled atomically.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-21 20:00:17 +05:30
Aayush Gupta
11ac8092e2 DownloadWorker: Update file and sharedLib list atomically
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-21 17:54:06 +05:30
Aayush Gupta
4e8d2cd78a UpdatesPreferences: Fix updating the work frequency
Missed during 3339d4a395

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-20 18:49:37 +05:30
Aayush Gupta
45b1fdf44b DownloadWorkerUtil: Cancel download regardless of status when requested
This is useful when an active download is stuck which could happen if the app
was force stopped by user or killed by Android.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-19 18:11:28 +05:30
Aayush Gupta
b3cada603c DownloadWorker: Split out download database update logic
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-19 15:43:08 +05:30
Aayush Gupta
94f724ee66 fixup! DownloadWorker: Only update appropriate status field on status change
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-17 15:36:09 +05:30
Aayush Gupta
295f7decfa fixup! CertUtil: Fix & improve fdroid app check
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-17 15:20:30 +05:30
Aayush Gupta
3c25626a75 DownloadWorker: Only update appropriate status field on status change
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-17 15:04:37 +05:30
Aayush Gupta
b35f6e0f1d UpdatesViewModel: Only cancel updates with cancelAll button
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-16 18:19:48 +05:30
Aayush Gupta
b3f991b8d7 DownloadFragment: Bring back force clear all menu action
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-16 17:59:28 +05:30
Aayush Gupta
2e19eac1c4 CertUtil: Fix & improve fdroid app check
* Check for fdroid basic as install source as well
* Check for fdroid.org as organization name in signing certificate attribute

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-15 19:43:54 +05:30
Aayush Gupta
42c182bdb7 Revert "AppUpdateView: Show icons on incompatible updates buttons"
This reverts commit d4552007a7.
2024-02-15 17:27:21 +05:30
Aayush Gupta
d4552007a7 AppUpdateView: Show icons on incompatible updates buttons
- Slashed circle: Disabled
- Shield with a cross: Fails certificate verification

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-12 15:03:42 +05:30
Aayush Gupta
41b13c3429 UpdatesViewModel: Allow users to filter cert-verification failed updates
If a user has incompatible updates turned on, show them updates which fails
certificate verification as well.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-12 15:03:42 +05:30
Aayush Gupta
259faed3fd Revert "OnboardingFragment: Create required notification channels"
This reverts commit f84ab072e5.

Work Profile behaves weirdly and fails to create notification channels sometimes otherwise
2024-02-08 15:52:29 +01:00
Aayush Gupta
473d59ad78 AppInstaller: Make lint happy about version check for shizuku
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-08 12:49:22 +01:00
Aayush Gupta
c651a65a91 SessionInstaller: Claim responsibility for future updates
The new setRequestUpdateOwnership() method allows us to indicate to the system that we intend to be responsible for future updates to an app it is installing.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-08 10:53:08 +01:00
Aayush Gupta
cb584db2e4 AMInstaller: Support installing shared libraries as well
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-07 21:12:48 +01:00
Aayush Gupta
4297bac4fe AppMenuSheet: Use ACTION_CREATE_DOCUMENT to export APK
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-01 12:00:37 +01:00
Aayush Gupta
aa95542b0d Preferenes: Drop wifi only download support
Not used anywhere nor working with rework. Needs to be implemented properly
before adding again.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-02-01 10:40:44 +01:00
Aayush Gupta
7e899ff8eb IInstaller: Support installing shared libraries via supported installers
Session, Shizuku and Root Installer are supported for now. Native and Aurora Services
have been deprecated and won't be supported. App Manager might support it or it will
be deprecated as well (if it doesn't).

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-27 18:43:56 +05:30
Aayush Gupta
c562f4351e IInstaller: Use Download object for installing apps
Contains all required data for us to install an app making things easier
to work with.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-26 13:15:26 +05:30
Aayush Gupta
1ebe86a22b UpdatesFragment: Check if downloads are running instead of finished
Update all button otherwise shows cancel on first run

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-25 20:17:31 +05:30
Aayush Gupta
683c00ee0d SearchResultsFragment: Update navArg when query is updated
Switch from args to arguments as the current one caches the old
value and returns it again on creation.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-21 19:19:59 +05:30
Aayush Gupta
87b4301eb1 InstallActivity: Extend AppCompatActivity instead of Activity
This lets us use hilt for dependency injection here

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-20 18:37:27 +05:30
Aayush Gupta
8de734761f DownloadMenuSheet: Show toast if files are missing for install
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-20 15:28:01 +05:30
Aayush Gupta
09c64a7002 AppInstaller: Use hilt to manage instance
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-20 15:22:36 +05:30
Aayush Gupta
859d32d878 AppInstaller: Always use intent based uninstallation of apps
This requests user's confirmation before uninstallation every time which
is what we want to happen as well.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-20 15:12:57 +05:30
Aayush Gupta
580717931d DownloadMenuSheet: Add install action
This would be useful for self-updates when they get downloaded but user
isn't automatically installed.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-16 18:41:19 +05:30
Aayush Gupta
a3591406b2 Download: change status parameter to downloadStatus
We want an installStatus parameter as well to enqueue installations as well

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-16 18:22:46 +05:30
Aayush Gupta
262ee94d84 DownloadFragment: Avoid capturing download object in listener
This results in their state never being updated when passed to menu fragment.
Store the ongoing downloads in a list and find it when required using the
package name instead.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-09 19:42:16 +05:30
Aayush Gupta
8c7377efd6 AppDetailsFragment: Link exodus analysis submission page
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-08 21:01:25 +05:30
Aayush Gupta
e23d17e4ac Context: Switch to Intent for share extension
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2024-01-02 11:32:03 +05:30
Aayush Gupta
25f2b111c2 fixup! UpdatesPreference: Setup auto-updates
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2023-12-31 19:37:33 +05:30
Aayush Gupta
f851a5ad3e Improvements to download progress UI
Switch to LinearProgressIndicator where possible and show an indeterminate
progress bar while download progress is below 1%

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2023-12-31 15:54:05 +05:30