Commit Graph

1043 Commits

Author SHA1 Message Date
Aayush Gupta
31c6eff6b3 composables: Pass onClick parameter directly to composable wherever possible
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-04-03 17:12:48 +08:00
Aayush Gupta
dfce3ab990 GoogleFragment: Move authevent check to flow collector
lint warns that when checks are exhastive otherwise

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-23 17:24:45 +08:00
Aayush Gupta
57f29ff094 SplashFragment: Handle SHOW_APP_INFO intents
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-21 12:00:01 +08:00
Aayush Gupta
c458aa2afe SpoofProvider: Use Locale.Builder to construct locale for spoofing
Locale() constructor has been deprecated and the new of() method is API 36.
Locale.Builder is backwards compatible.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-19 13:16:49 +08:00
Aayush Gupta
9cbe7a57f9 InstallerStatusReceiver: Use correct installer package name on manual install
Only silent installers such as root and shizuku can spoof installer package name.
Use appropriate installer package name when doing manual install.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-17 17:40:21 +08:00
Aayush Gupta
51bc60e6e7 NotificationUtil: Respect user's system notification visibility settings
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-17 16:00:35 +08:00
Aayush Gupta
655c7cd59f DownloadWorker: Notify dowload failure on network error as well
We can do special handling when ready but failure is a failure regardless.
Notify the user about it.

Also remove non-required default exception parameter as all instances of onFailure
specify an appropriate exception.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-17 14:26:25 +08:00
Aayush Gupta
075c6e1c05 work: appContext -> context
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-17 14:26:23 +08: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
Aayush Gupta
bbeb11b847 DownloadWorker: Move back verification to same IO dispatcher
NonCancellable dispatcher breaks the parent and child job relation which
while ensures the new job is not cancelled when parent fails, the parent job
also no longer waits for the child to finish.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-17 14:22:38 +08:00
Rahul Patel
62e88b2205 Theme: fix themes for composables 2025-03-16 18:53:17 +05:30
Aayush Gupta
9af602267b DownloadWorker: Switch to ktx extension for bitmap scaling
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-13 12:26:49 +08:00
Aayush Gupta
1f3cea116c DownloadWorker: Drop non-required check for authdata validity
The parent worker (AuthWorker) already does the required verification
and refresh the AuthData if expired. It will never be expired in this
case.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-13 12:23:56 +08:00
Aayush Gupta
7c2e9dc399 DownloadWorker: Drop non-required check for nullable packageName
packageName will never be null as App() constructor enforces specifiying
packageName atleast similar to Download() class.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-13 12:23:04 +08:00
Aayush Gupta
2a2a0930c4 fixup! Audit DownloadHelper & UpdateHelper scopes
Move back both UpdateHelper and DownloadHelper to mainscope as they
are only for observing changes to the data and don't need to be run
on a IO dispatcher

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-12 16:08:46 +08:00
Rahul Patel
8053d1f3bc Downloadworker: fix notification issue 2025-03-07 20:23:45 +05:30
Rahul Patel
89f45f13d5 reformat files recently touched 2025-03-07 18:26:04 +05:30
Rahul Patel
585284fb10 improve microG account login & token refresh logic 2025-03-07 18:26:04 +05:30
Aayush Gupta
0ead570a70 Optimize imports treewide
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-07 18:26:04 +05:30
Rahul Patel
991b974920 MainScope = SupervisorJob() + Dispatchers.Main
-- Kaiko chhedta hai re baba!
2025-03-07 18:26:04 +05:30
Rahul Patel
b24eafea7a Audit DownloadHelper & UpdateHelper scopes
Action Items:
- monitor changes for ~3days, do self-test to ensure it doesn't break anything
- also verify changes on older devices & other android skins MIUI, OneUI, EMUI
2025-03-07 18:26:04 +05:30
Rahul Patel
33462d772a PermissionProvider: cleanup 2025-03-07 18:25:51 +05:30
Rahul Patel
50b32101af NotificationUtil: update download cancel intent 2025-03-07 18:24:10 +05:30
Rahul Patel
e958a84a33 DownloadWorker: improve download interrupt scene
- if user cancels download, purge downloaded APKS + temps
- if download is interrupted, say due to network or space constraint, retain downloads & inform failure

