Commit Graph

6034 Commits

Author SHA1 Message Date
Rahul Patel
fa4f7d829f Merge branch 'improvement/download-routine' into 'dev'
Fix issues around downloads & install states

See merge request AuroraOSS/AuroraStore!573
2026-05-30 03:58:36 +05:30
Rahul Patel
7d87a14c89 Harden download routine: storage checks, single verification, URL expiry
- Check free space before downloading (only the not-yet-fetched bytes) and, on
  Android O+, use StorageManager.getAllocatableBytes/allocateBytes so the system
  can evict its cache; fail fast with a clear message instead of dying mid-write.
  SessionInstaller sets a SessionParams size hint so staging can reserve space
  too.
- Verify each APK at most once: files already verified during the download pass
  are skipped in the final verification gate. Prefer SHA-256 and log SHA-1
  fallback.
- An expired download URL (403/410) now clears the stored file lists and retries,
  re-purchasing fresh URLs instead of repeatedly failing on the dead one.
- Cancel promptly mid-file rather than only between files, and cancel copyTo's
  progress timer in a finally to avoid leaking the timer thread.
- Download.canInstall now requires a real .apk on disk; DownloadStatus
  finished/running are Sets.
2026-05-30 00:49:04 +05:30
Rahul Patel
03638ca84c Track the install phase with INSTALLING/INSTALLED download states
A download row previously stopped at COMPLETED and never reflected whether the
app actually installed. Add INSTALLING/INSTALLED states driven by a central
installer-event observer in DownloadHelper:
- COMPLETED -> INSTALLING on the installer's first progress event
- -> INSTALLED on success (row kept so the APK can still be exported)
- a failed install reverts INSTALLING -> COMPLETED so it can be re-installed
  without re-downloading

Consumers that branched on COMPLETED are updated (App Details state, MicroG
status mapping, Downloads list icon). downloadStatus is stored as TEXT so no
schema migration is needed.
2026-05-30 00:37:05 +05:30
Rahul Patel
7e8746dbcb Abandon staged install session when a download is cancelled
Cancelling a download cancelled the worker and marked the row CANCELLED but
never abandoned a PackageInstaller session that had already been staged for
install, leaking it. Add IInstaller.cancelInstall (no-op default, implemented by
SessionInstaller) and call it from DownloadHelper.cancelDownload.

Cross-process session persistence/reconciliation (committing a session staged
before a restart) is left as a follow-up; the startup session cleanup remains,
and is now cheap to recover from since CacheWorker keeps the downloaded files.
2026-05-30 00:29:49 +05:30
Rahul Patel
ab9b66eb94 Serialize downloads and make cache cleanup install-aware
- CacheWorker no longer purges the files of a download that is still in-flight
  or downloaded and awaiting install, so missing the system install prompt for
  longer than the cache window no longer forces a re-download.
- observeDownloads now starts the next queued download only once nothing else
  is purchasing/downloading/verifying, instead of merely checking for a
  DOWNLOADING row. This serializes downloads so concurrent workers can't clobber
  the shared foreground/progress notification.
2026-05-30 00:27:51 +05:30
Rahul Patel
ada5a1f899 Harden download routine against redownloads and flaky networks
- enqueue() no longer resets an active/verifying download back to QUEUED, so
  the periodic update check and repeated taps can't trigger needless
  re-downloads; when files are already downloaded & verified it installs
  directly instead of re-running the pipeline.
- DownloadWorker only purges partial files on a genuine user cancellation;
  system-initiated stops (lost connectivity, quota) keep partials and retry,
  fixing downloads appearing to restart on a flaky network.
- Add NetworkType.CONNECTED constraint + exponential backoff and return
  Result.retry() for transient/network failures (capped) instead of always
  succeeding.
- Validate HTTP 206 before resuming a .tmp (overwrite on 200) and drop corrupt
  files on verification failure so retries restart clean.
2026-05-30 00:19:33 +05:30
Rahul Patel
d13d50e442 Surface self-updates through the regular updates list
Fold Aurora Store's self-update back into the existing update pipeline
instead of a dedicated sheet/viewmodel/helper. The feed entry is mapped
to a regular App and added to the update list, reusing the standard
download + install path; it is never auto-installed silently.

