├── base
├── .gitignore
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── com
│ │ └── afterroot
│ │ └── allusive2
│ │ ├── base
│ │ ├── compose
│ │ │ ├── Actions.kt
│ │ │ └── ViewState.kt
│ │ ├── CoroutineDispatchers.kt
│ │ └── InvokeStatus.kt
│ │ └── MyAppGlide.kt
└── build.gradle.kts
├── data
├── .gitignore
├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ └── java
│ │ └── com
│ │ └── afterroot
│ │ └── allusive2
│ │ ├── database
│ │ ├── DeleteListener.kt
│ │ ├── Helpers.kt
│ │ └── DatabaseFields.kt
│ │ ├── Result.kt
│ │ ├── model
│ │ ├── SkuModel.kt
│ │ ├── LocalUser.kt
│ │ ├── RoomPointer.kt
│ │ ├── Pointer.kt
│ │ ├── PointerRequest.kt
│ │ └── LocalPointerRequest.kt
│ │ ├── utils
│ │ ├── State.kt
│ │ └── DataUtils.kt
│ │ ├── data
│ │ ├── FirebaseExtensions.kt
│ │ ├── mapper
│ │ │ ├── UserMapper.kt
│ │ │ └── PointerMapper.kt
│ │ └── stub
│ │ │ └── StubHelpers.kt
│ │ └── Constants.kt
├── build.gradle.kts
└── schemas
│ └── com.afterroot.allusive2.database.MyDatabase
│ ├── 1.json
│ └── 2.json
├── domain
├── .gitignore
├── build.gradle.kts
└── src
│ └── main
│ ├── AndroidManifest.xml
│ └── java
│ └── com
│ └── afterroot
│ └── allusive2
│ └── domain
│ └── interactors
│ └── PagingPointerRequest.kt
├── ui
├── home
│ ├── .gitignore
│ ├── src
│ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── afterroot
│ │ │ └── allusive2
│ │ │ └── home
│ │ │ └── HomeActions.kt
│ └── build.gradle.kts
├── magisk
│ ├── .gitignore
│ ├── module
│ │ ├── empty-module
│ │ │ ├── system
│ │ │ │ └── framework
│ │ │ │ │ └── APK_HERE
│ │ │ ├── META-INF
│ │ │ │ └── com
│ │ │ │ │ └── google
│ │ │ │ │ └── android
│ │ │ │ │ ├── updater-script
│ │ │ │ │ └── update-binary
│ │ │ └── module.prop
│ │ └── rro-module
│ │ │ ├── system
│ │ │ └── vendor
│ │ │ │ └── overlay
│ │ │ │ └── placeholder
│ │ │ ├── META-INF
│ │ │ └── com
│ │ │ │ └── google
│ │ │ │ └── android
│ │ │ │ ├── updater-script
│ │ │ │ └── update-binary
│ │ │ └── module.prop
│ ├── src
│ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── afterroot
│ │ │ └── allusive2
│ │ │ └── magisk
│ │ │ └── Extensions.kt
│ └── build.gradle.kts
└── repo
│ ├── .gitignore
│ ├── src
│ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── afterroot
│ │ │ └── allusive2
│ │ │ ├── ui
│ │ │ └── repo
│ │ │ │ ├── RepoState.kt
│ │ │ │ ├── RepoActions.kt
│ │ │ │ └── RRORequestFragment.kt
│ │ │ └── adapter
│ │ │ └── callback
│ │ │ └── ItemSelectedCallback.kt
│ │ └── res
│ │ ├── menu
│ │ └── menu_repo.xml
│ │ └── layout
│ │ └── fragment_rro_request.xml
│ └── build.gradle.kts
├── version.properties
├── common
└── ui
│ ├── compose
│ ├── .gitignore
│ ├── src
│ │ └── main
│ │ │ ├── AndroidManifest.xml
│ │ │ └── java
│ │ │ └── com
│ │ │ └── afterroot
│ │ │ └── ui
│ │ │ └── common
│ │ │ └── compose
│ │ │ ├── theme
│ │ │ ├── Type.kt
│ │ │ ├── Shape.kt
│ │ │ ├── Theme3.kt
│ │ │ └── tokens
│ │ │ │ └── Chip.kt
│ │ │ ├── components
│ │ │ ├── Provides.kt
│ │ │ └── SwipeDismissSnackbar.kt
│ │ │ ├── utils
│ │ │ ├── FlowWithLifecycle.kt
│ │ │ └── UIUtils.kt
│ │ │ └── animation
│ │ │ └── FabAnimation.kt
│ └── build.gradle
│ └── resources
│ ├── .gitignore
│ ├── src
│ ├── main
│ │ ├── res
│ │ │ ├── drawable
│ │ │ │ ├── pointer.png
│ │ │ │ ├── ic_launch_screen.png
│ │ │ │ ├── ic_filter.xml
│ │ │ │ ├── ic_done_outline.xml
│ │ │ │ ├── ic_download.xml
│ │ │ │ ├── ic_layers.xml
│ │ │ │ ├── transparent_grid.xml
│ │ │ │ ├── ic_login_screen.xml
│ │ │ │ ├── ic_sort.xml
│ │ │ │ ├── ic_home.xml
│ │ │ │ ├── ic_add.xml
│ │ │ │ ├── ic_file_download.xml
│ │ │ │ ├── ic_dashboard.xml
│ │ │ │ ├── ic_delete.xml
│ │ │ │ ├── ic_action_minus.xml
│ │ │ │ ├── ic_info_round.xml
│ │ │ │ ├── ic_removed.xml
│ │ │ │ ├── ic_action_apply.xml
│ │ │ │ ├── ic_notifications.xml
│ │ │ │ ├── ic_action_save.xml
│ │ │ │ ├── ic_action_plus.xml
│ │ │ │ ├── filled_thumb_up.xml
│ │ │ │ ├── filled_thumb_down.xml
│ │ │ │ ├── outline_thumb_up.xml
│ │ │ │ ├── outline_thumb_down.xml
│ │ │ │ ├── ic_touch.xml
│ │ │ │ ├── launch_screen.xml
│ │ │ │ └── ic_settings.xml
│ │ │ ├── drawable-hdpi
│ │ │ │ └── ar_logo.png
│ │ │ ├── drawable-mdpi
│ │ │ │ └── ar_logo.png
│ │ │ ├── drawable-xhdpi
│ │ │ │ └── ar_logo.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── ar_logo.png
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-xxxhdpi
│ │ │ │ └── ar_logo.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-night-hdpi
│ │ │ │ └── ar_logo.png
│ │ │ ├── drawable-night-mdpi
│ │ │ │ └── ar_logo.png
│ │ │ ├── drawable-night-xhdpi
│ │ │ │ └── ar_logo.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── ic_launcher.png
│ │ │ │ ├── ic_launcher_round.png
│ │ │ │ └── ic_launcher_foreground.png
│ │ │ ├── drawable-night-xxhdpi
│ │ │ │ └── ar_logo.png
│ │ │ ├── drawable-night-xxxhdpi
│ │ │ │ └── ar_logo.png
│ │ │ ├── drawable-nodpi
│ │ │ │ └── transparent_rect.png
│ │ │ ├── values-hdpi
│ │ │ │ └── integers.xml
│ │ │ ├── values-xhdpi
│ │ │ │ └── integers.xml
│ │ │ ├── values-v29
│ │ │ │ └── colors.xml
│ │ │ ├── values
│ │ │ │ ├── preloaded_fonts.xml
│ │ │ │ ├── integers.xml
│ │ │ │ ├── plurals.xml
│ │ │ │ ├── arrays.xml
│ │ │ │ ├── dimens.xml
│ │ │ │ └── styles.xml
│ │ │ ├── menu
│ │ │ │ └── menu_common.xml
│ │ │ ├── anim
│ │ │ │ ├── layout_anim_fall_down.xml
│ │ │ │ ├── slide_in_left.xml
│ │ │ │ ├── slide_in_right.xml
│ │ │ │ ├── slide_out_left.xml
│ │ │ │ ├── slide_out_right.xml
│ │ │ │ ├── text_switcher_in.xml
│ │ │ │ ├── text_switcher_out.xml
│ │ │ │ └── li_anim_fall_down.xml
│ │ │ ├── values-v30
│ │ │ │ └── arrays.xml
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── ic_launcher.xml
│ │ │ │ └── ic_launcher_round.xml
│ │ │ ├── font
│ │ │ │ └── ubuntu.xml
│ │ │ ├── color
│ │ │ │ └── nav_state_list.xml
│ │ │ ├── values-w820dp
│ │ │ │ └── dimens.xml
│ │ │ ├── values-land
│ │ │ │ └── dimens.xml
│ │ │ └── drawable-v24
│ │ │ │ └── ic_login_screen.xml
│ │ └── AndroidManifest.xml
│ └── debug
│ │ └── res
│ │ └── values
│ │ └── strings.xml
│ └── build.gradle.kts
├── release
├── .gitignore
├── keystore.gpg
├── clean.sh
├── serviceAccount.gpg
├── decrypt.sh
└── encrypt.sh
├── allusive
├── main_dex.txt
├── src
│ └── main
│ │ ├── assets
│ │ └── xposed_init
│ │ ├── ic_launcher-web.png
│ │ ├── res
│ │ ├── xml
│ │ │ ├── file_provider_paths.xml
│ │ │ └── firebase_remote_defaults.xml
│ │ ├── layout
│ │ │ ├── saf_permission_request.xml
│ │ │ ├── dialog_progress.xml
│ │ │ └── login_custom_view.xml
│ │ └── menu
│ │ │ ├── menu_dashboard_activity.xml
│ │ │ └── navigation.xml
│ │ └── java
│ │ └── com
│ │ └── afterroot
│ │ └── allusive2
│ │ ├── utils
│ │ ├── PermissionChecker.kt
│ │ └── CheckeredDrawable.kt
│ │ ├── MyApplication.kt
│ │ ├── di
│ │ ├── NetworkModule.kt
│ │ ├── ApiModule.kt
│ │ └── AppModules.kt
│ │ ├── ui
│ │ └── view
│ │ │ └── LoginCustomView.kt
│ │ ├── viewmodel
│ │ ├── NetworkViewModel.kt
│ │ └── ViewModelState.kt
│ │ └── adapter
│ │ └── PointersAdapter.kt
├── libs
│ ├── api-82.jar
│ └── api-82-sources.jar
├── google-services.gpg
└── proguard-rules.pro
├── CONTRIBUTING.md
├── gradle
├── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
└── create-zip.gradle
├── .idea
├── scopes
│ └── All_Except_Generated.xml
├── copyright
│ ├── profiles_settings.xml
│ └── Sandip.xml
├── codeStyles
│ └── codeStyleConfig.xml
├── render.experimental.xml
├── statistic.xml
├── kotlinc.xml
├── compiler.xml
├── icon.svg
├── runConfigurations
│ └── Start_FirebaseEmulators.xml
├── inspectionProfiles
│ └── Project_Default.xml
├── jsonSchemas.xml
└── jarRepositories.xml
├── pointer-replacer.code-workspace
├── .gitmodules
├── README.md
├── .editorconfig
├── .github
├── renovate.json5
└── ci-gradle.properties
├── settings.gradle.kts
└── .gitignore
/base/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/data/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/domain/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/ui/home/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/ui/magisk/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/ui/repo/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/version.properties:
--------------------------------------------------------------------------------
1 | patch=5
2 |
--------------------------------------------------------------------------------
/common/ui/compose/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/common/ui/resources/.gitignore:
--------------------------------------------------------------------------------
1 | /build
--------------------------------------------------------------------------------
/release/.gitignore:
--------------------------------------------------------------------------------
1 | serviceAccount.json
--------------------------------------------------------------------------------
/ui/magisk/module/empty-module/system/framework/APK_HERE:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/allusive/main_dex.txt:
--------------------------------------------------------------------------------
1 | com/afterroot/allusive2/XposedMod.class
--------------------------------------------------------------------------------
/ui/magisk/module/rro-module/system/vendor/overlay/placeholder:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/allusive/src/main/assets/xposed_init:
--------------------------------------------------------------------------------
1 | com.afterroot.allusive2.XposedMod
--------------------------------------------------------------------------------
/ui/magisk/module/rro-module/META-INF/com/google/android/updater-script:
--------------------------------------------------------------------------------
1 | #MAGISK
2 |
--------------------------------------------------------------------------------
/ui/magisk/module/empty-module/META-INF/com/google/android/updater-script:
--------------------------------------------------------------------------------
1 | #MAGISK
2 |
--------------------------------------------------------------------------------
/release/keystore.gpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/release/keystore.gpg
--------------------------------------------------------------------------------
/allusive/libs/api-82.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/allusive/libs/api-82.jar
--------------------------------------------------------------------------------
/release/clean.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | rm -f ./release/keystore.jks
4 | rm -f ./release/serviceAccount.json
5 |
--------------------------------------------------------------------------------
/release/serviceAccount.gpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/release/serviceAccount.gpg
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # How to Report Issues
2 | Submit your issues at https://github.com/sandipv22/pointer_replacer/issues
3 |
--------------------------------------------------------------------------------
/allusive/google-services.gpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/allusive/google-services.gpg
--------------------------------------------------------------------------------
/allusive/libs/api-82-sources.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/allusive/libs/api-82-sources.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/allusive/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/allusive/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/pointer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable/pointer.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-hdpi/ar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-hdpi/ar_logo.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-mdpi/ar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-mdpi/ar_logo.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-xhdpi/ar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-xhdpi/ar_logo.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-xxhdpi/ar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-xxhdpi/ar_logo.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-xxxhdpi/ar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-xxxhdpi/ar_logo.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_launch_screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable/ic_launch_screen.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/.idea/scopes/All_Except_Generated.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-night-hdpi/ar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-night-hdpi/ar_logo.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-night-mdpi/ar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-night-mdpi/ar_logo.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-night-xhdpi/ar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-night-xhdpi/ar_logo.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-night-xxhdpi/ar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-night-xxhdpi/ar_logo.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-night-xxxhdpi/ar_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-night-xxxhdpi/ar_logo.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-nodpi/transparent_rect.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/drawable-nodpi/transparent_rect.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/ui/magisk/module/empty-module/module.prop:
--------------------------------------------------------------------------------
1 | id=pointer_replacer
2 | name=Pointer Replacer
3 | version=v1.1
4 | versionCode=2
5 | author=thesandipv
6 | description=Magisk Implementation of Pointer Replacer
7 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/thesandipv/pointer_replacer/HEAD/common/ui/resources/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/ui/magisk/module/rro-module/module.prop:
--------------------------------------------------------------------------------
1 | id=pointer_replacer_rro
2 | name=Pointer Replacer RRO
3 | version=v2.0
4 | versionCode=2
5 | author=thesandipv
6 | description=Magisk Implementation of Pointer Replacer RRO
7 |
--------------------------------------------------------------------------------
/.idea/copyright/profiles_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/render.experimental.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/.idea/statistic.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/.idea/kotlinc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/pointer-replacer.code-workspace:
--------------------------------------------------------------------------------
1 | {
2 | "folders": [
3 | {
4 | "path": "."
5 | },
6 | {
7 | "path": "core"
8 | },
9 | {
10 | "path": "arro"
11 | },
12 | {
13 | "path": "website"
14 | }
15 | ],
16 | "settings": {
17 | "svg.preview.background": "black"
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/.idea/compiler.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/release/decrypt.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | gpg --quiet --batch --yes --decrypt --passphrase=${ENCRYPT_KEY} --output release/keystore.jks release/keystore.gpg
4 | gpg --quiet --batch --yes --decrypt --passphrase=${ENCRYPT_KEY} --output release/serviceAccount.json release/serviceAccount.gpg
5 | gpg --quiet --batch --yes --decrypt --passphrase=${ENCRYPT_KEY} --output allusive/google-services.json allusive/google-services.gpg
6 |
--------------------------------------------------------------------------------
/release/encrypt.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | gpg --passphrase=${ENCRYPT_KEY} --cipher-algo AES256 --symmetric --output release/keystore.gpg release/keystore.jks
4 | gpg --passphrase=${ENCRYPT_KEY} --cipher-algo AES256 --symmetric --output release/serviceAccount.gpg release/serviceAccount.json
5 | gpg --passphrase=${ENCRYPT_KEY} --cipher-algo AES256 --symmetric --output allusive/google-services.gpg allusive/google-services.json
6 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "website"]
2 | path = website
3 | url = https://github.com/thesandipv/allusive-web.git
4 | [submodule "ards"]
5 | path = ards
6 | url = https://github.com/afterroot/ards.git
7 | [submodule "arro"]
8 | path = arro
9 | url = https://github.com/afterroot/allusive_rro.git
10 | [submodule "gradle/build-logic"]
11 | path = gradle/build-logic
12 | url = https://github.com/afterroot/build-logic.git
13 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_filter.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 | [](https://github.com/thesandipv/pointer_replacer/actions/workflows/android.yml)
3 | [](https://github.com/thesandipv/allusive-web/actions/workflows/firebase-hosting-merge.yml)
4 |
5 | This module replaces pointer_spot_touch drawable in framework-res.apk.
6 | In short it replaces a dot appears when user touch the screen [Require Show Touches to be enabled in Developer Options.]
7 |
--------------------------------------------------------------------------------
/domain/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.afterroot.android.library")
3 | id("com.afterroot.kotlin.android")
4 | alias(libs.plugins.jetbrains.kotlin.kapt)
5 | }
6 |
7 | android {
8 | namespace = "com.afterroot.allusive2.domain"
9 | }
10 |
11 | dependencies {
12 | implementation(projects.base)
13 | implementation(projects.data)
14 |
15 | implementation(libs.androidx.core)
16 | implementation(libs.androidx.lifecycle.viewmodel)
17 | implementation(libs.androidx.paging)
18 |
19 | implementation(platform(libs.firebase.bom))
20 | implementation(libs.firebase.firestore)
21 |
22 | implementation(libs.hilt.hilt)
23 | kapt(libs.hilt.compiler)
24 | }
25 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*]
4 | charset = utf-8
5 | indent_size = 2
6 | indent_style = space
7 | insert_final_newline = true
8 | trim_trailing_whitespace = true
9 |
10 | [*.xml]
11 | indent_size = 4
12 |
13 | # noinspection EditorConfigKeyCorrectness
14 | [*.{kt,kts}]
15 | ij_kotlin_imports_layout = *, ^ #same as alphabetical, alias imports in the end of the imports list
16 | ij_kotlin_allow_trailing_comma = true
17 | ij_kotlin_allow_trailing_comma_on_call_site = true
18 | ktlint_code_style = android_studio
19 | ktlint_standard_discouraged-comment-location = disabled
20 | ktlint_function_naming_ignore_when_annotated_with = Composable
21 | ktlint_standard_max-line-length = disabled
22 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_done_outline.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/.idea/icon.svg:
--------------------------------------------------------------------------------
1 |
26 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_download.xml:
--------------------------------------------------------------------------------
1 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/base/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/data/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/domain/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ui/repo/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/ui/magisk/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/common/ui/compose/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/base/src/main/java/com/afterroot/allusive2/base/compose/Actions.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.base.compose
16 |
17 | abstract class Actions
18 |
--------------------------------------------------------------------------------
/base/src/main/java/com/afterroot/allusive2/base/compose/ViewState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.base.compose
16 |
17 | abstract class ViewState
18 |
--------------------------------------------------------------------------------
/ui/magisk/module/rro-module/META-INF/com/google/android/update-binary:
--------------------------------------------------------------------------------
1 | #!/sbin/sh
2 |
3 | #################
4 | # Initialization
5 | #################
6 |
7 | umask 022
8 |
9 | # echo before loading util_functions
10 | ui_print() { echo "$1"; }
11 |
12 | require_new_magisk() {
13 | ui_print "*******************************"
14 | ui_print " Please install Magisk v20.4+! "
15 | ui_print "*******************************"
16 | exit 1
17 | }
18 |
19 | #########################
20 | # Load util_functions.sh
21 | #########################
22 |
23 | OUTFD=$2
24 | ZIPFILE=$3
25 |
26 | mount /data 2>/dev/null
27 |
28 | [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
29 | . /data/adb/magisk/util_functions.sh
30 | [ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
31 |
32 | install_module
33 | exit 0
34 |
--------------------------------------------------------------------------------
/ui/magisk/module/empty-module/META-INF/com/google/android/update-binary:
--------------------------------------------------------------------------------
1 | #!/sbin/sh
2 |
3 | #################
4 | # Initialization
5 | #################
6 |
7 | umask 022
8 |
9 | # echo before loading util_functions
10 | ui_print() { echo "$1"; }
11 |
12 | require_new_magisk() {
13 | ui_print "*******************************"
14 | ui_print " Please install Magisk v20.4+! "
15 | ui_print "*******************************"
16 | exit 1
17 | }
18 |
19 | #########################
20 | # Load util_functions.sh
21 | #########################
22 |
23 | OUTFD=$2
24 | ZIPFILE=$3
25 |
26 | mount /data 2>/dev/null
27 |
28 | [ -f /data/adb/magisk/util_functions.sh ] || require_new_magisk
29 | . /data/adb/magisk/util_functions.sh
30 | [ $MAGISK_VER_CODE -lt 20400 ] && require_new_magisk
31 |
32 | install_module
33 | exit 0
34 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values-hdpi/integers.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 | 49
18 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values-xhdpi/integers.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 | 66
18 |
--------------------------------------------------------------------------------
/ui/home/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values-v29/colors.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 | @android:color/transparent
18 |
19 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/database/DeleteListener.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.database
16 |
17 | interface DeleteListener {
18 | fun onDeleteSuccess()
19 | fun onDeleteFailed()
20 | }
21 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_layers.xml:
--------------------------------------------------------------------------------
1 |
9 |
12 |
13 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values/preloaded_fonts.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 | - @font/ubuntu
19 |
20 |
21 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/Result.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2
16 |
17 | sealed class Result {
18 | object Success : Result()
19 | data class Running(val message: String) : Result()
20 | data class Failed(val error: String) : Result()
21 | }
22 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/model/SkuModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.model
16 |
17 | import androidx.annotation.Keep
18 |
19 | /**
20 | * Data class for Sku List Json response
21 | */
22 | @Keep
23 | data class SkuModel(val sku: List)
24 |
--------------------------------------------------------------------------------
/common/ui/compose/src/main/java/com/afterroot/ui/common/compose/theme/Type.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.ui.common.compose.theme
16 |
17 | import androidx.compose.material3.Typography
18 |
19 | // Set of Material typography styles to start with
20 | val typography = Typography()
21 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/transparent_grid.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/copyright/Sandip.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/menu/menu_common.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_login_screen.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
14 |
19 |
20 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values/integers.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 | 200
18 | 66
19 | 50
20 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/anim/layout_anim_fall_down.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
--------------------------------------------------------------------------------
/ui/repo/src/main/java/com/afterroot/allusive2/ui/repo/RepoState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.ui.repo
16 |
17 | import com.afterroot.allusive2.base.compose.ViewState
18 |
19 | data class RepoState(val message: String? = null) : ViewState() {
20 | companion object {
21 | val Empty = RepoState()
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_sort.xml:
--------------------------------------------------------------------------------
1 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values/plurals.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 | - %1$d download
19 | - %1$d downloads
20 |
21 |
22 |
--------------------------------------------------------------------------------
/base/src/main/java/com/afterroot/allusive2/base/CoroutineDispatchers.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.base
16 |
17 | import kotlinx.coroutines.CoroutineDispatcher
18 |
19 | data class CoroutineDispatchers(
20 | val default: CoroutineDispatcher,
21 | val io: CoroutineDispatcher,
22 | val main: CoroutineDispatcher,
23 | )
24 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/Start_FirebaseEmulators.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values-v30/arrays.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 | - @string/method_xposed
19 |
20 |
21 |
--------------------------------------------------------------------------------
/ui/home/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.afterroot.android.library")
3 | id("com.afterroot.kotlin.android")
4 | id("com.afterroot.allusive2.android.common")
5 | alias(libs.plugins.google.hilt)
6 | alias(libs.plugins.jetbrains.kotlin.kapt)
7 | }
8 |
9 | android {
10 | namespace = "com.afterroot.allusive2.home"
11 |
12 | buildFeatures {
13 | dataBinding = true
14 | viewBinding = true
15 | }
16 | }
17 |
18 | dependencies {
19 | implementation(projects.data)
20 | implementation(projects.domain)
21 | implementation(projects.common.ui.compose)
22 |
23 | implementation(platform(libs.firebase.bom))
24 | implementation(libs.bundles.firebase)
25 |
26 | implementation(libs.androidx.fragment)
27 | implementation(libs.androidx.paging)
28 | implementation(libs.androidx.lifecycle.viewmodel)
29 |
30 | implementation(libs.bundles.coroutines)
31 |
32 | implementation(libs.hilt.hilt)
33 | implementation(libs.hilt.compose)
34 | kapt(libs.hilt.compiler)
35 | }
36 |
--------------------------------------------------------------------------------
/ui/repo/src/main/java/com/afterroot/allusive2/ui/repo/RepoActions.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.ui.repo
16 |
17 | import com.afterroot.allusive2.base.compose.Actions
18 |
19 | sealed class RepoActions : Actions() {
20 | data class ApproveRequest(val repoId: String) : RepoActions()
21 | object LoadRequests : RepoActions()
22 | }
23 |
--------------------------------------------------------------------------------
/common/ui/resources/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | plugins {
17 | id("com.afterroot.android.library")
18 | }
19 |
20 | android {
21 | namespace = "com.afterroot.allusive2.resources"
22 | }
23 |
24 | dependencies {
25 | api(libs.google.material)
26 | implementation(libs.androidx.preference)
27 | implementation(libs.materialdialogs.core)
28 | }
29 |
--------------------------------------------------------------------------------
/allusive/src/main/res/xml/file_provider_paths.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
20 |
23 |
26 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/allusive/src/main/res/layout/saf_permission_request.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
19 |
20 |
--------------------------------------------------------------------------------
/ui/home/src/main/java/com/afterroot/allusive2/home/HomeActions.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.home
16 |
17 | import com.afterroot.allusive2.base.compose.Actions
18 |
19 | sealed class HomeActions : Actions() {
20 | data class LoadIntAd(val isShow: Boolean = false) : HomeActions()
21 | object ShowIntAd : HomeActions()
22 | object OnIntAdDismiss : HomeActions()
23 | }
24 |
--------------------------------------------------------------------------------
/ui/repo/src/main/java/com/afterroot/allusive2/adapter/callback/ItemSelectedCallback.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.adapter.callback
16 |
17 | import android.view.View
18 |
19 | interface ItemSelectedCallback {
20 | fun onClick(position: Int, view: View? = null) {}
21 | fun onClick(position: Int, view: View? = null, item: T) {}
22 | fun onLongClick(position: Int, item: T): Boolean = false
23 | }
24 |
--------------------------------------------------------------------------------
/allusive/src/main/res/menu/menu_dashboard_activity.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
--------------------------------------------------------------------------------
/ui/magisk/src/main/java/com/afterroot/allusive2/magisk/Extensions.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.magisk
16 |
17 | import com.topjohnwu.superuser.Shell
18 |
19 | fun reboot(reason: String = "") {
20 | Shell.su("/system/bin/svc power reboot $reason || /system/bin/reboot $reason").submit()
21 | }
22 |
23 | fun softReboot() {
24 | Shell.su("busybox killall system_server || busybox killall zygote").submit()
25 | }
26 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_home.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/font/ubuntu.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
22 |
--------------------------------------------------------------------------------
/common/ui/compose/build.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2020-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | plugins {
17 | id("com.afterroot.android.library")
18 | id("com.afterroot.kotlin.android")
19 | id("com.afterroot.android.compose")
20 | id("com.afterroot.allusive2.android.common")
21 | }
22 |
23 | android {
24 | namespace = "com.afterroot.allusive2.compose"
25 | }
26 |
27 | dependencies {
28 | implementation(projects.data)
29 |
30 | api(libs.androidx.lifecycle.runtime)
31 | }
32 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/color/nav_state_list.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_add.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_file_download.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/ui/repo/src/main/res/menu/menu_repo.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
24 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values-w820dp/dimens.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
20 | 64dp
21 |
22 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_dashboard.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/utils/State.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.utils
16 |
17 | sealed class State {
18 | class Loading : State()
19 | data class Success(val data: T) : State()
20 | data class Failed(val message: String) : State()
21 |
22 | companion object {
23 | fun loading() = Loading()
24 | fun success(data: T) = Success(data)
25 | fun failed(message: String) = Failed(message)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/anim/slide_in_left.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
21 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/anim/slide_in_right.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
21 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_delete.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/.github/renovate.json5:
--------------------------------------------------------------------------------
1 | {
2 | $schema: "https://docs.renovatebot.com/renovate-schema.json",
3 | extends: ["config:recommended"],
4 | packageRules: [
5 | {
6 | groupName: "Kotlin, Coroutines and KSP",
7 | groupSlug: "kotlin",
8 | matchPackageNames: [
9 | "com.google.devtools.ksp{/,}**",
10 | "org.jetbrains.kotlin{/,}**",
11 | ],
12 | },
13 | {
14 | groupName: "all non-major dependencies",
15 | groupSlug: "all-minor-patch",
16 | enabled: false,
17 | matchPackageNames: ["*"],
18 | matchUpdateTypes: ["minor", "patch"],
19 | },
20 | {
21 | description: "Automatically merge minor and patch-level updates",
22 | matchUpdateTypes: ["minor", "patch", "digest"],
23 | automerge: true,
24 | automergeType: "pr",
25 | platformAutomerge: true,
26 | },
27 | {
28 | groupName: "Compose Dependencies",
29 | matchPackageNames: ["/^androidx\\..*compose\\./"],
30 | },
31 | {
32 | matchUpdateTypes: ["major"],
33 | dependencyDashboardApproval: true,
34 | },
35 | ],
36 | }
37 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/anim/slide_out_left.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
21 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/anim/slide_out_right.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
21 |
25 |
--------------------------------------------------------------------------------
/common/ui/compose/src/main/java/com/afterroot/ui/common/compose/components/Provides.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.ui.common.compose.components
16 |
17 | import androidx.compose.runtime.compositionLocalOf
18 | import com.afterroot.allusive2.Settings
19 | import com.afterroot.allusive2.model.LocalUser
20 |
21 | val LocalCurrentUser = compositionLocalOf { LocalUser() }
22 |
23 | val LocalSettings =
24 | compositionLocalOf { throw IllegalStateException("LocalSettings is not initialized") }
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/anim/text_switcher_in.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
21 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/anim/text_switcher_out.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
21 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_action_minus.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/model/LocalUser.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.model
16 |
17 | import androidx.annotation.Keep
18 | import com.afterroot.data.model.UserProperties
19 | import java.io.Serializable
20 |
21 | // Collection 'users'
22 | @Keep
23 | data class LocalUser(
24 | var name: String? = null,
25 | var email: String? = null,
26 | var uid: String = "",
27 | var fcmId: String = "",
28 | var userName: String? = null,
29 | var properties: UserProperties = UserProperties(),
30 | ) : Serializable
31 |
--------------------------------------------------------------------------------
/ui/repo/src/main/res/layout/fragment_rro_request.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
20 |
21 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/data/FirebaseExtensions.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.data
16 |
17 | import com.afterroot.allusive2.database.DatabaseFields
18 | import com.google.firebase.firestore.FirebaseFirestore
19 | import com.google.firebase.storage.FirebaseStorage
20 |
21 | fun FirebaseFirestore.pointers() = collection(DatabaseFields.COLLECTION_POINTERS)
22 | fun FirebaseFirestore.requests() = collection(DatabaseFields.COLLECTION_REQUESTS)
23 | fun FirebaseStorage.pointers() = reference.child(DatabaseFields.COLLECTION_POINTERS)
24 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_info_round.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_removed.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_action_apply.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/debug/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 | ca-app-pub-3940256099942544/6300978111
18 | ca-app-pub-3940256099942544/6300978111
19 | ca-app-pub-3940256099942544/1033173712
20 | ca-app-pub-3940256099942544/5224354917
21 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_notifications.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/common/ui/compose/src/main/java/com/afterroot/ui/common/compose/theme/Shape.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.ui.common.compose.theme
16 |
17 | import androidx.compose.foundation.shape.RoundedCornerShape
18 | import androidx.compose.material3.Shapes
19 | import androidx.compose.ui.unit.dp
20 |
21 | val shapes = Shapes(
22 | // small = RoundedCornerShape(8.dp),
23 | // medium = RoundedCornerShape(8.dp),
24 | // large = RoundedCornerShape(0.dp)
25 | )
26 |
27 | val fabShape = RoundedCornerShape(16.dp)
28 |
29 | val bottomSheetShape = RoundedCornerShape(topStart = 16.dp, topEnd = 16.dp)
30 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_action_save.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_action_plus.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values/arrays.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 | - @string/theme_device_default
19 | - @string/theme_light
20 | - @string/theme_dark
21 | - @string/theme_battery
22 |
23 |
24 | - @string/method_xposed
25 | - @string/method_magisk_fw_res
26 |
27 |
28 |
--------------------------------------------------------------------------------
/allusive/src/main/java/com/afterroot/allusive2/utils/PermissionChecker.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.utils
16 |
17 | import android.content.Context
18 | import android.content.pm.PackageManager
19 | import androidx.core.content.ContextCompat
20 |
21 | class PermissionChecker(private val mContext: Context) {
22 |
23 | fun lacksPermissions(permissions: Array): Boolean = permissions.any {
24 | lacksPermission(it)
25 | }
26 |
27 | private fun lacksPermission(permission: String): Boolean =
28 | ContextCompat.checkSelfPermission(mContext, permission) ==
29 | PackageManager.PERMISSION_DENIED
30 | }
31 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/filled_thumb_up.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/filled_thumb_down.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/utils/DataUtils.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.utils
16 |
17 | import com.afterroot.data.utils.FirebaseUtils
18 |
19 | fun getMailBodyForFeedback(
20 | firebaseUtils: FirebaseUtils,
21 | version: String,
22 | versionCode: Int,
23 | ): String {
24 | val builder = StringBuilder().apply {
25 | appendLine("----Do not remove this info----")
26 | appendLine("Version : $version")
27 | appendLine("Version Code : $versionCode")
28 | appendLine("User ID : ${firebaseUtils.uid}")
29 | appendLine("----Do not remove this info----")
30 | }
31 | return builder.toString()
32 | }
33 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/outline_thumb_up.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values-land/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
16 |
17 |
18 | 50dp
19 | 16dp
20 |
21 | 50dp
22 | 16dp
23 | 42dp
24 | 50dp
25 | 16dp
26 | 16dp
27 | 8dp
28 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/outline_thumb_down.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
25 |
--------------------------------------------------------------------------------
/allusive/src/main/java/com/afterroot/allusive2/MyApplication.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2
16 |
17 | import androidx.annotation.Keep
18 | import androidx.multidex.MultiDexApplication
19 | import com.afterroot.allusive2.utils.whenBuildIs
20 | import com.google.android.material.color.DynamicColors
21 | import dagger.hilt.android.HiltAndroidApp
22 | import timber.log.Timber
23 |
24 | @Suppress("unused")
25 | @Keep
26 | @HiltAndroidApp
27 | class MyApplication : MultiDexApplication() {
28 | override fun onCreate() {
29 | DynamicColors.applyToActivitiesIfAvailable(this)
30 | super.onCreate()
31 | whenBuildIs {
32 | Timber.plant(Timber.DebugTree())
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/allusive/src/main/res/menu/navigation.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
34 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/database/Helpers.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.database
16 |
17 | import com.afterroot.allusive2.model.RoomPointer
18 |
19 | suspend fun MyDatabase.addLocalPointer(fileName: String) {
20 | val pointer = RoomPointer(
21 | file_name = fileName,
22 | uploader_name = "You (Local)",
23 | uploader_id = "N/A",
24 | pointer_name = fileName,
25 | pointer_desc = "N/A",
26 | )
27 | addRoomPointer(pointer)
28 | }
29 |
30 | suspend fun MyDatabase.addRoomPointer(roomPointer: RoomPointer) {
31 | if (roomPointer.file_name == null) {
32 | return
33 | }
34 | if (pointerDao().exists(roomPointer.file_name).isEmpty()) {
35 | pointerDao().add(roomPointer)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/data/mapper/UserMapper.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.data.mapper
16 |
17 | import com.afterroot.allusive2.model.LocalUser
18 | import com.afterroot.data.model.NetworkUser
19 | import com.google.firebase.firestore.DocumentSnapshot
20 |
21 | fun LocalUser.toNetworkUser() = NetworkUser(
22 | name = name,
23 | email = email,
24 | uid = uid,
25 | fcmId = fcmId,
26 | userName = userName,
27 | properties = properties,
28 | )
29 |
30 | fun NetworkUser.toLocalUser() = LocalUser(
31 | name = name,
32 | email = email,
33 | uid = uid ?: "",
34 | fcmId = fcmId ?: "",
35 | userName = userName,
36 | properties = properties,
37 | )
38 |
39 | fun DocumentSnapshot.toNetworkUser() = toObject(NetworkUser::class.java)
40 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/model/RoomPointer.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.model
16 |
17 | import android.provider.BaseColumns
18 | import androidx.annotation.Keep
19 | import androidx.room.ColumnInfo
20 | import androidx.room.Entity
21 | import androidx.room.PrimaryKey
22 |
23 | @Keep
24 | @Entity(tableName = RoomPointer.TABLE_NAME)
25 | data class RoomPointer(
26 | @PrimaryKey(autoGenerate = true) @ColumnInfo(index = true, name = BaseColumns._ID)
27 | val id: Int = 0,
28 | @ColumnInfo val pointer_name: String?,
29 | @ColumnInfo val file_name: String?,
30 | @ColumnInfo val pointer_desc: String?,
31 | @ColumnInfo val uploader_id: String,
32 | @ColumnInfo val uploader_name: String,
33 | ) {
34 | companion object {
35 | const val TABLE_NAME = "pointers"
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/base/src/main/java/com/afterroot/allusive2/MyAppGlide.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2
16 |
17 | import android.content.Context
18 | import com.bumptech.glide.Glide
19 | import com.bumptech.glide.Registry
20 | import com.bumptech.glide.annotation.GlideModule
21 | import com.bumptech.glide.module.AppGlideModule
22 | import com.firebase.ui.storage.images.FirebaseImageLoader
23 | import com.google.firebase.storage.StorageReference
24 | import java.io.InputStream
25 |
26 | /**
27 | * Created by Sandip on 14-12-2017.
28 | */
29 | @GlideModule
30 | class MyAppGlide : AppGlideModule() {
31 | override fun registerComponents(context: Context, glide: Glide, registry: Registry) {
32 | registry.append(
33 | StorageReference::class.java,
34 | InputStream::class.java,
35 | FirebaseImageLoader.Factory(),
36 | )
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/allusive/src/main/res/xml/firebase_remote_defaults.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 | pokemon_pack_play_store
19 | tk.afterroot.pokmonpointers
20 |
21 |
22 | ad_main_unit_id
23 | ca-app-pub-6628325093439880/8486157233
24 |
25 |
26 | ad_interstitial_1_id
27 | ca-app-pub-6628325093439880/4145271758
28 |
29 |
30 | ad_rewarded_1_id
31 | ca-app-pub-6628325093439880/8486157233
32 |
33 |
34 | ad_banner_new_pointer
35 | ca-app-pub-6628325093439880/5238011519
36 |
37 |
--------------------------------------------------------------------------------
/common/ui/compose/src/main/java/com/afterroot/ui/common/compose/utils/FlowWithLifecycle.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | @file:Suppress("NOTHING_TO_INLINE")
16 |
17 | package com.afterroot.ui.common.compose.utils
18 |
19 | import androidx.compose.runtime.Composable
20 | import androidx.compose.runtime.remember
21 | import androidx.compose.ui.platform.LocalLifecycleOwner
22 | import androidx.lifecycle.Lifecycle
23 | import androidx.lifecycle.flowWithLifecycle
24 | import kotlinx.coroutines.flow.Flow
25 |
26 | @Composable
27 | fun rememberFlowWithLifecycle(
28 | flow: Flow,
29 | lifecycle: Lifecycle = LocalLifecycleOwner.current.lifecycle,
30 | minActiveState: Lifecycle.State = Lifecycle.State.STARTED,
31 | ): Flow = remember(flow, lifecycle) {
32 | flow.flowWithLifecycle(
33 | lifecycle = lifecycle,
34 | minActiveState = minActiveState,
35 | )
36 | }
37 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/data/stub/StubHelpers.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.data.stub
16 |
17 | import com.afterroot.allusive2.database.DatabaseFields
18 | import com.afterroot.allusive2.model.Pointer
19 | import com.afterroot.data.utils.FirebaseUtils
20 | import com.google.firebase.Timestamp
21 | import com.google.firebase.firestore.FirebaseFirestore
22 |
23 | fun createStubPointers(firestore: FirebaseFirestore, firebaseUtils: FirebaseUtils) {
24 | repeat(50) { i ->
25 | val pointer = Pointer(
26 | name = "Pointer $i",
27 | filename = "pointer$i.png",
28 | description = "Awesome Pointer $i",
29 | uploadedBy = hashMapOf(Pair(firebaseUtils.uid ?: "stub-uid", "Awesome User")),
30 | time = Timestamp.now().toDate(),
31 | )
32 | firestore.collection(DatabaseFields.COLLECTION_POINTERS).document().set(pointer)
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/anim/li_anim_fall_down.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
18 |
19 |
23 |
24 |
28 |
29 |
37 |
38 |
--------------------------------------------------------------------------------
/ui/magisk/build.gradle.kts:
--------------------------------------------------------------------------------
1 | import com.android.build.gradle.internal.lint.AndroidLintAnalysisTask
2 | import com.android.build.gradle.internal.lint.LintModelWriterTask
3 |
4 | plugins {
5 | id("com.afterroot.android.library")
6 | id("com.afterroot.kotlin.android")
7 | id("com.afterroot.allusive2.android.common")
8 | alias(libs.plugins.google.hilt)
9 | alias(libs.plugins.jetbrains.kotlin.kapt)
10 | }
11 |
12 | apply(from = "$rootDir/gradle/create-zip.gradle")
13 |
14 | android {
15 | namespace = "com.afterroot.allusive2.magisk"
16 |
17 | buildFeatures {
18 | dataBinding = true
19 | viewBinding = true
20 | }
21 | }
22 | dependencies {
23 | implementation(projects.data)
24 |
25 | implementation(libs.materialdialogs.core)
26 |
27 | implementation(libs.androidx.constraintLayout)
28 | implementation(libs.androidx.lifecycle.runtime)
29 | implementation(libs.androidx.lifecycle.livedata)
30 | implementation(libs.androidx.lifecycle.extensions)
31 |
32 | implementation(libs.google.material)
33 |
34 | implementation(platform(libs.firebase.bom))
35 | implementation(libs.bundles.firebase)
36 | implementation(libs.bundles.coroutines)
37 |
38 | implementation(libs.hilt.hilt)
39 | kapt(libs.hilt.compiler)
40 |
41 | implementation(libs.libsu.core)
42 | implementation(libs.libsu.io)
43 |
44 | implementation("net.lingala.zip4j:zip4j:2.11.5")
45 | }
46 |
47 | tasks.whenTaskAdded {
48 | if (this is LintModelWriterTask || this is AndroidLintAnalysisTask) {
49 | this.mustRunAfter("createEmptyModuleZip")
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/allusive/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # By default, the flags in this file are appended to flags specified
3 | # in G:\AS_SDK\sdk/tools/proguard/proguard-android.txt
4 | # You can edit the include path and order by changing the proguardFiles
5 | # directive in build.gradle.
6 | #
7 | # For more details, see
8 | # http://developer.android.com/guide/developing/tools/proguard.html
9 |
10 | # Add any project specific keep options here:
11 |
12 | # If your project uses WebView with JS, uncomment the following
13 | # and specify the fully qualified class name to the JavaScript interface
14 | # class:
15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
16 | # public *;
17 | #}
18 | #noinspection ShrinkerUnresolvedReference
19 | -keepattributes Signature
20 | -keepclassmembers class com.afterroot.allusive2.model.** { *; }
21 | -keepclassmembers class com.afollestad.materialdialogs.** { *; }
22 | -keep class com.afterroot.** { *; }
23 | -keep class androidx.navigation.fragment.NavHostFragment
24 | -keep class com.afterroot.allusive2.XposedMod
25 |
26 | # We only need to keep ComposeView
27 | -keep public class androidx.compose.ui.platform.ComposeView {
28 | public (android.content.Context, android.util.AttributeSet);
29 | }
30 |
31 | # For enumeration classes
32 | -keepclassmembers enum * {
33 | public static **[] values();
34 | public static ** valueOf(java.lang.String);
35 | }
36 |
37 | -keep class * implements android.os.Parcelable {
38 | public static final android.os.Parcelable$Creator *;
39 | }
40 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_touch.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
22 |
25 |
26 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/launch_screen.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 | -
18 |
19 |
20 |
21 |
22 | -
23 |
29 |
30 | -
33 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/data/mapper/PointerMapper.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.data.mapper
16 |
17 | import com.afterroot.allusive2.model.Pointer
18 | import com.afterroot.allusive2.model.RoomPointer
19 | import com.google.firebase.firestore.DocumentSnapshot
20 | import com.google.firebase.firestore.QuerySnapshot
21 |
22 | fun Pointer.toRoomPointer(): RoomPointer {
23 | var uploaderId = ""
24 | var uploaderName = ""
25 | uploadedBy?.forEach {
26 | uploaderId = it.key
27 | uploaderName = it.value
28 | }
29 | return RoomPointer(
30 | file_name = filename,
31 | pointer_desc = description,
32 | pointer_name = name,
33 | uploader_id = uploaderId,
34 | uploader_name = uploaderName,
35 | )
36 | }
37 |
38 | fun QuerySnapshot.toPointers(): List = this.documents.map { it.toPointer() }
39 |
40 | fun DocumentSnapshot.toPointer(): Pointer? = toObject(Pointer::class.java)?.copy(docId = id)
41 |
--------------------------------------------------------------------------------
/allusive/src/main/java/com/afterroot/allusive2/di/NetworkModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.di
16 |
17 | import android.content.Context
18 | import android.net.ConnectivityManager
19 | import com.afterroot.utils.network.NetworkStateMonitor
20 | import dagger.Module
21 | import dagger.Provides
22 | import dagger.hilt.InstallIn
23 | import dagger.hilt.android.qualifiers.ApplicationContext
24 | import dagger.hilt.components.SingletonComponent
25 | import javax.inject.Singleton
26 |
27 | @Module
28 | @InstallIn(SingletonComponent::class)
29 | object NetworkModule {
30 |
31 | @Provides
32 | @Singleton
33 | fun provideCM(@ApplicationContext context: Context): ConnectivityManager =
34 | context.applicationContext.getSystemService(
35 | Context.CONNECTIVITY_SERVICE,
36 | ) as ConnectivityManager
37 |
38 | @Provides
39 | @Singleton
40 | fun provideStateMonitor(connectivityManager: ConnectivityManager) =
41 | NetworkStateMonitor(connectivityManager)
42 | }
43 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/model/Pointer.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.model
16 |
17 | import androidx.annotation.Keep
18 | import com.afterroot.allusive2.Reason
19 | import com.google.firebase.Timestamp
20 | import com.google.firebase.firestore.Exclude
21 | import com.google.firebase.firestore.ServerTimestamp
22 | import java.io.Serializable
23 | import java.util.Date
24 |
25 | // Collection 'pointers'
26 | @Keep
27 | data class Pointer(
28 | var name: String? = null,
29 | var filename: String? = null,
30 | var description: String? = null,
31 | var uploadedBy: HashMap? = null,
32 | @ServerTimestamp var time: Date = Timestamp.now().toDate(),
33 | var downloads: Int = 0,
34 | var rroDownloads: Int = 0,
35 | /**
36 | * Use constants from [Reason]
37 | * */
38 | var reasonCode: Int = Reason.OK,
39 | var hasRRO: Boolean = false,
40 | var rroRequested: Boolean = false,
41 | @Exclude var docId: String? = null,
42 | ) : Serializable
43 |
--------------------------------------------------------------------------------
/common/ui/compose/src/main/java/com/afterroot/ui/common/compose/utils/UIUtils.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.ui.common.compose.utils
16 |
17 | import androidx.compose.foundation.layout.Row
18 | import androidx.compose.foundation.layout.RowScope
19 | import androidx.compose.foundation.layout.padding
20 | import androidx.compose.runtime.Composable
21 | import androidx.compose.ui.Alignment
22 | import androidx.compose.ui.Modifier
23 | import androidx.compose.ui.unit.Dp
24 | import androidx.compose.ui.unit.dp
25 |
26 | @Composable
27 | fun CenteredRow(modifier: Modifier = Modifier, content: @Composable (RowScope) -> Unit) {
28 | Row(modifier = modifier, verticalAlignment = Alignment.CenterVertically) {
29 | content(this)
30 | }
31 | }
32 |
33 | fun Modifier.bottomNavigationPadding() = this.padding(bottom = 56.dp)
34 |
35 | fun Modifier.sidePadding(padding: Dp = 16.dp, applyBottom: Boolean = false) = padding(
36 | start = padding,
37 | top = padding,
38 | end = padding,
39 | bottom = if (applyBottom) padding else 0.dp,
40 | )
41 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable-v24/ic_login_screen.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
24 |
29 |
34 |
35 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/model/PointerRequest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.model
16 |
17 | import androidx.annotation.Keep
18 | import com.google.firebase.Timestamp
19 | import com.google.firebase.firestore.ServerTimestamp
20 | import java.util.Date
21 |
22 | @Keep
23 | data class PointerRequest(
24 | /**
25 | * File name of pointer with extension.
26 | */
27 | var fileName: String? = null,
28 | /**
29 | * Uid of user who has requested.
30 | */
31 | var uid: String? = null,
32 | /**
33 | * Timestamp of request.
34 | */
35 | @ServerTimestamp var timestamp: Date = Timestamp.now().toDate(),
36 | /**
37 | * If true, rro will be built even if it is already exist.
38 | */
39 | var force: Boolean = false,
40 | /**
41 | * If true, rro will not be built.
42 | */
43 | var exclude: Boolean = false,
44 | /**
45 | * Id of pointer document.
46 | */
47 | var documentId: String? = null,
48 | /**
49 | * If true, request is closed.
50 | */
51 | @field:JvmField var isRequestClosed: Boolean = false,
52 | )
53 |
--------------------------------------------------------------------------------
/allusive/src/main/java/com/afterroot/allusive2/ui/view/LoginCustomView.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.ui.view
16 |
17 | import android.content.Context
18 | import android.util.AttributeSet
19 | import androidx.appcompat.widget.AppCompatImageView
20 | import androidx.appcompat.widget.LinearLayoutCompat
21 | import com.afterroot.allusive2.R
22 | import com.google.android.material.textview.MaterialTextView
23 |
24 | class LoginCustomView @JvmOverloads constructor(
25 | context: Context,
26 | attrs: AttributeSet? = null,
27 | defStyleAttr: Int = 0,
28 | ) : LinearLayoutCompat(context, attrs, defStyleAttr) {
29 |
30 | private val customBack: AppCompatImageView
31 | private val unsplashAttribution: MaterialTextView
32 |
33 | init {
34 | inflate(context, R.layout.login_custom_view, this).apply {
35 | customBack = findViewById(R.id.login_custom_background)
36 | unsplashAttribution = findViewById(R.id.unsplash_attribution_text)
37 | loadBackgroundImage()
38 | }
39 | }
40 |
41 | private fun loadBackgroundImage() {
42 | // TODO
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 | 16dp
19 | 16dp
20 |
21 | 16dp
22 |
23 | 16dp
24 |
25 | 80dp
26 | 88dp
27 |
28 | 16dp
29 | 8dp
30 | 8dp
31 | 16dp
32 | 8dp
33 | 16dp
34 | 8dp
35 |
36 | 24dp
37 |
38 | 28dp
39 |
40 | 4dp
41 |
42 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/model/LocalPointerRequest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.model
16 |
17 | import androidx.annotation.Keep
18 | import com.google.firebase.Timestamp
19 | import com.google.firebase.firestore.ServerTimestamp
20 | import java.util.Date
21 |
22 | @Keep
23 | data class LocalPointerRequest(
24 | /**
25 | * File name of pointer with extension.
26 | */
27 | var fileName: String? = null,
28 | /**
29 | * Uid of user who has requested.
30 | */
31 | var uid: String? = null,
32 | /**
33 | * Timestamp of request.
34 | */
35 | @ServerTimestamp var timestamp: Date = Timestamp.now().toDate(),
36 | /**
37 | * If true, rro will be built even if it is already exist.
38 | */
39 | var force: Boolean = false,
40 | /**
41 | * If true, rro will not be built.
42 | */
43 | var exclude: Boolean = false,
44 | /**
45 | * Id of pointer document.
46 | */
47 | var documentId: String? = null,
48 | /**
49 | * If true, request is closed.
50 | */
51 | var isRequestClosed: Boolean = false,
52 | var pointerName: String? = null,
53 | )
54 |
--------------------------------------------------------------------------------
/ui/repo/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | plugins {
17 | id("com.afterroot.android.library")
18 | id("com.afterroot.kotlin.android")
19 | id("com.afterroot.android.compose")
20 | id("com.afterroot.allusive2.android.common")
21 | alias(libs.plugins.google.hilt)
22 | alias(libs.plugins.jetbrains.kotlin.kapt)
23 | }
24 |
25 | android {
26 | namespace = "com.afterroot.allusive2.repo"
27 |
28 | buildFeatures {
29 | dataBinding = true
30 | viewBinding = true
31 | }
32 | }
33 |
34 | dependencies {
35 | implementation(projects.data)
36 | implementation(projects.domain)
37 | implementation(projects.common.ui.compose)
38 |
39 | implementation(platform(libs.firebase.bom))
40 | implementation(libs.bundles.firebase)
41 |
42 | implementation(libs.androidx.fragment)
43 | implementation(libs.androidx.paging)
44 | implementation(libs.androidx.paging)
45 | implementation(libs.androidx.lifecycle.viewmodel)
46 |
47 | implementation(libs.bundles.coroutines)
48 |
49 | implementation(libs.hilt.hilt)
50 | implementation(libs.hilt.compose)
51 | kapt(libs.hilt.compiler)
52 |
53 | implementation(libs.coil)
54 | }
55 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | @file:Suppress("UnstableApiUsage")
2 |
3 | import java.util.Properties
4 |
5 | pluginManagement {
6 | includeBuild("gradle/build-logic")
7 |
8 | repositories {
9 | google()
10 | mavenCentral()
11 | gradlePluginPortal()
12 | }
13 | }
14 |
15 | dependencyResolutionManagement {
16 | repositories {
17 | google()
18 | mavenCentral()
19 | maven { url = uri("https://jitpack.io") }
20 | }
21 |
22 | versionCatalogs {
23 | create("afterroot") {
24 | from(files("gradle/build-logic/convention.versions.toml"))
25 | }
26 | }
27 | }
28 |
29 | plugins {
30 | id("com.gradle.develocity") version "4.2.2"
31 | id("org.gradle.toolchains.foojay-resolver-convention") version "1.0.0"
32 | }
33 |
34 | develocity {
35 | buildScan {
36 | termsOfUseUrl = "https://gradle.com/terms-of-service"
37 | termsOfUseAgree = "yes"
38 | }
39 | }
40 |
41 | enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
42 |
43 | rootProject.name = "pointer-replacer"
44 |
45 | include(
46 | ":allusive",
47 | ":ards",
48 | ":arro",
49 | ":base",
50 | ":common:ui:compose",
51 | ":common:ui:resources",
52 | ":core:logging",
53 | ":core:testing",
54 | ":data",
55 | ":domain",
56 | ":ui:home",
57 | ":ui:magisk",
58 | ":ui:repo",
59 | ":utils",
60 | )
61 |
62 | project(":ards").projectDir = file("ards/lib") // AfterROOT Data Structure
63 | project(":arro").projectDir = file("arro/app") // Allusive RRO
64 | project(":utils").projectDir = file("ards/utils/lib") // AfterROOT Utils
65 |
66 | fun readProperties(propertiesFile: File): Properties {
67 | if (!propertiesFile.exists()) {
68 | return Properties()
69 | }
70 | return Properties().apply {
71 | propertiesFile.inputStream().use { fis -> load(fis) }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/data/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | plugins {
16 | id("com.afterroot.android.library")
17 | id("com.afterroot.kotlin.android")
18 | id("com.afterroot.allusive2.android.common")
19 | // id("com.afterroot.android.compose")
20 |
21 | alias(libs.plugins.jetbrains.kotlin.kapt)
22 | alias(libs.plugins.google.ksp)
23 | }
24 |
25 | android {
26 | namespace = "com.afterroot.allusive2.data"
27 | }
28 |
29 | ksp {
30 | arg("room.schemaLocation", "$projectDir/schemas")
31 | arg("room.incremental", "true")
32 | }
33 |
34 | dependencies {
35 | api(projects.ards)
36 |
37 | implementation(libs.androidx.paging)
38 | implementation(libs.androidx.preference)
39 |
40 | implementation(libs.bundles.coroutines)
41 |
42 | implementation(platform(libs.firebase.bom))
43 | implementation(libs.bundles.firebase)
44 |
45 | api(libs.androidx.room.room)
46 | api(libs.androidx.room.runtime)
47 | ksp(libs.androidx.room.compiler)
48 |
49 | api(libs.okhttp.okhttp)
50 | api(libs.okhttp.logging)
51 | api(libs.retrofit.retrofit)
52 | api(libs.retrofit.gson)
53 |
54 | implementation(libs.hilt.hilt)
55 | kapt(libs.hilt.compiler)
56 |
57 | implementation(libs.materialdialogs.core)
58 | }
59 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/database/DatabaseFields.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.database
16 |
17 | object DatabaseFields {
18 | // table 'users'
19 | const val COLLECTION_USERS = "users"
20 | const val FIELD_NAME = "name"
21 | const val FIELD_EMAIL = "email"
22 | const val FIELD_UID = "uid"
23 | const val FIELD_FCM_ID = "fcmId"
24 | const val FIELD_USERNAME = "userName"
25 | const val FIELD_USER_PROPERTIES = "properties"
26 | const val FIELD_VERSION = "version"
27 |
28 | // table 'pointers'
29 | const val COLLECTION_POINTERS = "pointers"
30 | const val FIELD_DESC = "description"
31 | const val FIELD_FILENAME = "filename"
32 | const val FIELD_TIME = "time"
33 | const val FIELD_UPLOAD_BY = "uploadedBy"
34 | const val FIELD_DOWNLOADS = "downloads"
35 | const val FIELD_RRO_DOWNLOADS = "rroDownloads"
36 | const val FIELD_UPVOTES = "upvotes"
37 | const val FIELD_DOWNVOTES = "downvotes"
38 | const val FIELD_HAS_RRO = "hasRRO"
39 | const val FIELD_RRO_REQUESTED = "rroRequested"
40 |
41 | // table 'requests'
42 | const val COLLECTION_REQUESTS = "requests"
43 | const val FIELD_REQUEST_CLOSED = "isRequestClosed"
44 | const val FIELD_TIMESTAMP = "timestamp"
45 | }
46 |
--------------------------------------------------------------------------------
/domain/src/main/java/com/afterroot/allusive2/domain/interactors/PagingPointerRequest.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | package com.afterroot.allusive2.domain.interactors
17 |
18 | import androidx.paging.Pager
19 | import androidx.paging.PagingConfig
20 | import androidx.paging.PagingData
21 | import com.afterroot.allusive2.data.PointerRequestsPagingSource
22 | import com.afterroot.allusive2.domain.PagingInteractor
23 | import com.afterroot.allusive2.model.LocalPointerRequest
24 | import com.google.firebase.firestore.FirebaseFirestore
25 | import com.google.firebase.firestore.Query
26 | import javax.inject.Inject
27 | import kotlinx.coroutines.flow.Flow
28 |
29 | class PagingPointerRequest @Inject constructor() :
30 | PagingInteractor() {
31 |
32 | data class Params(
33 | val query: Query,
34 | val firestore: FirebaseFirestore,
35 | val cached: Boolean = false,
36 | override val pagingConfig: PagingConfig,
37 | ) : Parameters
38 |
39 | override fun createObservable(params: Params): Flow> = Pager(
40 | config = params.pagingConfig,
41 | ) {
42 | PointerRequestsPagingSource(params.query, params.firestore)
43 | }.flow
44 | }
45 |
--------------------------------------------------------------------------------
/common/ui/compose/src/main/java/com/afterroot/ui/common/compose/components/SwipeDismissSnackbar.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.ui.common.compose.components
16 |
17 | import androidx.compose.material3.Snackbar
18 | import androidx.compose.material3.SnackbarData
19 | import androidx.compose.material3.Text
20 | import androidx.compose.runtime.Composable
21 |
22 | /**
23 | * Wrapper around [Snackbar] to make it swipe-dismissable,
24 | * using [SwipeToDismiss].
25 | */
26 | @Composable
27 | fun SwipeDismissSnackbar(
28 | data: SnackbarData,
29 | onDismiss: (() -> Unit)? = null,
30 | snackbar: @Composable (SnackbarData) -> Unit = { Snackbar(it) },
31 | ) {
32 | Text(text = "TODO: Implement swipe-dismiss")
33 | /*val dismissState = rememberDismissState {
34 | if (it != DismissValue.Default) {
35 | // First dismiss the snackbar
36 | data.dismiss()
37 | // Then invoke the callback
38 | onDismiss?.invoke()
39 | }
40 | true
41 | }
42 |
43 |
44 | SwipeToDismiss(
45 | state = dismissState,
46 | directions = setOf(DismissDirection.StartToEnd, DismissDirection.EndToStart),
47 | background = {},
48 | dismissContent = { snackbar(data) }
49 | )*/
50 | }
51 |
--------------------------------------------------------------------------------
/allusive/src/main/java/com/afterroot/allusive2/viewmodel/NetworkViewModel.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.viewmodel
16 |
17 | import androidx.lifecycle.LifecycleOwner
18 | import androidx.lifecycle.ViewModel
19 | import com.afterroot.utils.network.NetworkState
20 | import com.afterroot.utils.network.NetworkStateMonitor
21 | import dagger.hilt.android.lifecycle.HiltViewModel
22 | import javax.inject.Inject
23 |
24 | @HiltViewModel
25 | class NetworkViewModel @Inject constructor(private val networkStateMonitor: NetworkStateMonitor) :
26 | ViewModel() {
27 |
28 | fun monitor(
29 | lifecycleOwner: LifecycleOwner,
30 | doInitially: (() -> Unit)? = null,
31 | onConnect: (state: NetworkState) -> Unit,
32 | onDisconnect: ((state: NetworkState) -> Unit)? = null,
33 | ) {
34 | if (doInitially == null) {
35 | onConnect(NetworkState.CONNECTED) // Run [doWhenConnected] id [doInitially] is null
36 | } else {
37 | doInitially.invoke()
38 | }
39 | networkStateMonitor.observe(lifecycleOwner) {
40 | when (it) {
41 | NetworkState.CONNECTED -> {
42 | onConnect(NetworkState.CONNECTED)
43 | }
44 | else -> {
45 | onDisconnect?.invoke(it)
46 | }
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/.idea/jsonSchemas.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
22 |
23 |
27 |
28 |
29 |
30 |
34 |
35 |
39 |
40 |
43 |
44 |
--------------------------------------------------------------------------------
/allusive/src/main/java/com/afterroot/allusive2/di/ApiModule.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.di
16 |
17 | import com.afterroot.allusive2.utils.whenBuildIs
18 | import dagger.Module
19 | import dagger.Provides
20 | import dagger.hilt.InstallIn
21 | import dagger.hilt.components.SingletonComponent
22 | import javax.inject.Singleton
23 | import okhttp3.OkHttpClient
24 | import okhttp3.logging.HttpLoggingInterceptor
25 | import retrofit2.Retrofit
26 | import retrofit2.converter.gson.GsonConverterFactory
27 |
28 | @Module
29 | @InstallIn(SingletonComponent::class)
30 | object ApiModule {
31 | @Provides
32 | @Singleton
33 | fun provideRetrofit(okHttpClient: OkHttpClient): Retrofit = Retrofit.Builder()
34 | .addConverterFactory(GsonConverterFactory.create())
35 | .client(okHttpClient)
36 | .build()
37 |
38 | @Provides
39 | fun provideOkHttpClient(httpLoggingInterceptor: HttpLoggingInterceptor) =
40 | OkHttpClient().newBuilder()
41 | .addInterceptor(httpLoggingInterceptor)
42 | .build()
43 |
44 | @Provides
45 | @Singleton
46 | fun provideHttpLoggingInterceptor(): HttpLoggingInterceptor = HttpLoggingInterceptor().apply {
47 | level = whenBuildIs(
48 | debug = HttpLoggingInterceptor.Level.BODY,
49 | release = HttpLoggingInterceptor.Level.NONE,
50 | )
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/base/build.gradle.kts:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2023 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 | plugins {
17 | id("com.afterroot.android.library")
18 | id("com.afterroot.kotlin.android")
19 | alias(libs.plugins.jetbrains.kotlin.kapt)
20 | alias(libs.plugins.google.ksp)
21 | }
22 |
23 | android {
24 | namespace = "com.afterroot.allusive2.base"
25 |
26 | buildFeatures.buildConfig = true
27 |
28 | defaultConfig {
29 | val commitHash = providers.exec {
30 | commandLine("git", "rev-parse", "--short", "HEAD")
31 | }.standardOutput.asText.get()
32 |
33 | val commit = System.getenv("COMMIT_ID") ?: commitHash.trim()
34 | buildConfigField("String", "COMMIT_ID", "\"$commit\"")
35 | buildConfigField("int", "VERSION_CODE", "${rootProject.extra["versionCode"]}")
36 | buildConfigField("String", "VERSION_NAME", "\"${rootProject.extra["versionName"]}\"")
37 | }
38 | }
39 |
40 | dependencies {
41 | api(libs.kotlinx.coroutines.core)
42 |
43 | implementation(projects.common.ui.resources)
44 |
45 | api(libs.glide.glide)
46 | ksp(libs.glide.ksp)
47 |
48 | implementation(libs.androidx.activity)
49 | implementation(libs.firebase.firestore)
50 |
51 | implementation(libs.firebase.ui.firestore)
52 | implementation(libs.firebase.ui.storage)
53 |
54 | implementation(libs.materialdialogs.core)
55 |
56 | api(libs.timber)
57 | api(projects.utils)
58 | }
59 |
--------------------------------------------------------------------------------
/common/ui/resources/src/main/res/drawable/ic_settings.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
22 |
26 |
27 |
--------------------------------------------------------------------------------
/common/ui/compose/src/main/java/com/afterroot/ui/common/compose/theme/Theme3.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.ui.common.compose.theme
16 |
17 | import android.content.Context
18 | import android.os.Build
19 | import androidx.compose.material3.ColorScheme
20 | import androidx.compose.material3.MaterialTheme
21 | import androidx.compose.material3.darkColorScheme
22 | import androidx.compose.material3.dynamicDarkColorScheme
23 | import androidx.compose.material3.dynamicLightColorScheme
24 | import androidx.compose.material3.lightColorScheme
25 | import androidx.compose.runtime.Composable
26 | import com.afterroot.allusive2.Settings
27 | import com.afterroot.allusive2.resources.R
28 |
29 | @Composable
30 | fun Theme(context: Context, content: @Composable () -> Unit) {
31 | val settings = Settings(context)
32 | val colorScheme: ColorScheme = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
33 | when (settings.theme) {
34 | context.getString(R.string.theme_light) -> dynamicLightColorScheme(context)
35 | else -> dynamicDarkColorScheme(context)
36 | }
37 | } else {
38 | when (settings.theme) {
39 | context.getString(R.string.theme_light) -> lightColorScheme()
40 | else -> darkColorScheme()
41 | }
42 | }
43 |
44 | MaterialTheme(
45 | colorScheme = colorScheme,
46 | typography = MaterialTheme.typography,
47 | content = content,
48 | )
49 | }
50 |
--------------------------------------------------------------------------------
/common/ui/compose/src/main/java/com/afterroot/ui/common/compose/theme/tokens/Chip.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.ui.common.compose.theme.tokens
16 |
17 | import androidx.compose.foundation.shape.RoundedCornerShape
18 | import androidx.compose.ui.graphics.Color
19 | import androidx.compose.ui.unit.Dp
20 | import androidx.compose.ui.unit.dp
21 | import com.afterroot.ui.common.compose.theme.Palette
22 |
23 | object Chip {
24 | val ContainerShape = RoundedCornerShape(8.dp)
25 | val ContainerHeight = 32.dp
26 | val ContainerElevation = 0.dp
27 | val TextChipPaddingStart = 16.dp
28 | val TextChipPaddingEnd = 16.dp
29 | val containerStyle: AssistChipContainer = AssistChipContainer()
30 | }
31 |
32 | object AssistChip {
33 | val ContainerShape = RoundedCornerShape(8.dp)
34 | val ContainerHeight = 32.dp
35 |
36 | // Outline Color = md.sys.color.outline
37 | val containerStyle: AssistChipContainer = AssistChipContainer()
38 | }
39 |
40 | data class AssistChipContainer(
41 | val elevated: Boolean = false,
42 | val ContainerElevation: Dp = if (elevated) {
43 | 1.dp // md.sys.elevation.level1
44 | } else {
45 | 0.dp // md.sys.elevation.level0
46 | },
47 | val OutlineSize: Dp = if (elevated) 0.dp else 1.dp,
48 | val OutlineColor: Color = Palette.NeutralVariant60, // md.sys.color.outline
49 |
50 | // if Elevated tokens
51 | // Color = md.sys.color.surface
52 | // Shadow = md.sys.color.shadow
53 | )
54 |
--------------------------------------------------------------------------------
/data/src/main/java/com/afterroot/allusive2/Constants.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2
16 |
17 | import android.content.Context
18 |
19 | object Constants {
20 | const val POINTER_MOUSE = 2
21 | const val POINTER_TOUCH = 1
22 | const val PREF_KEY_FIRST_INSTALL = "first_install_2"
23 | const val RC_LOGIN = 42
24 | const val RC_PERMISSION = 256
25 | const val RC_PICK_IMAGE: Int = 478
26 | const val PREF_KEY_THEME = "key_app_theme"
27 | const val PLACEHOLDER_1 = "Lorem"
28 | const val PLACEHOLDER_2 = "Lorem Ispum"
29 | const val PLACEHOLDER_3 = "Lorem Ispum Dolor"
30 |
31 | const val INDEX_XPOSED_METHOD = 0
32 | const val INDEX_FW_RES_METHOD = 1
33 | const val INDEX_RRO_METHOD = 2
34 | }
35 |
36 | object Reason {
37 | // TODO Design Admin UI
38 | const val OK = 0
39 | const val DUPLICATE = 1
40 | const val NOT_A_POINTER = 2
41 | const val OTHER = 3
42 | const val NOTICE = 4
43 | }
44 |
45 | fun Context.getMinPointerSize(): Int = this.resources.getInteger(
46 | com.afterroot.allusive2.resources.R.integer.min_pointer_size,
47 | )
48 |
49 | fun Context.getMinPointerSizePx(): Int =
50 | (this.getMinPointerSize() * this.resources.displayMetrics.density.toInt()) / 160
51 |
52 | fun Context.getPointerSaveDir(): String = getPointerSaveRootDir() +
53 | getString(com.afterroot.allusive2.resources.R.string.pointer_folder_path_new)
54 |
55 | fun Context.getPointerSaveRootDir(): String = filesDir.path
56 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/allusive/src/main/java/com/afterroot/allusive2/viewmodel/ViewModelState.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.viewmodel
16 |
17 | import androidx.lifecycle.Observer
18 |
19 | sealed class ViewModelState {
20 | object Loading : ViewModelState()
21 | data class Loaded(val data: T) : ViewModelState()
22 | }
23 |
24 | /**
25 | * Used as a wrapper for data that is exposed via a LiveData that represents an event.
26 | */
27 | open class Event(private val content: T) {
28 |
29 | var hasBeenHandled = false
30 | private set // Allow external read but not write
31 |
32 | /**
33 | * Returns the content and prevents its use again.
34 | */
35 | fun getContentIfNotHandled(): T? = if (hasBeenHandled) {
36 | null
37 | } else {
38 | hasBeenHandled = true
39 | content
40 | }
41 |
42 | /**
43 | * Returns the content, even if it's already been handled.
44 | */
45 | fun peekContent(): T = content
46 | }
47 |
48 | /**
49 | * An [Observer] for [Event]s, simplifying the pattern of checking if the [Event]'s content has
50 | * already been handled.
51 | *
52 | * [onEventUnhandledContent] is *only* called if the [Event]'s contents has not been handled.
53 | */
54 | class EventObserver(private val onEventUnhandledContent: (T) -> Unit) : Observer> {
55 | override fun onChanged(event: Event) {
56 | event.getContentIfNotHandled()?.let { value ->
57 | onEventUnhandledContent(value)
58 | }
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/common/ui/compose/src/main/java/com/afterroot/ui/common/compose/animation/FabAnimation.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.ui.common.compose.animation
16 |
17 | import androidx.compose.animation.core.animateFloat
18 | import androidx.compose.animation.core.tween
19 | import androidx.compose.animation.core.updateTransition
20 | import androidx.compose.runtime.Composable
21 | import androidx.compose.runtime.MutableState
22 | import androidx.compose.runtime.State
23 | import androidx.compose.runtime.mutableStateOf
24 | import androidx.compose.runtime.remember
25 |
26 | enum class FabState {
27 | Visible,
28 | Invisible,
29 | }
30 |
31 | @Composable
32 | fun AnimatedFab(
33 | fab: @Composable (
34 | animationState: MutableState,
35 | scale: State,
36 | alpha: State,
37 | ) -> Unit,
38 | ) {
39 | val animationTargetState = remember { mutableStateOf(FabState.Invisible) }
40 | val transition = updateTransition(targetState = animationTargetState.value, label = "")
41 |
42 | val alpha = transition.animateFloat(
43 | transitionSpec = { tween(durationMillis = ANIMATION_DURATION) },
44 | label = "",
45 | ) {
46 | if (it == FabState.Invisible) 0f else 1f
47 | }
48 |
49 | val scale = transition.animateFloat(transitionSpec = {
50 | tween(durationMillis = ANIMATION_DURATION)
51 | }, label = "") {
52 | if (it == FabState.Invisible) 0.5f else 1f
53 | }
54 |
55 | fab(animationTargetState, scale, alpha)
56 | }
57 |
58 | private const val ANIMATION_DURATION = 400
59 |
--------------------------------------------------------------------------------
/allusive/src/main/res/layout/dialog_progress.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
22 |
33 |
34 |
44 |
45 |
--------------------------------------------------------------------------------
/allusive/src/main/res/layout/login_custom_view.xml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
21 |
22 |
32 |
33 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/gradle/create-zip.gradle:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 |
16 |
17 | import org.gradle.work.Incremental
18 | import org.gradle.work.InputChanges
19 |
20 | /**
21 | * Create Empty Magisk Module Zip
22 | */
23 | abstract class CreateEmptyModuleZip extends DefaultTask {
24 | @Incremental
25 | @InputDirectory
26 | abstract DirectoryProperty getInputDir()
27 |
28 | @OutputDirectory
29 | abstract DirectoryProperty getOutputDir()
30 |
31 | @TaskAction
32 | void execute(InputChanges inputChanges) {
33 | Boolean isCreate = false
34 |
35 | inputChanges.getFileChanges(inputDir).each { change ->
36 | if (change.fileType == FileType.DIRECTORY) return
37 | isCreate = true
38 | }
39 | def command
40 | command = org.gradle.internal.os.OperatingSystem.current() == org.gradle.internal.os.OperatingSystem.WINDOWS
41 | ? "python build.py" : "python3 build.py"
42 | if (isCreate) {
43 | println command.execute([], project.rootDir).text
44 | }
45 | }
46 | }
47 |
48 | tasks.register('createEmptyModuleZip', CreateEmptyModuleZip) {
49 | //Task Meta data
50 | group = BasePlugin.BUILD_GROUP
51 | description = "Creates Empty Magisk Module Zip"
52 |
53 | //dependsOn 'buildRROApk'
54 |
55 | inputDir = file("$rootDir/ui/magisk/module/")
56 | outputDir = file("$rootDir/ui/magisk/src/main/assets")
57 | }
58 |
59 | tasks.whenTaskAdded { task ->
60 | if ((task.name =~ /package\w*Assets/).matches()) { //Matches tasks packageReleaseAssets, packageDebugAssets
61 | task.dependsOn 'createEmptyModuleZip'
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/base/src/main/java/com/afterroot/allusive2/base/InvokeStatus.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.base
16 |
17 | import kotlinx.coroutines.CoroutineScope
18 | import kotlinx.coroutines.Job
19 | import kotlinx.coroutines.flow.Flow
20 | import kotlinx.coroutines.launch
21 | import timber.log.Timber
22 |
23 | sealed class InvokeStatus
24 | object InvokeStarted : InvokeStatus()
25 | object InvokeSuccess : InvokeStatus()
26 | data class InvokeError(val throwable: Throwable) : InvokeStatus()
27 |
28 | /**
29 | * Extension function for Watching the [InvokeStatus]
30 | * @param scope [CoroutineScope] to launch coroutine in.
31 | * @param onSuccess Lambda to Execute when [InvokeStatus] is [InvokeSuccess]
32 | * @return Launched [Job] on specified [scope]
33 | */
34 | fun Flow.watchStatus(
35 | scope: CoroutineScope,
36 | tag: String = "",
37 | onSuccess: () -> Unit = {},
38 | ): Job = scope.launch { collectStatus(tag, onSuccess) }
39 |
40 | /**
41 | * Collects [InvokeStatus]
42 | * @param tag Additional log tag prefix
43 | * @param onSuccess Lambda to Execute when [InvokeStatus] is [InvokeSuccess]
44 | */
45 | private suspend fun Flow.collectStatus(
46 | tag: String = "InvokeStatus",
47 | onSuccess: () -> Unit = {},
48 | ) = collect { status ->
49 |
50 | when (status) {
51 | InvokeStarted -> {
52 | Timber.tag(tag).d("collectStatus: Start")
53 | }
54 | InvokeSuccess -> {
55 | Timber.tag(tag).d("collectStatus: Success")
56 | onSuccess()
57 | }
58 | is InvokeError -> {
59 | Timber.tag(tag).d(status.throwable, "collectStatus: Error")
60 | }
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/allusive/src/main/java/com/afterroot/allusive2/utils/CheckeredDrawable.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.utils
16 |
17 | import android.graphics.Bitmap
18 | import android.graphics.BitmapShader
19 | import android.graphics.Canvas
20 | import android.graphics.Color
21 | import android.graphics.ColorFilter
22 | import android.graphics.Paint
23 | import android.graphics.Paint.ANTI_ALIAS_FLAG
24 | import android.graphics.PixelFormat
25 | import android.graphics.Rect
26 | import android.graphics.Shader
27 | import android.graphics.drawable.Drawable
28 |
29 | class CheckeredDrawable(var size: Int = 20) : Drawable() {
30 |
31 | private val mPaint = Paint(ANTI_ALIAS_FLAG)
32 |
33 | override fun draw(canvas: Canvas) {
34 | val bitmap = Bitmap.createBitmap(size * 2, size * 2, Bitmap.Config.ARGB_8888)
35 | val p = Paint(ANTI_ALIAS_FLAG)
36 | p.style = Paint.Style.FILL
37 |
38 | val c = Canvas(bitmap)
39 |
40 | val r = Rect(0, 0, size, size)
41 | p.color = Color.DKGRAY
42 | c.drawRect(r, p)
43 |
44 | r.offset(size, size)
45 | c.drawRect(r, p)
46 |
47 | p.color = Color.LTGRAY
48 | r.offset(-size, 0)
49 | c.drawRect(r, p)
50 |
51 | r.offset(size, -size)
52 | c.drawRect(r, p)
53 |
54 | mPaint.shader = BitmapShader(bitmap, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT)
55 |
56 | canvas.drawPaint(mPaint)
57 | }
58 |
59 | override fun setAlpha(alpha: Int) {
60 | mPaint.alpha = alpha
61 | }
62 |
63 | override fun setColorFilter(colorFilter: ColorFilter?) {
64 | mPaint.colorFilter = colorFilter
65 | }
66 |
67 | override fun getOpacity(): Int = PixelFormat.TRANSPARENT
68 | }
69 |
--------------------------------------------------------------------------------
/allusive/src/main/java/com/afterroot/allusive2/adapter/PointersAdapter.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.adapter
16 |
17 | import android.view.LayoutInflater
18 | import android.view.ViewGroup
19 | import androidx.recyclerview.widget.DiffUtil
20 | import androidx.recyclerview.widget.ListAdapter
21 | import androidx.recyclerview.widget.RecyclerView
22 | import com.afterroot.allusive2.adapter.callback.ItemSelectedCallback
23 | import com.afterroot.allusive2.model.Pointer
24 | import com.afterroot.allusive2.repo.PointerVH
25 | import com.afterroot.allusive2.repo.databinding.ItemPointerRepoBinding
26 | import com.google.firebase.storage.FirebaseStorage
27 |
28 | /**
29 | * New list adapter for Repository screen.
30 | * */
31 | class PointersAdapter(
32 | private val callbacks: ItemSelectedCallback,
33 | private val firebaseStorage: FirebaseStorage,
34 | ) : ListAdapter(object : DiffUtil.ItemCallback() {
35 | override fun areItemsTheSame(oldItem: Pointer, newItem: Pointer): Boolean = oldItem == newItem
36 |
37 | override fun areContentsTheSame(oldItem: Pointer, newItem: Pointer): Boolean =
38 | oldItem.hashCode() == newItem.hashCode()
39 | }) {
40 | override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): RecyclerView.ViewHolder {
41 | val binding = ItemPointerRepoBinding.inflate(
42 | LayoutInflater.from(parent.context),
43 | parent,
44 | false,
45 | )
46 | return PointerVH(binding, callbacks, firebaseStorage)
47 | }
48 |
49 | override fun onBindViewHolder(holder: RecyclerView.ViewHolder, position: Int) {
50 | holder as PointerVH
51 | holder.bind(getItem(position))
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/.github/ci-gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | # Ensure important default jvmargs aren't overwritten. See https://github.com/gradle/gradle/issues/19750
10 | #
11 | # For more information about how Gradle memory options were chosen:
12 | # - Metaspace See https://www.jasonpearson.dev/metaspace-in-jvm-builds/
13 | # - SoftRefLRUPolicyMSPerMB would default to 1000 which with a 4gb heap translates to ~51 minutes.
14 | # A value of 1 means ~4 seconds before SoftRefs can be collected, which means its realistic to
15 | # collect them as needed during a build that should take seconds to minutes.
16 | # - CodeCache normally defaults to a very small size. Increasing it from platform defaults of 32-48m
17 | # because of how many classes can be loaded into memory and then cached as native compiled code
18 | # for a small speed boost.
19 | org.gradle.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=256m -XX:+HeapDumpOnOutOfMemoryError -Xmx5G -Xms4G
20 |
21 | # For more information about how Kotlin Daemon memory options were chosen:
22 | # - Kotlin JVM args only inherit Xmx, ReservedCodeCache, and MaxMetaspace. Since we are specifying
23 | # other args we need to specify all of them here.
24 | # - We're using the Kotlin Gradle Plugin's default value for ReservedCodeCacheSize, if we do not then
25 | # the Gradle JVM arg value for ReservedCodeCacheSize will be used.
26 | kotlin.daemon.jvmargs=-Dfile.encoding=UTF-8 -XX:+UseG1GC -XX:SoftRefLRUPolicyMSPerMB=1 -XX:ReservedCodeCacheSize=320m -XX:+HeapDumpOnOutOfMemoryError -Xmx5G -Xms4G
27 |
28 | org.gradle.daemon=false
29 | org.gradle.parallel=true
30 |
31 | kotlin.incremental=false
32 |
33 | # Controls KotlinOptions.allWarningsAsErrors.
34 | # This value used in CI and is currently set to false.
35 | # If you want to treat warnings as errors locally, set this property to true
36 | # in your ~/.gradle/gradle.properties file.
37 | warningsAsErrors=false
38 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by https://www.gitignore.io/api/android
2 | # Edit at https://www.gitignore.io/?templates=android
3 |
4 | ### Android ###
5 | # Built application files
6 | *.apk
7 | *.ap_
8 | *.aab
9 |
10 | # Files for the ART/Dalvik VM
11 | *.dex
12 |
13 | # Java class files
14 | *.class
15 |
16 | # Generated files
17 | bin/
18 | gen/
19 | out/
20 | #release/
21 |
22 | # Gradle files
23 | .gradle/
24 | build/
25 |
26 | # Local configuration file (sdk path, etc)
27 | local.properties
28 |
29 | # Proguard folder generated by Eclipse
30 | proguard/
31 |
32 | # Log Files
33 | *.log
34 |
35 | # Android Studio Navigation editor temp files
36 | .navigation/
37 |
38 | # Android Studio captures folder
39 | captures/
40 |
41 | # IntelliJ
42 | *.iml
43 | .idea/workspace.xml
44 | .idea/tasks.xml
45 | .idea/gradle.xml
46 | .idea/assetWizardSettings.xml
47 | .idea/dictionaries
48 | .idea/libraries
49 | .idea/shelf
50 | # Android Studio 3 in .gitignore file.
51 | .idea/caches
52 | .idea/modules.xml
53 | # Comment next line if keeping position of elements in Navigation Editor is relevant for you
54 | .idea/navEditor.xml
55 | .idea/deploymentTargetDropDown.xml
56 |
57 | # Keystore files
58 | # Uncomment the following lines if you do not want to check your keystore files in.
59 | *.jks
60 | *.keystore
61 |
62 | # External native build folder generated in Android Studio 2.2 and later
63 | .externalNativeBuild
64 |
65 | # Google Services (e.g. APIs or Firebase)
66 | # google-services.json
67 |
68 | # Freeline
69 | freeline.py
70 | freeline/
71 | freeline_project_description.json
72 |
73 | # fastlane
74 | fastlane/report.xml
75 | fastlane/Preview.html
76 | fastlane/screenshots
77 | fastlane/test_output
78 | fastlane/readme.md
79 |
80 | # Version control
81 | vcs.xml
82 |
83 | # lint
84 | lint/intermediates/
85 | lint/generated/
86 | lint/outputs/
87 | lint/tmp/
88 | # lint/reports/
89 |
90 | ### Android Patch ###
91 | gen-external-apklibs
92 | output.json
93 |
94 | # Replacement of .externalNativeBuild directories introduced
95 | # with Android Studio 3.5.
96 | .cxx/
97 |
98 | # End of https://www.gitignore.io/api/android
99 |
100 | # My List
101 | /others
102 | /keystore.properties
103 | /private.properties
104 | /publish.properties
105 | google-services.json
106 | /ui/magisk/src/main/assets/empty-module.zip
107 | /ui/magisk/src/main/assets/rro-module*.zip
108 |
--------------------------------------------------------------------------------
/ui/repo/src/main/java/com/afterroot/allusive2/ui/repo/RRORequestFragment.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2022 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.ui.repo
16 |
17 | import android.os.Bundle
18 | import android.view.LayoutInflater
19 | import android.view.View
20 | import android.view.ViewGroup
21 | import androidx.compose.ui.platform.ViewCompositionStrategy
22 | import androidx.fragment.app.Fragment
23 | import androidx.fragment.app.viewModels
24 | import com.afterroot.allusive2.repo.databinding.FragmentRroRequestBinding
25 | import com.afterroot.allusive2.viewmodel.RepoViewModel
26 | import com.afterroot.ui.common.compose.theme.Theme
27 | import dagger.hilt.android.AndroidEntryPoint
28 |
29 | @AndroidEntryPoint
30 | class RRORequestFragment : Fragment() {
31 |
32 | private var _binding: FragmentRroRequestBinding? = null
33 | private val binding get() = _binding!!
34 | private val repoViewModel: RepoViewModel by viewModels()
35 |
36 | override fun onCreate(savedInstanceState: Bundle?) {
37 | super.onCreate(savedInstanceState)
38 | loadRequests()
39 | }
40 |
41 | override fun onCreateView(
42 | inflater: LayoutInflater,
43 | container: ViewGroup?,
44 | savedInstanceState: Bundle?,
45 | ): View? {
46 | _binding = FragmentRroRequestBinding.inflate(inflater, container, false)
47 | val view = binding.root
48 | binding.composeLayout.apply {
49 | setViewCompositionStrategy(ViewCompositionStrategy.DisposeOnViewTreeLifecycleDestroyed)
50 | setContent {
51 | Theme(requireContext()) {
52 | Requests()
53 | }
54 | }
55 | }
56 | return view
57 | }
58 |
59 | private fun loadRequests() {
60 | repoViewModel.submitAction(RepoActions.LoadRequests)
61 | }
62 |
63 | override fun onDestroyView() {
64 | super.onDestroyView()
65 | _binding = null
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/allusive/src/main/java/com/afterroot/allusive2/di/AppModules.kt:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2016-2021 Sandip Vaghela
3 | * Licensed under the Apache License, Version 2.0 (the "License");
4 | * you may not use this file except in compliance with the License.
5 | * You may obtain a copy of the License at
6 | *
7 | * http://www.apache.org/licenses/LICENSE-2.0
8 | *
9 | * Unless required by applicable law or agreed to in writing, software
10 | * distributed under the License is distributed on an "AS IS" BASIS,
11 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | * See the License for the specific language governing permissions and
13 | * limitations under the License.
14 | */
15 | package com.afterroot.allusive2.di
16 |
17 | import com.afterroot.allusive2.base.BuildConfig
18 | import com.afterroot.allusive2.base.CoroutineDispatchers
19 | import com.afterroot.allusive2.utils.getMailBodyForFeedback
20 | import com.afterroot.data.utils.FirebaseUtils
21 | import com.google.gson.Gson
22 | import com.google.gson.GsonBuilder
23 | import dagger.Module
24 | import dagger.Provides
25 | import dagger.hilt.InstallIn
26 | import dagger.hilt.components.SingletonComponent
27 | import javax.inject.Named
28 | import javax.inject.Singleton
29 | import kotlinx.coroutines.Dispatchers
30 |
31 | @Module
32 | @InstallIn(SingletonComponent::class)
33 | object AppModules {
34 | @Singleton
35 | @Provides
36 | fun provideDispatchers() = CoroutineDispatchers(
37 | default = Dispatchers.Default,
38 | io = Dispatchers.IO,
39 | main = Dispatchers.Main,
40 | )
41 |
42 | @Provides
43 | @Named("feedback_email")
44 | fun provideFeedbackEmail(): String = "afterhasroot@gmail.com"
45 |
46 | @Provides
47 | @Named("version_Code")
48 | fun provideVersionCode(): Int = BuildConfig.VERSION_CODE
49 |
50 | @Provides
51 | @Named("version_name")
52 | fun provideVersionName(): String = BuildConfig.VERSION_NAME
53 |
54 | @Provides
55 | @Named("version_string")
56 | fun provideVersionString() =
57 | "v${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE}) - ${BuildConfig.COMMIT_ID}"
58 |
59 | @Provides
60 | @Named("feedback_body")
61 | fun provideFeedbackBody(firebaseUtils: FirebaseUtils): String = getMailBodyForFeedback(
62 | firebaseUtils,
63 | version = provideVersionName(),
64 | versionCode = provideVersionCode(),
65 | )
66 |
67 | @Provides
68 | @Singleton
69 | fun provideGson(): Gson = GsonBuilder().create()
70 | }
71 |
--------------------------------------------------------------------------------
/data/schemas/com.afterroot.allusive2.database.MyDatabase/1.json:
--------------------------------------------------------------------------------
1 | {
2 | "formatVersion": 1,
3 | "database": {
4 | "version": 1,
5 | "identityHash": "f02790444b5609747f3d3ac54a7facda",
6 | "entities": [
7 | {
8 | "tableName": "pointers",
9 | "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `pointer_name` TEXT NOT NULL, `file_name` TEXT NOT NULL, `pointer_desc` TEXT NOT NULL, `uploader_id` TEXT NOT NULL, `uploader_name` TEXT NOT NULL)",
10 | "fields": [
11 | {
12 | "fieldPath": "id",
13 | "columnName": "_id",
14 | "affinity": "INTEGER",
15 | "notNull": true
16 | },
17 | {
18 | "fieldPath": "pointer_name",
19 | "columnName": "pointer_name",
20 | "affinity": "TEXT",
21 | "notNull": true
22 | },
23 | {
24 | "fieldPath": "file_name",
25 | "columnName": "file_name",
26 | "affinity": "TEXT",
27 | "notNull": true
28 | },
29 | {
30 | "fieldPath": "pointer_desc",
31 | "columnName": "pointer_desc",
32 | "affinity": "TEXT",
33 | "notNull": true
34 | },
35 | {
36 | "fieldPath": "uploader_id",
37 | "columnName": "uploader_id",
38 | "affinity": "TEXT",
39 | "notNull": true
40 | },
41 | {
42 | "fieldPath": "uploader_name",
43 | "columnName": "uploader_name",
44 | "affinity": "TEXT",
45 | "notNull": true
46 | }
47 | ],
48 | "primaryKey": {
49 | "columnNames": [
50 | "_id"
51 | ],
52 | "autoGenerate": true
53 | },
54 | "indices": [
55 | {
56 | "name": "index_pointers__id",
57 | "unique": false,
58 | "columnNames": [
59 | "_id"
60 | ],
61 | "createSql": "CREATE INDEX IF NOT EXISTS `index_pointers__id` ON `${TABLE_NAME}` (`_id`)"
62 | }
63 | ],
64 | "foreignKeys": []
65 | }
66 | ],
67 | "views": [],
68 | "setupQueries": [
69 | "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
70 | "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'f02790444b5609747f3d3ac54a7facda')"
71 | ]
72 | }
73 | }
--------------------------------------------------------------------------------
/data/schemas/com.afterroot.allusive2.database.MyDatabase/2.json:
--------------------------------------------------------------------------------
1 | {
2 | "formatVersion": 1,
3 | "database": {
4 | "version": 2,
5 | "identityHash": "5ab9c1643bf3ac6b61d12eda0432de97",
6 | "entities": [
7 | {
8 | "tableName": "pointers",
9 | "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`_id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `pointer_name` TEXT, `file_name` TEXT, `pointer_desc` TEXT, `uploader_id` TEXT NOT NULL, `uploader_name` TEXT NOT NULL)",
10 | "fields": [
11 | {
12 | "fieldPath": "id",
13 | "columnName": "_id",
14 | "affinity": "INTEGER",
15 | "notNull": true
16 | },
17 | {
18 | "fieldPath": "pointer_name",
19 | "columnName": "pointer_name",
20 | "affinity": "TEXT",
21 | "notNull": false
22 | },
23 | {
24 | "fieldPath": "file_name",
25 | "columnName": "file_name",
26 | "affinity": "TEXT",
27 | "notNull": false
28 | },
29 | {
30 | "fieldPath": "pointer_desc",
31 | "columnName": "pointer_desc",
32 | "affinity": "TEXT",
33 | "notNull": false
34 | },
35 | {
36 | "fieldPath": "uploader_id",
37 | "columnName": "uploader_id",
38 | "affinity": "TEXT",
39 | "notNull": true
40 | },
41 | {
42 | "fieldPath": "uploader_name",
43 | "columnName": "uploader_name",
44 | "affinity": "TEXT",
45 | "notNull": true
46 | }
47 | ],
48 | "primaryKey": {
49 | "columnNames": [
50 | "_id"
51 | ],
52 | "autoGenerate": true
53 | },
54 | "indices": [
55 | {
56 | "name": "index_pointers__id",
57 | "unique": false,
58 | "columnNames": [
59 | "_id"
60 | ],
61 | "orders": [],
62 | "createSql": "CREATE INDEX IF NOT EXISTS `index_pointers__id` ON `${TABLE_NAME}` (`_id`)"
63 | }
64 | ],
65 | "foreignKeys": []
66 | }
67 | ],
68 | "views": [],
69 | "setupQueries": [
70 | "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
71 | "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '5ab9c1643bf3ac6b61d12eda0432de97')"
72 | ]
73 | }
74 | }
--------------------------------------------------------------------------------