Commit Graph

249 Commits

Author SHA1 Message Date
Rahul Patel
60a6df58c5 Organise notification channels into system-settings groups
Group the five channels under two headings in the system notification
settings so they're easier to navigate: "Downloads & updates" (progress,
installed, updates, export) and "Alerts" (errors and action-required).

Purely organisational; channel importances and behaviour are unchanged.
2026-05-30 18:27:25 +05:30
Rahul Patel
a660983438 Add a Notifications settings screen with a progress toggle
There was no in-app control over notifications. Add a Notifications
preference screen under Settings offering:

- "Show download progress": when off, downloads/updates no longer post
  per-tick progress; a single quiet foreground notification keeps the
  work running in the background (honouring the mandatory FGS rule).
- Deep links into each notification category's system settings (O+) so
  users can tune sound and importance per channel.
- A shortcut to enable notifications when they're turned off at the
  system level, so the screen degrades gracefully.

The download worker reads the progress preference live, keeping its
foreground notification minimal and skipping progress refreshes when
the user has opted out. POST_NOTIFICATIONS is already handled by the
onboarding permission flow, so no duplicate prompt is added here.
2026-05-30 18:17:52 +05:30
Rahul Patel
aa5d3fcc4b Group install and failure notifications under summaries
A bulk update produced one standalone notification per app for both
successes and failures, flooding the shade. Bundle these terminal
notifications into two groups, each with a collapsible summary that
lists the apps via InboxStyle:

- "N apps installed" on the (LOW, silent) installed channel, expiring
  on its own since it's informational.
- "N apps failed" on the (HIGH) alerts channel, persisting until
  handled and carrying a Retry action per app.

Summaries are rebuilt from the live posted notifications rather than
tracked state, so they stay correct across retries, dismissals and
process restarts, and are only posted on Android N+ where the system
actually renders groups.

Retry re-queues the download via a new DownloadRetryReceiver; the
worker resumes from verified files on disk, so retrying an install
failure re-installs without re-downloading.
2026-05-30 18:07:28 +05:30
Rahul Patel
012f4dcc26 Restructure notification channels by intent and importance
Notifications were too intrusive: install-success and export sat on
IMPORTANT_HIGH channels and produced heads-up alerts for every app,
while genuine download failures were buried in the IMPORTANCE_MIN
downloads channel where they were easily missed.

Restructure the channels around user intent:

- Download progress -> MIN, silent, no badge
- Installed apps    -> LOW, silent (was HIGH)
- Updates available -> DEFAULT, silent
- App export        -> LOW, silent (was HIGH)
- Errors & alerts   -> HIGH (new, the only heads-up channel)

Failed downloads, installer-status errors and the unarchive auth prompt
now route to the high-importance alerts channel so they aren't lost,
while successful installs/exports stay quiet.