- Add a dedicated "Self-update" section in the Updates tab with the
  app-details navigation disabled (it's served from the Aurora OSS feed).
- Gate eligibility via PackageUtil.isSelfUpdateSupported(): vanilla/preload
  flavors, not debug, not F-Droid (huawei excluded by flavor).
- Add a build-aware Settings toggle as the opt-out, removing the row
  immediately when disabled.
- Exempt nightly self-updates from deleteInvalidUpdates (static version
  code) and drop any stale self-update row when none is offered, so a
  phantom update doesn't linger after a self-install.
2026-05-29 23:28:09 +05:30
Rahul Patel
71f6538d46 vm: let paging errors surface so retry() re-runs the load
Stream/ExpandedStream/Review/Search paging VMs were swallowing exceptions
inside manualPager and returning emptyList, so the pager never entered
LoadState.Error and the error-placeholder retry buttons were dead. Let
non-Auth exceptions propagate; keep the AuthException → SessionExpired
branch so 401 still hands off to Splash.

Also drop supervisorScope wrappers from CategoryStream/DevProfile/TopChart
VMs that launch no children — the surrounding try/catch already handles
everything.
2026-05-29 01:31:48 +05:30
Rahul Patel
0bcb087be2 use a SessionExpired event instead of a retry loop 2026-05-29 01:31:48 +05:30
Rahul Patel
bae9233b27 Update viewmodel to reflect gplayapi changes 2026-05-29 01:31:48 +05:30
Rahul Patel
eada663bfb compose: use ic_refresh icon on retryable error placeholders 2026-05-29 01:31:48 +05:30
Rahul Patel
272870ddd2 auth: refresh anonymous session on activity resume
Long-backgrounded sessions (especially on aggressive vendors like Huawei)
could leave the Play token invalid and OkHttp's connection pool full of
dead sockets, producing a perpetual loading spinner with no error.

- ComposeActivity#onStart probes the saved token via isSavedAuthDataValid;
  on failure evicts the OkHttp pool and refreshes anonymous auth.
- AuthProvider gains authReady StateFlow, awaitReady(), and a mutex-guarded
  refreshAnonymousAuth() so concurrent callers don't double-fetch.
- Play-backed ViewModels (AppDetails, DevProfile, MoreApps, Reviews, Search,
  ExpandedStreamBrowse, Category) await refresh completion before issuing
  helper calls, closing the race between resume-time refresh and screen
  LaunchedEffect fetches.
- AppDetailsScreen rendered Error as Loading when app was null; reorder so
  Error wins and wire a Retry button through Placeholder.
- Stream/Review/Search/DevProfile/CategoryBrowse error placeholders gain
  Retry actions wired to PagingItems.retry() or the VM's fetch.
- CategoryViewModel was logging-only on failure; now emits ViewState.Error
  with a matching Retry path in CategoriesPage.
2026-05-29 01:31:48 +05:30
Rahul Patel
ada4e8de2a fix: google account login - 2 2026-05-29 01:31:48 +05:30
Rahul Patel
1607529bbd fix: google account login 2026-05-29 01:31:48 +05:30
Rahul Patel
ab888fab75 rootinstaller: fix apps being installed on main profile from work profile
Resolves: #1382
2026-05-29 01:31:48 +05:30
Rahul Patel
7bb2728b57 favourites: add a check icon to indicate app is installed
resolves: #1153
2026-05-29 01:31:47 +05:30
Rahul Patel
0b0a537841 Merge branch 'weblate-aurora-store-aurorastore-translations' into 'master'
Translations update from Hosted Weblate

See merge request AuroraOSS/AuroraStore!571
2026-05-28 15:27:23 +05:30
Guzleon
a3c31780c3 Translated using Weblate (Spanish)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/es/
2026-05-27 16:11:41 +02:00
cyberboh
bc5c694844 Translated using Weblate (Indonesian)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/id/
2026-05-27 16:11:38 +02:00
Priit Jõerüüt
4354be5559 Translated using Weblate (Estonian)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/et/
2026-05-27 16:11:36 +02:00
jonnysemon
9efdc5ffb6 Translated using Weblate (Arabic)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/ar/
2026-05-25 20:11:40 +00:00
Mirosław Żylewicz
e3d1f50de6 Translated using Weblate (Polish)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/pl/
2026-05-25 20:11:39 +00:00
Edgars Andersons
9bb7e46a96 Translated using Weblate (Latvian)
Currently translated at 90.6% (483 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/lv/
2026-05-25 20:11:38 +00:00
Rahul Patel
8fad5a7b76 Merge branch 'weblate-aurora-store-aurorastore-translations' into 'master'
Translations update from Hosted Weblate

See merge request AuroraOSS/AuroraStore!570
2026-05-25 02:16:55 +05:30
AO yahoe.001
2e60707820 Translated using Weblate (French)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/fr/
2026-05-24 20:11:39 +02:00
ssantos
c2aa6444e7 Translated using Weblate (Portuguese)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/pt/
2026-05-24 20:11:37 +02:00
jonnysemon
097dd47437 Translated using Weblate (Arabic)
Currently translated at 94.3% (503 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/ar/
2026-05-24 20:11:35 +02:00
Mirosław Żylewicz
57fa52893e Translated using Weblate (Polish)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/pl/
2026-05-24 20:11:33 +02:00
Mirosław Żylewicz
57a7c964df Translated using Weblate (Polish)
Currently translated at 99.2% (529 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/pl/
2026-05-23 17:12:26 +02:00
AO yahoe.001
7d2650e844 Translated using Weblate (French)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/fr/
2026-05-23 17:12:23 +02:00
Mickaël Binos
67688775a7 Translated using Weblate (French)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/fr/
2026-05-23 17:12:22 +02:00
Sylvain Pichon
c7b552924c Translated using Weblate (French)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/fr/
2026-05-23 17:12:20 +02:00
Besnik Bleta
c8bf4c168b Translated using Weblate (Albanian)
Currently translated at 99.2% (529 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/sq/
2026-05-23 17:12:18 +02:00
大王叫我来巡山
c5d2c57577 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/zh_Hans/
2026-05-23 17:12:14 +02:00
VfBFan
23fc54db30 Translated using Weblate (German)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/de/
2026-05-23 17:12:10 +02:00
Arif Budiman
532602a465 Translated using Weblate (Indonesian)
Currently translated at 99.6% (531 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/id/
2026-05-23 17:12:04 +02:00
Ghost of Sparta
df552982cc Translated using Weblate (Hungarian)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/hu/
2026-05-23 17:11:55 +02:00
Dan
77c15431cf Translated using Weblate (Ukrainian)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/uk/
2026-05-23 17:11:46 +02:00
Fjuro
9b7a47b62c Translated using Weblate (Czech)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/cs/
2026-05-23 17:11:44 +02:00
LucasMZ
491e8812b5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/pt_BR/
2026-05-23 17:11:38 +02:00
ojppe
74699ec0e7 Translated using Weblate (Dutch)
Currently translated at 100.0% (533 of 533 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/nl/
2026-05-23 17:11:34 +02:00
Rahul Patel
d5bc58c98b Merge branch 'patch-1' into 'master'
Edited the about section with the account requirement.

See merge request AuroraOSS/AuroraStore!512
2026-05-20 15:05:03 +05:30
vdbhb59
a17fb8c82f Edited the about section with the account requirement. 2026-05-20 15:05:02 +05:30
Rahul Patel
fa5bec4e60 Merge branch 'dev' into 'master'
dev

See merge request AuroraOSS/AuroraStore!568
2026-05-20 12:29:46 +05:30
Rahul Patel
948e190611 Merge branch 'weblate-aurora-store-aurorastore-translations' into 'master'
Translations update from Hosted Weblate

See merge request AuroraOSS/AuroraStore!565
2026-05-20 12:28:41 +05:30
Rahul Patel
6a8e6fac43 Merge branch 'compose-rewrite-audited' into 'dev'
compose: wrap up rewrite

See merge request AuroraOSS/AuroraStore!567
2026-05-20 11:31:00 +05:30
Rahul Patel
0493075783 installed/blacklist: add sort & filter sheet + dedicated list item [1/2]
Share a sort/filter sheet between InstalledScreen and BlacklistScreen via
new commons module (SortFilterState + SortFilterSheet + applyFilter/applySort
on InstalledAppMeta), persisted per-screen. InstalledScreen renders a new
InstalledAppListItem that surfaces size, last-update, and installer instead
of Play-listing extras. Blacklisted rows now desaturate their icons.
2026-05-20 03:43:36 +05:30
vcodesai
77124254e3 Translated using Weblate (Greek)
Currently translated at 99.5% (484 of 486 strings)

Translation: Aurora Store/Android
Translate-URL: https://hosted.weblate.org/projects/aurora-store/aurorastore-translations/el/
2026-05-19 20:14:31 +00:00
Rahul Patel
572387d7b5 downloads: minor syntax change 2026-05-20 01:30:33 +05:30
Rahul Patel
b84f3a3fa9 updates: fix stale UI states & cancel-all coverage
- AppUpdateItem now shows a disabled "Installing" button while the
  download is COMPLETED and awaiting install, instead of briefly
  reverting to "Update" between download-done and InstallerEvent.Installed.
- Section header replaces all-or-nothing "Update all" toggle with an
  any-active check, so "Cancel all" appears as soon as a single update
  is in flight. Same treatment for the ownership-approval section.
- Empty placeholder no longer hides the ignored-updates list when there
  are no live updates.
- DownloadHelper.cancelAll also flips COMPLETED -> CANCELLED so the
  Cancel-all button gives immediate feedback for pending-install rows.
- DownloadListItem: surface the failed icon for FAILED downloads too.
2026-05-20 01:21:19 +05:30