TODO:
- add retry/resume download option
2025-03-07 18:24:10 +05:30
Rahul Patel
330762d86d DownloadWorker: more work 2025-03-07 18:24:10 +05:30
Rahul Patel
46d4322976 DownloadWorker: simplify & improve code [2/2] 2025-03-07 18:24:10 +05:30
Rahul Patel
667017aec6 DownloadWorker: simplify & improve code [1/2]
TODO:
- Reduce notification frequency, create too many notifications resulting in notification actions being inaccesible.
- Its a bad practive to bombard system with notification redraws
2025-03-07 18:24:10 +05:30
Aayush Gupta
3d8706da0b fixup! NetworkProvider: improvements + workaround for Android L
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-07 18:24:10 +05:30
Rahul Patel
9561f617d7 DownloadWorker: minor notification tweak 2025-03-07 18:24:10 +05:30
Rahul Patel
8af3fde374 DownloadWorker: improve file verification 2025-03-07 18:24:10 +05:30
Rahul Patel
b867d4a527 DownloadWorker: fix download status misinformation
-- cancellation ≠ failure
-- report cause of other failures
2025-03-07 18:24:10 +05:30
Rahul Patel
41a4db751c NetworkProvider: improvements + workaround for Android L 2025-03-07 18:24:10 +05:30
Rahul Patel
76b6551247 SessionInstaller: minor improvements
-- also fixes https://gitlab.com/AuroraOSS/AuroraStore/-/issues/1151
2025-03-07 18:24:10 +05:30
Aayush Gupta
4fb38e8361 store: Switch to kotlin extension method for converting String to Uri
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-06 17:50:58 +05:30
Aayush Gupta
e17c78e107 PackageUtil: Capture all exceptions when checking archived status
Packages can be hidden using DevicePolicyManager leading to getArchivedPackage
throwing IllegalArgumentException.

Ref: https://developer.android.com/reference/android/app/admin/DevicePolicyManager.html#setApplicationHidden(android.content.ComponentName,%20java.lang.String,%20boolean)

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-03-05 18:07:55 +05:30
Aayush Gupta
9b23b18b3e store: ctx -> context
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-22 11:47:07 +08:00
Aayush Gupta
302c232ad1 fixup! compose: Replicate BlacklistFragment in compose
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-22 11:37:06 +08:00
Aayush Gupta
dd1b1bff4b composables: Add missing preview for app bars
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-22 11:31:14 +08:00
Rahul Patel
676fd89146 OOBE: another attemp to fix issues on Android 11 & 12 2025-02-21 23:27:41 +05:30
Aayush Gupta
6aa94b2a81 UpdatesPreference: Hide frequency and restriction pref as needed
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-18 16:07:23 +08:00
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
86d085fe55 preferences: Relocate certain perference classes to dedicated package
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-18 14:51:49 +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
Aayush Gupta
a9b2f0acf2 compose: Replicate BlacklistFragment in compose
Introduce a new activity to host composables as View system behaves
quite bad when composable are used inside it.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-16 15:07:47 +08:00
Aayush Gupta
f4434c02fb theme: Relocate to compose directory
Also apply missing copyright and license header

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-16 15:07:47 +08:00
Aayush Gupta
50241ed376 compose: Replicate epoxy views with composables
Jetpack compose allows creating custom views easily without third-party
libraries. Replicate all epoxy custom views with compose to be able to
replace it easily in future when and where ever required.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-16 15:07:47 +08:00
Aayush Gupta
2014073c91 Revert "Revert "PackageInfo: Filter out more core AOSP system apps""
This reverts commit 769511ae66.

* It was assumed that the logic was incorrect but it was fine
2025-02-16 15:07:47 +08:00
Aayush Gupta
66e6bdb38f Revert "PackageUtil: Load package infos in smaller chunks"
This reverts commit 1aeae36fc0.

* Will be fixed with paging3

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
2025-02-16 15:07:47 +08:00
ggabr
68628e8fd0 Export the database schema
Also set .gitlab-ci.yml to publish them at every build for convenience.

The exports should be committed (manually) to the git repository right after an
increase in database version.

Having the exports enables using autoMigrations when possible, for the future
database migrations.
2025-02-16 07:34:24 +01:00
Aayush Gupta
00cc84a2db Merge branch 'gabr/dbMigr1-2-3' into 'master'
Database, support migration from v1 and v2

Closes #1279

See merge request AuroraOSS/AuroraStore!440
2025-02-14 05:38:26 +00:00