Android ignores importance edits on an already-created channel, so the
install/export channels get new IDs and the retired IDs (including the
folded-in account channel) are deleted on next launch.
2026-05-30 17:54:59 +05:30
Rahul Patel
a68d1b276d Add optional app lock behind biometric or device credential
Implements a full app lock (issue #1313) gating Aurora Store behind the
device biometric or, where unavailable, the screen-lock credential
(PIN/pattern/password) so it also works on TVs and older phones.

- AppLockManager: process-scoped, in-memory lock state so a cold start is
  always locked, with a short background grace timeout to avoid
  re-prompting during the install dialog or the biometric sheet itself.
- AppLockAuthenticator: BiometricPrompt wrapper using
  BIOMETRIC_STRONG | DEVICE_CREDENTIAL on API 30+ and
  setDeviceCredentialAllowed on older releases, plus an enrollment check.
- ComposeActivity (now a FragmentActivity) gates content via a three-state
  machine (AUTHENTICATING/LOCKED/UNLOCKED); the authenticating state shows
  a blank surface behind the prompt so dismissing it never flashes the
  lock card. Re-locks on return past the timeout and sets FLAG_SECURE
  while locked.
- Toggle lives on a dedicated Security preference screen, reached from
  Settings like the other preference entries.
2026-05-30 15:25:27 +05:30
Rahul Patel
db9a7723a8 Fall back to session installer when chosen installer is unavailable
Address #1386

The Shizuku branch of getPreferredInstaller() already fell back to the
session installer, but the guard hasShizukuPerm() called
Shizuku.checkSelfPermission(), which throws when the binder is not alive
(Shizuku disabled). The exception escaped before the fallback could run,
so installs failed instead of falling back.

- Guard hasShizukuPerm() on Shizuku.pingBinder() and swallow failures so
  it returns false (instead of throwing) when Shizuku is unavailable,
  letting the existing fallback run. This also fixes canInstallSilently().
- Detect when any chosen installer resolves to the default and optionally
  inform the user via a toast, gated by notifyOnFallback so cancel/remove
  callers stay silent while real install paths surface it.
2026-05-30 05:58:53 +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
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
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
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
Rahul Patel
8f0bf55714 updates: granular installer filters + advanced-section move
- New SourceFiltersScreen with All toggle + add/remove of specific
  installer package names. Backed by PREFERENCE_FILTER_INSTALLERS
  (Set<String>); PREFERENCE_FILTER_AURORA_ONLY preserved as the All
  switch for backward compat.
- UpdateWorker reads installer via getInstallSourceInfo (R+) / falls
  back to deprecated getInstallerPackageName below.
- UpdatesPreferenceScreen: "Filter F-Droid apps" moved to Advanced;
  "Filter apps from other sources" becomes a navigation row to the
  new sub-screen with a state summary.
2026-05-19 12:14:59 +05:30
Rahul Patel
106779737c updates: switch frequency slider to discrete preset chooser
Replace the 1-24h slider with a SingleChoiceDialog listing 7 presets
(3h, 6h, 12h, 24h, 3d, 7d, 15d). Storage stays as an Int hour count
under the same preference key, so old values keep working; off-preset
values display as the nearest preset but are only overwritten when the
user picks something new.
2026-05-19 12:14:59 +05:30
Rahul Patel
1e191e13c8 updates: revamp updates UX
- Group updates into main / approval-required / incompatible / ignored
- New ignored_update table (v8) with per-version skip support
- isIncompatible flag on pristine system apps for HyperOS / GrapheneOS (v7)
- requiresOwnershipTransfer() runtime check on Android 14+
- Rename AppMenuSheet -> AppUpdateSheet; drop MinimalApp, nav carries Update
- Trim AppUpdateItem (no changelog dropdown / long-click)
- Fix DownloadHelper.downloadsList recomposition flicker (stable StateFlow)
- ExportWorker is now download-only
2026-05-19 12:14:59 +05:30
Rahul Patel
59d297386c compose: trim themes, attrs and gradle deps for compose-only UI
Drops the legacy AuroraTheme styles, custom attrs and now-unused
styles_widget/styles_text overlays. Updates the dark/light themes,
strings, arrays, dimens and colors to match what the Compose screens
consume. Adds ic_logo_alt and tweaks the launcher/logo drawables.
Trims gradle dependencies tied to the removed Fragment/Epoxy stack.
2026-05-19 12:14:44 +05:30
Rahul Patel
53aff0e24f auth: lets keep an eye on microG bundle uninstall 2026-05-11 22:21:23 +05:30
Rahul Patel
2073608970 blacklist: fix search & group selected apps under sticky headers 2026-05-08 01:27:35 +05:30
Rahul Patel
ec3427c785 appdetails: add back view on playstore action 2026-05-06 14:08:36 +05:30
Rahul Patel
0c1786e77b microg: Improve bundle installation state & UX 2026-05-06 01:17:05 +05:30
Rahul Patel
8fdc560907 appdetails: improve ui states 2026-04-27 21:08:04 +05:30
Aayush Gupta
06dd9b3d50 fixup! compose: details: Build and show updateable version in compose manually
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2026-01-13 00:15:56 +08:00
Aayush Gupta
e6c1b5446b compose: dispenser: Migrate dispensers logic to compose
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-12-10 15:42:39 +08:00
Aayush Gupta
28e93b0af7 compose: spoof: Initial migration to compose
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-12-08 13:50:51 +08:00
Aayush Gupta
1cabc95309 compose: onboarding: Add a skip and finish button at end pages
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-12-01 20:53:20 +08:00
Aayush Gupta
6de6498418 androidTest: Add tests for reusable composable
* Add semantics wherever required to make composable easy to test

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-11-12 13:47:46 +08:00
Rahul Patel
1142ecac80 Add microG Installer 2025-11-03 11:28:51 +05:30
Aayush Gupta
48d0be21f8 strings: Minor improvement
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-10-03 11:33:31 +08:00
Aayush Gupta
5eaa09ed41 compose: commons: Better topbar title for permission requests
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-09-29 16:23:50 +08:00
Aayush Gupta
812d13cb44 compose: details: Better handle purchase state
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-09-18 18:55:10 +05:30
Aayush Gupta
5711e6db3b compose: details: Show error on entering non-digit characters for manual download
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-09-01 14:22:23 +08:00
Aayush Gupta
3a41491bf4 strings: Be more netural when communicating about rate-limiting
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-09-01 14:01:40 +08:00
Aayush Gupta
6cdb744099 compose: search: Bring back filters for search results
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-08-25 16:02:15 +08:00
Aayush Gupta
62e81da258 compose: Initial migration of searching logic to compose
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-08-20 10:14:42 +08:00
Aayush Gupta
0a721fa571 compose: details: Load description of permissions as well
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-08-20 10:14:42 +08:00
Aayush Gupta
097f5a7375 compose: Initial migration of AppDetails* logic to compose [2/*]
Deprecate setting to hide similar and related apps as they will be always
listed in the suggestions pane on widescreen devices

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-08-20 10:14:40 +08:00
Aayush Gupta
f6f858e9f5 compose: Initial migration of AppDetails* logic to compose [1/*]
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-08-20 10:13:29 +08:00
Rahul Patel
aea945491d Allow huawei variants to install microG & support silent installs. 2025-07-05 14:59:41 +05:30
Aayush Gupta
3377774caf AppDetailsFragment: Localize permissions requested string
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-06-11 15:14:04 +08:00
Aayush Gupta
d4d990cac0 Minor string improvements
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-06-05 21:33:55 +08:00
Rahul Patel
e88e4a29a9 remove hard coded strings
TODO: Do not use regex on gplapi to extract mi android version, use actual string instead.
2025-05-28 12:08:25 +05:30
Aayush Gupta
7c9d307bde strings: Drop duplicate unused strings
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-05-20 22:54:32 +08:00
Aayush Gupta
7ee1eadd28 preferences_updates: Update language for filters to be more clear
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-05-20 16:56:53 +08:00
Aayush Gupta
81657d2547 Merge branch 'string-updates-notifications' into 'master'
strings: fix `notification_channel_updates`

See merge request AuroraOSS/AuroraStore!461
2025-03-31 08:36:08 +05:30
LucasMZ
249054207f strings: don't use title case for most stuff
this is already the case but some strings didn't respect it, or didn't use it for names e.g. Aurora Services, or Google Play Store, etc.
2025-03-30 23:56:22 -03:00
LucasMZ
9b3166bc08 strings: fix notification_channel_updates
The way it was written makes it sound like it was describing something that updates notifications, instead of what it is, that it specifies that these notifications are about updates
2025-03-30 18:32:02 -03:00
Aayush Gupta
449a7d09f4 DownloadWorker: Use localized error string resources
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-17 14:25:48 +08:00
Rahul Patel
33462d772a PermissionProvider: cleanup 2025-03-07 18:25:51 +05:30
Aayush Gupta
5c7289381f UpdatesPreference: Allow to configure automated updates constraints
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-18 15:56:16 +08:00
Aayush Gupta
076b6ad291 NetworkPreferences: Simplify proxy setup yet again
* Allow to view and edit proxy URL without turning it off and on
* Add a new disable button in proxy dialog
* Trim whitespace and disallow new lines in the proxy URL field
* Disable buttons when not applicable

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-18 14:46:42 +08:00