├── consumer-rules.pro ├── Ktor ├── consumer-rules.pro ├── proguard-rules.pro └── build.gradle.kts ├── FileTypes ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ └── kotlin │ └── com │ └── infomaniak │ └── core │ └── filetypes │ └── FileTypeIcons.kt ├── Matomo ├── consumer-rules.pro ├── proguard-rules.pro └── build.gradle.kts ├── Network ├── consumer-rules.pro ├── proguard-rules.pro ├── src │ └── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ └── com │ │ │ └── infomaniak │ │ │ └── core │ │ │ └── network │ │ │ ├── networking │ │ │ └── ManualAuthorizationRequired.kt │ │ │ └── utils │ │ │ └── Utils.kt │ │ └── res │ │ ├── values │ │ └── strings.xml │ │ ├── values-es │ │ └── strings.xml │ │ ├── values-fr │ │ └── strings.xml │ │ ├── values-de │ │ └── strings.xml │ │ └── values-it │ │ └── strings.xml ├── Models │ ├── src │ │ └── main │ │ │ └── java │ │ │ └── com │ │ │ └── infomaniak │ │ │ └── core │ │ │ └── network │ │ │ └── models │ │ │ └── exceptions │ │ │ └── NetworkExceptions.kt │ └── build.gradle.kts ├── Ktor │ └── build.gradle.kts └── build.gradle.kts ├── Sentry ├── consumer-rules.pro ├── proguard-rules.pro └── build.gradle.kts ├── AppIntegrity ├── consumer-rules.pro ├── proguard-rules.pro └── src │ └── main │ ├── res │ ├── values │ │ └── strings.xml │ ├── values-de │ │ └── strings.xml │ ├── values-fr │ │ └── strings.xml │ ├── values-es │ │ └── strings.xml │ └── values-it │ │ └── strings.xml │ └── kotlin │ └── com │ └── infomaniak │ └── core │ └── appintegrity │ ├── models │ ├── ApiError.kt │ ├── ApiResponse.kt │ └── ApiResponseStatus.kt │ ├── exceptions │ ├── NetworkException.kt │ ├── IntegrityException.kt │ ├── ApiException.kt │ └── UnexpectedApiErrorFormatException.kt │ └── AppIntegrityRoutes.kt ├── RecyclerView ├── consumer-rules.pro ├── proguard-rules.pro ├── build.gradle.kts └── src │ └── main │ └── kotlin │ └── com │ └── infomaniak │ └── core │ └── recyclerview │ └── ResettableLazy.kt ├── Thumbnails ├── consumer-rules.pro ├── proguard-rules.pro └── build.gradle.kts ├── CrossAppLogin ├── Back │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ └── kotlin │ │ └── com │ │ └── infomaniak │ │ └── core │ │ └── crossapplogin │ │ └── back │ │ └── internal │ │ ├── CustomTokenInterceptor.kt │ │ └── certificates │ │ ├── AppCertificateChecker.kt │ │ └── LazyAppSigningCertificate.kt └── Front │ └── src │ └── main │ └── kotlin │ └── com │ └── infomaniak │ └── core │ └── crossapplogin │ └── front │ ├── utils │ └── Extensions.kt │ └── previews │ └── AccountsCheckingStatePreviewParameterProvider.kt ├── FragmentNavigation ├── consumer-rules.pro ├── proguard-rules.pro └── build.gradle.kts ├── KSuite ├── MyKSuite │ ├── consumer-rules.pro │ ├── proguard-rules.pro │ └── src │ │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── colors.xml │ │ │ └── attrs.xml │ │ ├── values-night │ │ │ └── colors.xml │ │ ├── drawable │ │ │ ├── illu_dashboard_background.xml │ │ │ └── ic_envelope_bold.xml │ │ └── drawable-night │ │ │ └── illu_dashboard_background.xml │ │ └── java │ │ └── com │ │ └── infomaniak │ │ └── core │ │ └── ksuite │ │ └── myksuite │ │ └── ui │ │ ├── theme │ │ └── Dimens.kt │ │ ├── data │ │ ├── kSuiteDrive.kt │ │ └── MyKSuiteDataDao.kt │ │ ├── network │ │ └── ApiRoutes.kt │ │ └── views │ │ ├── MyKSuiteChipView.kt │ │ └── MyKSuitePlusChipView.kt ├── KSuitePro │ └── src │ │ └── main │ │ └── res │ │ ├── drawable │ │ └── ic_euria.png │ │ └── values-night │ │ └── colors.xml ├── src │ └── main │ │ └── java │ │ └── com │ │ └── infomaniak │ │ └── core │ │ └── ksuite │ │ └── ui │ │ ├── utils │ │ └── MatomoKSuite.kt │ │ └── components │ │ └── KSuiteGradient.kt └── build.gradle.kts ├── Ui ├── Compose │ ├── Basics │ │ ├── consumer-rules.pro │ │ ├── proguard-rules.pro │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── infomaniak │ │ │ └── core │ │ │ └── ui │ │ │ └── compose │ │ │ └── basics │ │ │ └── ButtonStyle.kt │ └── Margin │ │ └── src │ │ └── main │ │ └── kotlin │ │ └── com │ │ └── infomaniak │ │ └── core │ │ └── ui │ │ └── compose │ │ └── margin │ │ └── Margin.kt ├── View │ ├── src │ │ └── main │ │ │ └── res │ │ │ └── values │ │ │ ├── dimens.xml │ │ │ └── colors.xml │ ├── EdgeToEdge │ │ └── src │ │ │ └── main │ │ │ └── kotlin │ │ │ └── com │ │ │ └── infomaniak │ │ │ └── core │ │ │ └── ui │ │ │ └── view │ │ │ └── edgetoedge │ │ │ └── EdgeToEdgeActivity.kt │ └── build.gradle.kts ├── src │ └── main │ │ └── kotlin │ │ └── com │ │ └── infomaniak │ │ └── core │ │ └── ui │ │ └── ContextExtensions.kt └── build.gradle.kts ├── Legacy ├── src │ └── main │ │ ├── res │ │ ├── font │ │ │ ├── suisseintl_bold.otf │ │ │ ├── suisseintl_medium.otf │ │ │ ├── suisseintl_regular.otf │ │ │ ├── suisseintl_semibold.otf │ │ │ └── suisseintl_regular_italic.otf │ │ ├── drawable-hdpi │ │ │ └── splashscreen_branding_image_legacy.png │ │ ├── drawable-mdpi │ │ │ └── splashscreen_branding_image_legacy.png │ │ ├── drawable-xhdpi │ │ │ └── splashscreen_branding_image_legacy.png │ │ ├── drawable-xxhdpi │ │ │ └── splashscreen_branding_image_legacy.png │ │ ├── drawable-xxxhdpi │ │ │ └── splashscreen_branding_image_legacy.png │ │ ├── drawable-night-hdpi │ │ │ └── splashscreen_branding_image_legacy.png │ │ ├── drawable-night-mdpi │ │ │ └── splashscreen_branding_image_legacy.png │ │ ├── drawable-night-xhdpi │ │ │ └── splashscreen_branding_image_legacy.png │ │ ├── drawable-night-xxhdpi │ │ │ └── splashscreen_branding_image_legacy.png │ │ ├── drawable-night-xxxhdpi │ │ │ └── splashscreen_branding_image_legacy.png │ │ ├── drawable │ │ │ └── placeholder.xml │ │ ├── layout │ │ │ ├── item_loading.xml │ │ │ └── activity_webview.xml │ │ ├── values │ │ │ ├── attrs.xml │ │ │ └── dimens.xml │ │ └── values-night │ │ │ └── colors.xml │ │ └── java │ │ └── com │ │ └── infomaniak │ │ └── core │ │ └── legacy │ │ ├── views │ │ ├── LoaderView.kt │ │ └── LoaderConstant.kt │ │ ├── utils │ │ └── ApiTokenExt.kt │ │ ├── models │ │ └── user │ │ │ ├── Email.kt │ │ │ ├── Phone.kt │ │ │ ├── preferences │ │ │ ├── PreferenceTemplate.kt │ │ │ ├── TimeZone.kt │ │ │ ├── Country.kt │ │ │ ├── OrganizationPreference.kt │ │ │ └── Language.kt │ │ │ └── ContactMethod.kt │ │ ├── networking │ │ └── ManualAuthorizationRequired.kt │ │ ├── api │ │ └── ApiRoutesCore.kt │ │ └── fdroidTools │ │ └── FdroidRelease.kt ├── Confetti │ ├── build.gradle │ └── src │ │ └── main │ │ ├── java │ │ └── com │ │ │ └── infomaniak │ │ │ └── core │ │ │ └── legacy │ │ │ └── confetti │ │ │ └── ConfettoGenerator.kt │ │ └── res │ │ └── values │ │ └── dimens.xml ├── BugTracker │ └── build.gradle └── AppLock │ ├── build.gradle │ └── src │ └── main │ └── res │ ├── values │ ├── strings.xml │ └── attrs.xml │ ├── values-de │ └── strings.xml │ ├── values-it │ └── strings.xml │ ├── values-es │ └── strings.xml │ └── values-fr │ └── strings.xml ├── TwoFactorAuth ├── Front │ └── src │ │ └── main │ │ └── res │ │ └── drawable │ │ └── background_light_source.webp └── Back │ └── src │ └── main │ └── kotlin │ └── ConnectionAttemptInfo.kt ├── Onboarding ├── consumer-rules.pro └── build.gradle.kts ├── .github └── workflows │ ├── auto-author-assign.yml │ ├── dependent-issues.yml │ └── semantic-commit.yml ├── .gitignore ├── proguard-rules.pro ├── Auth ├── proguard-rules.pro └── src │ └── main │ ├── kotlin │ └── com │ │ └── infomaniak │ │ └── core │ │ └── auth │ │ ├── Extensions.kt │ │ ├── UserExistenceChecker.kt │ │ ├── utils │ │ ├── ApiTokenExt.kt │ │ └── AccountCreationResult.kt │ │ ├── models │ │ ├── user │ │ │ ├── Email.kt │ │ │ ├── Phone.kt │ │ │ ├── preferences │ │ │ │ ├── PreferenceTemplate.kt │ │ │ │ ├── TimeZone.kt │ │ │ │ ├── Country.kt │ │ │ │ ├── OrganizationPreference.kt │ │ │ │ └── Language.kt │ │ │ └── ContactMethod.kt │ │ ├── AuthCodeResult.kt │ │ └── UserLoginResult.kt │ │ └── api │ │ └── ApiRoutesCore.kt │ └── res │ ├── values-es │ └── strings.xml │ ├── values │ └── strings.xml │ ├── values-fr │ └── strings.xml │ ├── values-de │ └── strings.xml │ └── values-it │ └── strings.xml ├── WebView ├── proguard-rules.pro └── build.gradle.kts ├── InAppReview ├── proguard-rules.pro └── src │ ├── fdroid │ └── kotlin │ │ └── com │ │ └── infomaniak │ │ └── core │ │ └── inappreview │ │ └── reviewmanagers │ │ └── InAppReviewManager.kt │ └── main │ └── res │ └── layout │ └── alert_dialog_review.xml ├── InAppUpdate ├── proguard-rules.pro └── src │ ├── main │ ├── res │ │ └── values │ │ │ └── attrs.xml │ └── kotlin │ │ └── com │ │ └── infomaniak │ │ └── core │ │ └── inappupdate │ │ └── UpdateScheduler.kt │ └── fdroid │ └── kotlin │ └── com │ └── infomaniak │ └── core │ └── inappupdate │ ├── AppUpdateScheduler.kt │ ├── updatemanagers │ └── WorkerUpdateManager.kt │ └── FdroidRelease.kt ├── src └── main │ └── kotlin │ └── com │ └── infomaniak │ └── core │ ├── extensions │ ├── StringExt.kt │ ├── IntentExt.kt │ ├── ParcelExt.kt │ ├── AtomicFileExt.kt │ ├── PackageManagerExt.kt │ └── BundleExt.kt │ ├── CacheExpirationScope.kt │ ├── AssociatedUserDataCleanable.kt │ ├── Result.kt │ ├── utils │ ├── NumberUtils.kt │ └── UserAgentUtils.kt │ ├── NotTestedNorUsed.kt │ ├── Uri.kt │ ├── WakeLock.kt │ └── Xor.kt ├── Avatar ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ └── infomaniak │ │ │ └── core │ │ │ └── avatar │ │ │ ├── models │ │ │ ├── AvatarUrlData.kt │ │ │ └── AvatarColors.kt │ │ │ └── BackgroundColorUtils.kt │ │ └── res │ │ └── values │ │ └── colors.xml └── build.gradle.kts ├── Notifications ├── src │ └── main │ │ └── AndroidManifest.xml └── build.gradle.kts ├── AppVersionChecker └── src │ └── main │ └── kotlin │ └── com │ └── infomaniak │ └── core │ └── appversionchecker │ └── utils │ └── AndroidSdkVersionProvider.kt └── DotLottie ├── build.gradle.kts └── src └── main ├── res └── values │ └── attrs.xml └── kotlin └── com └── infomaniak └── core └── dotlottie ├── ThemeData.kt └── model └── DotLottieTheme.kt /consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ktor/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /FileTypes/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Matomo/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Network/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Sentry/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /AppIntegrity/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /RecyclerView/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Thumbnails/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CrossAppLogin/Back/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /FragmentNavigation/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Ui/Compose/Basics/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Legacy/src/main/res/font/suisseintl_bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/font/suisseintl_bold.otf -------------------------------------------------------------------------------- /Legacy/src/main/res/font/suisseintl_medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/font/suisseintl_medium.otf -------------------------------------------------------------------------------- /Legacy/src/main/res/font/suisseintl_regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/font/suisseintl_regular.otf -------------------------------------------------------------------------------- /Legacy/src/main/res/font/suisseintl_semibold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/font/suisseintl_semibold.otf -------------------------------------------------------------------------------- /KSuite/KSuitePro/src/main/res/drawable/ic_euria.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/KSuite/KSuitePro/src/main/res/drawable/ic_euria.png -------------------------------------------------------------------------------- /Legacy/src/main/res/font/suisseintl_regular_italic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/font/suisseintl_regular_italic.otf -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable-hdpi/splashscreen_branding_image_legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/drawable-hdpi/splashscreen_branding_image_legacy.png -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable-mdpi/splashscreen_branding_image_legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/drawable-mdpi/splashscreen_branding_image_legacy.png -------------------------------------------------------------------------------- /TwoFactorAuth/Front/src/main/res/drawable/background_light_source.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/TwoFactorAuth/Front/src/main/res/drawable/background_light_source.webp -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable-xhdpi/splashscreen_branding_image_legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/drawable-xhdpi/splashscreen_branding_image_legacy.png -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable-xxhdpi/splashscreen_branding_image_legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/drawable-xxhdpi/splashscreen_branding_image_legacy.png -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable-xxxhdpi/splashscreen_branding_image_legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/drawable-xxxhdpi/splashscreen_branding_image_legacy.png -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable-night-hdpi/splashscreen_branding_image_legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/drawable-night-hdpi/splashscreen_branding_image_legacy.png -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable-night-mdpi/splashscreen_branding_image_legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/drawable-night-mdpi/splashscreen_branding_image_legacy.png -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable-night-xhdpi/splashscreen_branding_image_legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/drawable-night-xhdpi/splashscreen_branding_image_legacy.png -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable-night-xxhdpi/splashscreen_branding_image_legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/drawable-night-xxhdpi/splashscreen_branding_image_legacy.png -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable-night-xxxhdpi/splashscreen_branding_image_legacy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/infomaniak/android-core/main/Legacy/src/main/res/drawable-night-xxxhdpi/splashscreen_branding_image_legacy.png -------------------------------------------------------------------------------- /Onboarding/consumer-rules.pro: -------------------------------------------------------------------------------- 1 | # This is due to dotLottie library because of their JNA dependency 2 | # This will be handled by the library ""soon"" 3 | # https://github.com/LottieFiles/dotlottie-android/issues/78 4 | 5 | -dontwarn java.awt.Component 6 | -dontwarn java.awt.GraphicsEnvironment 7 | -dontwarn java.awt.HeadlessException 8 | -dontwarn java.awt.Window 9 | -------------------------------------------------------------------------------- /.github/workflows/auto-author-assign.yml: -------------------------------------------------------------------------------- 1 | name: Auto Author Assign 2 | 3 | on: 4 | pull_request_target: 5 | types: [ opened, reopened ] 6 | 7 | concurrency: 8 | group: ${{ github.workflow }}-${{ github.ref }} 9 | cancel-in-progress: true 10 | 11 | permissions: 12 | pull-requests: write 13 | 14 | jobs: 15 | assign-author: 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: toshimaru/auto-author-assign@v2.1.1 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.aab 2 | *.apk 3 | /app/release/baselineProfiles 4 | /app/src/androidTest/java/com/infomaniak/drive/utils/Env.kt 5 | /app/src/standard/java/com/infomaniak/drive/GeniusScanEnv.kt 6 | **/build 7 | **/captures 8 | .cxx 9 | .DS_Store 10 | env.properties 11 | uitest-env.properties 12 | .externalNativeBuild 13 | .gradle 14 | **/.idea 15 | !.idea/icon.svg 16 | /.idea/navEditor.xml 17 | *.iml 18 | .kotlin/errors 19 | .kotlin/sessions 20 | **/local.properties 21 | *.realm 22 | *.realm.lock 23 | *.mx 24 | -------------------------------------------------------------------------------- /Legacy/Confetti/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | 4 | def legacyCompileSdk = rootProject.ext["legacyCompileSdk"] 5 | def legacyMinSdk = rootProject.ext["legacyMinSdk"] 6 | def javaVersion = rootProject.ext["javaVersion"] 7 | 8 | android { 9 | namespace 'com.infomaniak.core.legacy.confetti' 10 | compileSdk legacyCompileSdk 11 | 12 | defaultConfig { 13 | minSdkVersion legacyMinSdk 14 | } 15 | 16 | compileOptions { 17 | sourceCompatibility javaVersion 18 | targetCompatibility javaVersion 19 | } 20 | 21 | kotlinOptions { jvmTarget = javaVersion } 22 | 23 | dependencies { 24 | implementation project(':Core:Legacy') 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /Auth/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /Matomo/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /Network/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /Sentry/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /WebView/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /FileTypes/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /InAppReview/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /InAppUpdate/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /Ktor/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /AppIntegrity/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /FragmentNavigation/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /RecyclerView/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /Thumbnails/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /Ui/Compose/Basics/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile -------------------------------------------------------------------------------- /CrossAppLogin/Back/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle.kts. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /.github/workflows/dependent-issues.yml: -------------------------------------------------------------------------------- 1 | name: Dependent Issues 2 | 3 | on: 4 | issues: 5 | types: 6 | - opened 7 | - edited 8 | - closed 9 | - reopened 10 | pull_request_target: 11 | types: 12 | - opened 13 | - edited 14 | - closed 15 | - reopened 16 | # Makes sure we always add status check for PRs. Useful only if 17 | # this action is required to pass before merging. Otherwise, it 18 | # can be removed. 19 | - synchronize 20 | 21 | concurrency: 22 | group: ${{ github.workflow }}-${{ github.ref }} 23 | cancel-in-progress: true 24 | 25 | jobs: 26 | check: 27 | runs-on: ubuntu-latest 28 | steps: 29 | - uses: z0al/dependent-issues@v1.5.2 30 | env: 31 | # (Required) The token to use to make API calls to GitHub. 32 | GITHUB_TOKEN: ${{ github.token }} 33 | -------------------------------------------------------------------------------- /.github/workflows/semantic-commit.yml: -------------------------------------------------------------------------------- 1 | name: 'PR and Commit Message Check' 2 | on: 3 | pull_request_target: 4 | types: 5 | - opened 6 | - edited 7 | - reopened 8 | - synchronize 9 | 10 | concurrency: 11 | group: ${{ github.workflow }}-${{ github.ref }} 12 | cancel-in-progress: true 13 | 14 | jobs: 15 | check-commit-message: 16 | name: Check Commit Message 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Check Commit Message 20 | uses: gsactions/commit-message-checker@v2 21 | with: 22 | pattern: '^Merge .+|(^(feat|fix|chore|docs|style|refactor|perf|ci|test)(\(.+\))?: [A-Z0-9].+)' 23 | error: 'Commit messages and PR title should match conventional commit convention and start with an uppercase.' 24 | excludeDescription: 'true' 25 | excludeTitle: 'false' 26 | checkAllCommitMessages: 'true' 27 | accessToken: ${{ secrets.GITHUB_TOKEN }} 28 | -------------------------------------------------------------------------------- /Legacy/BugTracker/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'androidx.navigation.safeargs.kotlin' 4 | 5 | def legacyCompileSdk = rootProject.ext["legacyCompileSdk"] 6 | def legacyMinSdk = rootProject.ext["legacyMinSdk"] 7 | def javaVersion = rootProject.ext["javaVersion"] 8 | 9 | android { 10 | namespace 'com.infomaniak.core.legacy.bugtracker' 11 | compileSdk legacyCompileSdk 12 | 13 | defaultConfig { 14 | minSdk legacyMinSdk 15 | } 16 | 17 | compileOptions { 18 | sourceCompatibility javaVersion 19 | targetCompatibility javaVersion 20 | } 21 | 22 | kotlinOptions { jvmTarget = javaVersion } 23 | 24 | buildFeatures { viewBinding true } 25 | } 26 | 27 | dependencies { 28 | implementation project(":Core:AppVersionChecker") 29 | implementation project(':Core:Legacy') 30 | implementation project(":Core:Network") // To access API URL 31 | } 32 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/Extensions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth 19 | 20 | fun String.firstOrEmpty(): String = if (isNotEmpty()) first().toString() else "" 21 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | #F4F6FD 20 | 21 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | #333333 20 | 21 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/extensions/StringExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.extensions 19 | 20 | fun String.capitalizeFirstChar(): String = replaceFirstChar { char -> char.titlecase() } 21 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/CacheExpirationScope.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core 19 | 20 | @NotTestedNorUsed 21 | interface CacheExpirationScope { 22 | suspend fun dropUnusedElements(count: Int) 23 | } 24 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Your device is not recognized as safe 20 | 21 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/UserExistenceChecker.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth 19 | 20 | fun interface UserExistenceChecker { 21 | suspend fun isUserAlreadyPresent(userId: Int): Boolean 22 | } 23 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Ihr Gerät wird nicht als sicher erkannt 20 | 21 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/res/values-fr/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Votre appareil n’est pas reconnu comme sûr 20 | 21 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/res/values-es/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Su dispositivo no es reconocido como seguro 20 | 21 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/res/values-it/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Il dispositivo non è riconosciuto come sicuro 20 | 21 | -------------------------------------------------------------------------------- /Avatar/src/main/java/com/infomaniak/core/avatar/models/AvatarUrlData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.avatar.models 19 | 20 | import coil3.ImageLoader 21 | 22 | data class AvatarUrlData(val url: String, val imageLoader: ImageLoader) 23 | -------------------------------------------------------------------------------- /Network/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /FileTypes/src/main/kotlin/com/infomaniak/core/filetypes/FileTypeIcons.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.filetypes 19 | 20 | import androidx.compose.ui.unit.dp 21 | 22 | internal object FileTypeIcons { 23 | val previewSize = 250.dp 24 | } 25 | -------------------------------------------------------------------------------- /Legacy/AppLock/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | apply plugin: 'kotlin-android' 3 | apply plugin: 'androidx.navigation.safeargs.kotlin' 4 | 5 | def legacyCompileSdk = rootProject.ext["legacyCompileSdk"] 6 | def legacyMinSdk = rootProject.ext["legacyMinSdk"] 7 | def javaVersion = rootProject.ext["javaVersion"] 8 | 9 | android { 10 | namespace 'com.infomaniak.core.legacy.applock' 11 | compileSdk legacyCompileSdk 12 | 13 | defaultConfig { 14 | minSdk legacyMinSdk 15 | } 16 | 17 | compileOptions { 18 | sourceCompatibility javaVersion 19 | targetCompatibility javaVersion 20 | } 21 | 22 | kotlinOptions { jvmTarget = javaVersion } 23 | 24 | buildFeatures { viewBinding true } 25 | } 26 | 27 | dependencies { 28 | implementation project(':Core:Legacy') 29 | 30 | implementation core.biometric.ktx 31 | implementation core.splitties.appctx 32 | implementation core.splitties.mainhandler 33 | implementation core.splitties.systemservices 34 | } 35 | -------------------------------------------------------------------------------- /Legacy/src/main/res/drawable/placeholder.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/views/LoaderView.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright 2016 Elye Project 4 | * Copyright (C) 2022-2024 Infomaniak Network SA 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.infomaniak.core.legacy.views 19 | 20 | import android.graphics.Paint 21 | 22 | internal interface LoaderView { 23 | fun setRectColor(rectPaint: Paint) 24 | fun invalidate() 25 | fun valueSet(): Boolean 26 | } 27 | -------------------------------------------------------------------------------- /Avatar/src/main/java/com/infomaniak/core/avatar/models/AvatarColors.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.avatar.models 19 | 20 | import androidx.compose.ui.graphics.Color 21 | 22 | data class AvatarColors(val containerColor: Color, val contentColor: Color) 23 | -------------------------------------------------------------------------------- /Thumbnails/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | } 5 | 6 | val coreCompileSdk: Int by rootProject.extra 7 | val legacyMinSdk: Int by rootProject.extra 8 | val javaVersion: JavaVersion by rootProject.extra 9 | 10 | android { 11 | namespace = "com.infomaniak.core.thumbnails" 12 | compileSdk = coreCompileSdk 13 | 14 | defaultConfig { 15 | minSdk = legacyMinSdk 16 | 17 | consumerProguardFiles("consumer-rules.pro") 18 | } 19 | 20 | buildTypes { 21 | release { 22 | isMinifyEnabled = false 23 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") 24 | } 25 | } 26 | compileOptions { 27 | sourceCompatibility = javaVersion 28 | targetCompatibility = javaVersion 29 | } 30 | kotlinOptions { 31 | jvmTarget = javaVersion.toString() 32 | } 33 | } 34 | 35 | dependencies { 36 | implementation(core.androidx.core.ktx) 37 | } 38 | -------------------------------------------------------------------------------- /Legacy/AppLock/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Unlock 20 | Application locked 21 | 22 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/utils/ApiTokenExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.utils 19 | 20 | import com.infomaniak.lib.login.ApiToken 21 | 22 | object ApiTokenExt { 23 | val ApiToken.isInfinite get() = refreshToken == null 24 | } 25 | -------------------------------------------------------------------------------- /Legacy/AppLock/src/main/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Entsperren 20 | Anwendung gesperrt 21 | 22 | -------------------------------------------------------------------------------- /Legacy/AppLock/src/main/res/values-it/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Sblocca 20 | Applicazione bloccata 21 | 22 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/extensions/IntentExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.extensions 19 | 20 | import android.content.Intent 21 | 22 | fun Intent.clearStack() = apply { flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK } 23 | -------------------------------------------------------------------------------- /Legacy/AppLock/src/main/res/values-es/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Desbloquear 20 | Aplicación bloqueada 21 | 22 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/utils/ApiTokenExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.utils 19 | 20 | import com.infomaniak.lib.login.ApiToken 21 | 22 | object ApiTokenExt { 23 | val ApiToken.isInfinite get() = refreshToken == null 24 | } 25 | -------------------------------------------------------------------------------- /Legacy/AppLock/src/main/res/values-fr/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Déverrouiller 20 | Application verrouillée 21 | 22 | -------------------------------------------------------------------------------- /Legacy/src/main/res/layout/item_loading.xml: -------------------------------------------------------------------------------- 1 | 18 | 21 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Network/Models/src/main/java/com/infomaniak/core/network/models/exceptions/NetworkExceptions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.network.models.exceptions 19 | 20 | class NetworkException : Exception() 21 | class ServerErrorException(bodyResponse: String) : Exception(bodyResponse) 22 | -------------------------------------------------------------------------------- /Network/Models/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | kotlin("plugin.parcelize") 5 | kotlin("plugin.serialization") 6 | } 7 | 8 | val coreCompileSdk: Int by rootProject.extra 9 | val coreMinSdk: Int by rootProject.extra 10 | val javaVersion: JavaVersion by rootProject.extra 11 | 12 | android { 13 | namespace = "com.infomaniak.core.network.models" 14 | compileSdk = coreCompileSdk 15 | 16 | defaultConfig { 17 | minSdk = coreMinSdk 18 | } 19 | 20 | buildTypes { 21 | release { 22 | isMinifyEnabled = false 23 | } 24 | } 25 | compileOptions { 26 | sourceCompatibility = javaVersion 27 | targetCompatibility = javaVersion 28 | } 29 | kotlinOptions { 30 | jvmTarget = javaVersion.toString() 31 | } 32 | } 33 | 34 | dependencies { 35 | implementation(core.androidx.core.ktx) 36 | implementation(core.gson) 37 | implementation(core.kotlinx.serialization.json) 38 | implementation(core.okhttp) 39 | } 40 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/java/com/infomaniak/core/ksuite/myksuite/ui/theme/Dimens.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ksuite.myksuite.ui.theme 19 | 20 | import androidx.compose.ui.unit.dp 21 | 22 | internal object Dimens { 23 | 24 | /** 40 dp */ 25 | val textItemMinHeight = 40.dp 26 | } 27 | -------------------------------------------------------------------------------- /Notifications/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /InAppUpdate/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/models/user/Email.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.models.user 19 | 20 | import android.os.Parcelable 21 | import kotlinx.parcelize.Parcelize 22 | 23 | @Parcelize 24 | data class Email( 25 | val email: String, 26 | ) : ContactMethod(), Parcelable 27 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/models/user/Phone.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.models.user 19 | 20 | import android.os.Parcelable 21 | import kotlinx.parcelize.Parcelize 22 | 23 | @Parcelize 24 | data class Phone( 25 | val phone: String, 26 | ) : ContactMethod(), Parcelable 27 | -------------------------------------------------------------------------------- /Legacy/AppLock/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/extensions/ParcelExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.extensions 19 | 20 | import android.os.Parcel 21 | 22 | fun Parcel.customWriteBoolean(value: Boolean) { 23 | writeInt(if (value) 1 else 0) 24 | } 25 | 26 | fun Parcel.customReadBoolean(): Boolean = readInt() != 0 27 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/models/user/Email.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.models.user 19 | 20 | import android.os.Parcelable 21 | import kotlinx.parcelize.Parcelize 22 | 23 | @Parcelize 24 | data class Email( 25 | val email: String, 26 | ) : ContactMethod(), Parcelable 27 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/models/user/Phone.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.models.user 19 | 20 | import android.os.Parcelable 21 | import kotlinx.parcelize.Parcelize 22 | 23 | @Parcelize 24 | data class Phone( 25 | val phone: String, 26 | ) : ContactMethod(), Parcelable 27 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/AssociatedUserDataCleanable.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core 19 | 20 | interface AssociatedUserDataCleanable { 21 | 22 | /** 23 | * WARNING: Make sure this function never throws, and completes quickly. 24 | */ 25 | suspend fun resetForUser(userId: Long) 26 | } 27 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/Result.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core 19 | 20 | import kotlinx.coroutines.CancellationException 21 | 22 | @Suppress("RedundantSuspendModifier") 23 | suspend inline fun Result.cancellable(): Result = onFailure { 24 | if (it is CancellationException) throw it 25 | } 26 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/kotlin/com/infomaniak/core/appintegrity/models/ApiError.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.appintegrity.models 19 | 20 | import kotlinx.serialization.Serializable 21 | 22 | @Serializable 23 | internal data class ApiError( 24 | val errorCode: String = "", 25 | val message: String = "", 26 | ) 27 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/models/AuthCodeResult.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.models 19 | 20 | internal sealed interface AuthCodeResult { 21 | data class Success(val code: String) : AuthCodeResult 22 | data class Error(val message: String) : AuthCodeResult 23 | data object Canceled : AuthCodeResult 24 | } 25 | -------------------------------------------------------------------------------- /Auth/src/main/res/values-es/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Administrador 20 | Cliente 21 | Colaborador 22 | Responsable legal 23 | 24 | -------------------------------------------------------------------------------- /Auth/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Administrator 20 | Client 21 | Staff member 22 | Legally responsible 23 | 24 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/models/UserLoginResult.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.models 19 | 20 | import com.infomaniak.core.auth.models.user.User 21 | 22 | sealed interface UserLoginResult { 23 | data class Success(val user: User) : UserLoginResult 24 | data class Failure(val errorMessage: String) : UserLoginResult 25 | } 26 | -------------------------------------------------------------------------------- /Auth/src/main/res/values-fr/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Administrateur 20 | Client 21 | Collaborateur 22 | Responsable légal 23 | 24 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/utils/AccountCreationResult.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.utils 19 | 20 | sealed interface AccountCreationResult { 21 | data object Success : AccountCreationResult 22 | data class Failure(val errorMessage: String) : AccountCreationResult 23 | data object Canceled : AccountCreationResult 24 | } 25 | -------------------------------------------------------------------------------- /Auth/src/main/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Administrator 20 | Kunde 21 | Mitarbeiter 22 | Gesetzlich Verantwortlicher 23 | 24 | -------------------------------------------------------------------------------- /Auth/src/main/res/values-it/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Amministratore 20 | Cliente 21 | Collaboratore 22 | Responsabile giuridico 23 | 24 | -------------------------------------------------------------------------------- /Ktor/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | } 5 | 6 | val coreCompileSdk: Int by rootProject.extra 7 | val coreMinSdk: Int by rootProject.extra 8 | val javaVersion: JavaVersion by rootProject.extra 9 | 10 | android { 11 | namespace = "com.infomaniak.core.ktor" 12 | compileSdk = coreCompileSdk 13 | 14 | defaultConfig { 15 | minSdk = coreMinSdk 16 | 17 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 18 | consumerProguardFiles("consumer-rules.pro") 19 | } 20 | 21 | buildTypes { 22 | release { 23 | isMinifyEnabled = false 24 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") 25 | } 26 | } 27 | compileOptions { 28 | sourceCompatibility = javaVersion 29 | targetCompatibility = javaVersion 30 | } 31 | kotlinOptions { 32 | jvmTarget = javaVersion.toString() 33 | } 34 | } 35 | 36 | dependencies { 37 | api(core.ktor.client.core) 38 | implementation(core.kotlinx.coroutines.core) 39 | } 40 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/utils/NumberUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.utils 19 | 20 | import java.util.Locale 21 | 22 | fun percent(currentValue: Long, totalValue: Long): String { 23 | val percentage = (currentValue.toFloat() / totalValue.toFloat()) 24 | return String.format(Locale.getDefault(), "%d", (percentage * 100.0f).toInt()) 25 | } 26 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/views/LoaderConstant.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright 2016 Elye Project 4 | * Copyright (C) 2022-2024 Infomaniak Network SA 5 | * 6 | * Licensed under the Apache License, Version 2.0 (the "License"); 7 | * you may not use this file except in compliance with the License. 8 | * You may obtain a copy of the License at 9 | * 10 | * http://www.apache.org/licenses/LICENSE-2.0 11 | * 12 | * Unless required by applicable law or agreed to in writing, software 13 | * distributed under the License is distributed on an "AS IS" BASIS, 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | * See the License for the specific language governing permissions and 16 | * limitations under the License. 17 | */ 18 | package com.infomaniak.core.legacy.views 19 | 20 | import android.graphics.Color 21 | 22 | internal object LoaderConstant { 23 | val COLOR_DEFAULT_GRADIENT = Color.rgb(245, 245, 245) 24 | const val MIN_WEIGHT = 0.0f 25 | const val MAX_WEIGHT = 1.0f 26 | const val CORNER_DEFAULT = 0 27 | const val USE_GRADIENT_DEFAULT = false 28 | } 29 | -------------------------------------------------------------------------------- /AppVersionChecker/src/main/kotlin/com/infomaniak/core/appversionchecker/utils/AndroidSdkVersionProvider.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.appversionchecker.utils 19 | 20 | import android.os.Build 21 | 22 | // Todo: Make internal when unit test move to app version checker module 23 | object AndroidSdkVersionProvider { 24 | val sdkInt: Int = Build.VERSION.SDK_INT 25 | } 26 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/models/user/preferences/PreferenceTemplate.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.models.user.preferences 19 | 20 | import androidx.room.ColumnInfo 21 | 22 | abstract class PreferenceTemplate( 23 | @ColumnInfo(defaultValue = "0") 24 | var id: Int = 0, 25 | @ColumnInfo(defaultValue = "") 26 | var name: String = "", 27 | ) 28 | -------------------------------------------------------------------------------- /InAppReview/src/fdroid/kotlin/com/infomaniak/core/inappreview/reviewmanagers/InAppReviewManager.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.inappreview.reviewmanagers 19 | 20 | import androidx.activity.ComponentActivity 21 | import com.infomaniak.core.inappreview.BaseInAppReviewManager 22 | 23 | class InAppReviewManager(private val activity: ComponentActivity) : BaseInAppReviewManager(activity) 24 | -------------------------------------------------------------------------------- /DotLottie/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | alias(core.plugins.compose.compiler) 5 | kotlin("plugin.serialization") 6 | } 7 | 8 | val coreCompileSdk: Int by rootProject.extra 9 | val coreMinSdk: Int by rootProject.extra 10 | val javaVersion: JavaVersion by rootProject.extra 11 | 12 | android { 13 | namespace = "com.infomaniak.core.dotlottie" 14 | compileSdk = coreCompileSdk 15 | 16 | defaultConfig { 17 | minSdk = coreMinSdk 18 | } 19 | 20 | compileOptions { 21 | sourceCompatibility = javaVersion 22 | targetCompatibility = javaVersion 23 | } 24 | 25 | buildFeatures { 26 | compose = true 27 | } 28 | 29 | kotlinOptions { 30 | jvmTarget = javaVersion.toString() 31 | } 32 | } 33 | 34 | dependencies { 35 | implementation(project(":Core:Ui:Compose:MaterialThemeFromXml")) 36 | 37 | implementation(platform(core.compose.bom)) 38 | implementation(core.compose.ui) 39 | 40 | implementation(core.material) 41 | implementation(core.dotlottie) 42 | implementation(core.kotlinx.serialization.json) 43 | } 44 | -------------------------------------------------------------------------------- /InAppUpdate/src/fdroid/kotlin/com/infomaniak/core/inappupdate/AppUpdateScheduler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.inappupdate 19 | 20 | import android.content.Context 21 | import androidx.work.WorkManager 22 | 23 | class AppUpdateScheduler( 24 | appContext: Context, 25 | workManager: WorkManager = WorkManager.getInstance(appContext), 26 | ) : UpdateScheduler(appContext, workManager) 27 | -------------------------------------------------------------------------------- /InAppUpdate/src/fdroid/kotlin/com/infomaniak/core/inappupdate/updatemanagers/WorkerUpdateManager.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.inappupdate.updatemanagers 19 | 20 | import android.content.Context 21 | 22 | internal class WorkerUpdateManager(appContext: Context) { 23 | 24 | fun installDownloadedUpdate(onInstallFailure: (Exception) -> Unit, onInstallSuccess: () -> Unit) = Unit 25 | } 26 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/models/user/preferences/PreferenceTemplate.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.models.user.preferences 19 | 20 | import androidx.room.ColumnInfo 21 | 22 | abstract class PreferenceTemplate( 23 | @ColumnInfo(defaultValue = "0") 24 | var id: Int = 0, 25 | @ColumnInfo(defaultValue = "") 26 | var name: String = "", 27 | ) 28 | -------------------------------------------------------------------------------- /Notifications/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | } 5 | 6 | val coreCompileSdk: Int by rootProject.extra 7 | val coreMinSdk: Int by rootProject.extra 8 | val javaVersion: JavaVersion by rootProject.extra 9 | 10 | android { 11 | namespace = "com.infomaniak.core.notifications" 12 | compileSdk = coreCompileSdk 13 | 14 | defaultConfig { 15 | minSdk = coreMinSdk 16 | 17 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 18 | consumerProguardFiles("consumer-rules.pro") 19 | } 20 | 21 | buildTypes { 22 | release { 23 | isMinifyEnabled = false 24 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") 25 | } 26 | } 27 | 28 | compileOptions { 29 | sourceCompatibility = javaVersion 30 | targetCompatibility = javaVersion 31 | } 32 | 33 | kotlinOptions { 34 | jvmTarget = javaVersion.toString() 35 | } 36 | } 37 | 38 | dependencies { 39 | implementation(project(":Core")) 40 | implementation(core.androidx.core.ktx) 41 | } 42 | -------------------------------------------------------------------------------- /Ui/View/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 48dp 20 | 24dp 21 | 16dp 22 | 8dp 23 | 4dp 24 | 25 | -------------------------------------------------------------------------------- /FragmentNavigation/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | } 5 | 6 | val coreCompileSdk: Int by rootProject.extra 7 | val coreMinSdk: Int by rootProject.extra 8 | val javaVersion: JavaVersion by rootProject.extra 9 | 10 | android { 11 | namespace = "com.infomaniak.core.fragmentnavigation" 12 | compileSdk = coreCompileSdk 13 | 14 | defaultConfig { 15 | minSdk = coreMinSdk 16 | 17 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 18 | consumerProguardFiles("consumer-rules.pro") 19 | } 20 | 21 | buildTypes { 22 | release { 23 | isMinifyEnabled = false 24 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") 25 | } 26 | } 27 | compileOptions { 28 | sourceCompatibility = javaVersion 29 | targetCompatibility = javaVersion 30 | } 31 | kotlinOptions { 32 | jvmTarget = javaVersion.toString() 33 | } 34 | } 35 | 36 | dependencies { 37 | implementation(core.androidx.core.ktx) 38 | implementation(core.navigation.fragment.ktx) 39 | } 40 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/kotlin/com/infomaniak/core/appintegrity/exceptions/NetworkException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.appintegrity.exceptions 19 | 20 | /** 21 | * Thrown when a network-related error occurs, such as connectivity issues or timeouts. 22 | * 23 | * @param message A detailed message describing the network error. 24 | */ 25 | class NetworkException(message: String) : Exception(message) 26 | -------------------------------------------------------------------------------- /KSuite/KSuitePro/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | @color/bat 21 | @color/swan 22 | @color/shark 23 | @color/orca 24 | 25 | 26 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/models/user/preferences/TimeZone.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.models.user.preferences 19 | 20 | import android.os.Parcelable 21 | import androidx.room.ColumnInfo 22 | import kotlinx.parcelize.Parcelize 23 | 24 | @Parcelize 25 | data class TimeZone( 26 | @ColumnInfo(defaultValue = "") 27 | var gmt: String, 28 | ) : PreferenceTemplate(), Parcelable 29 | -------------------------------------------------------------------------------- /CrossAppLogin/Back/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/models/user/preferences/TimeZone.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.models.user.preferences 19 | 20 | import android.os.Parcelable 21 | import androidx.room.ColumnInfo 22 | import kotlinx.parcelize.Parcelize 23 | 24 | @Parcelize 25 | data class TimeZone( 26 | @ColumnInfo(defaultValue = "") 27 | var gmt: String, 28 | ) : PreferenceTemplate(), Parcelable 29 | -------------------------------------------------------------------------------- /DotLottie/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/models/user/ContactMethod.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.models.user 19 | 20 | import com.google.gson.annotations.SerializedName 21 | 22 | abstract class ContactMethod( 23 | val id: Int = 0, 24 | @SerializedName("created_at") 25 | val createdAt: Long = 0, 26 | val reminder: Boolean = false, 27 | val checked: Boolean = false, 28 | val type: String = "", 29 | ) 30 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/models/user/ContactMethod.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.models.user 19 | 20 | import com.google.gson.annotations.SerializedName 21 | 22 | abstract class ContactMethod( 23 | val id: Int = 0, 24 | @SerializedName("created_at") 25 | val createdAt: Long = 0, 26 | val reminder: Boolean = false, 27 | val checked: Boolean = false, 28 | val type: String = "", 29 | ) 30 | -------------------------------------------------------------------------------- /Ui/src/main/kotlin/com/infomaniak/core/ui/ContextExtensions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ui 19 | 20 | import android.content.Context 21 | import android.widget.Toast 22 | 23 | fun Context.showToast(title: String, duration: Int = Toast.LENGTH_LONG) { 24 | Toast.makeText(this, title, duration).show() 25 | } 26 | 27 | fun Context.showToast(title: Int, duration: Int = Toast.LENGTH_LONG) { 28 | Toast.makeText(this, title, duration).show() 29 | } 30 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/kotlin/com/infomaniak/core/appintegrity/models/ApiResponse.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.appintegrity.models 19 | 20 | import kotlinx.serialization.Serializable 21 | 22 | @Serializable 23 | internal data class ApiResponse( 24 | val result: ApiResponseStatus = ApiResponseStatus.UNKNOWN, 25 | val data: T? = null, 26 | val error: ApiError? = null, 27 | ) { 28 | fun isSuccess() = result == ApiResponseStatus.SUCCESS 29 | } 30 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/networking/ManualAuthorizationRequired.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.networking 19 | 20 | /** 21 | * Opt-in annotation indicating that authorization for the annotated element 22 | * must be handled manually and will not be automatically provided. 23 | */ 24 | @RequiresOptIn(level = RequiresOptIn.Level.ERROR) 25 | @Retention(AnnotationRetention.BINARY) 26 | annotation class ManualAuthorizationRequired() 27 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/NotTestedNorUsed.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core 19 | 20 | /** 21 | * # WARNING 22 | * 23 | * APIs annotated with this are not tested, nor used yet. 24 | * 25 | * If you want to start using them, it is **your responsibility to add tests**, 26 | * and remove this annotation. 27 | */ 28 | @RequiresOptIn(level = RequiresOptIn.Level.ERROR) 29 | @Retention(AnnotationRetention.BINARY) 30 | annotation class NotTestedNorUsed() 31 | -------------------------------------------------------------------------------- /Network/src/main/kotlin/com/infomaniak/core/network/networking/ManualAuthorizationRequired.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.network.networking 19 | 20 | /** 21 | * Opt-in annotation indicating that authorization for the annotated element 22 | * must be handled manually and will not be automatically provided. 23 | */ 24 | @RequiresOptIn(level = RequiresOptIn.Level.ERROR) 25 | @Retention(AnnotationRetention.BINARY) 26 | annotation class ManualAuthorizationRequired() 27 | -------------------------------------------------------------------------------- /Avatar/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | alias(core.plugins.compose.compiler) 5 | } 6 | 7 | val coreCompileSdk: Int by rootProject.extra 8 | val coreMinSdk: Int by rootProject.extra 9 | val javaVersion: JavaVersion by rootProject.extra 10 | 11 | android { 12 | namespace = "com.infomaniak.core.avatar" 13 | compileSdk = coreCompileSdk 14 | 15 | defaultConfig { 16 | minSdk = coreMinSdk 17 | } 18 | 19 | buildTypes { 20 | release { 21 | isMinifyEnabled = false 22 | } 23 | } 24 | compileOptions { 25 | sourceCompatibility = javaVersion 26 | targetCompatibility = javaVersion 27 | } 28 | kotlinOptions { 29 | jvmTarget = javaVersion.toString() 30 | } 31 | } 32 | 33 | dependencies { 34 | implementation(project(":Core:Ui:Compose:Margin")) 35 | 36 | implementation(platform(core.compose.bom)) 37 | implementation(core.compose.runtime) 38 | implementation(core.compose.material3) 39 | implementation(core.compose.ui) 40 | debugImplementation(core.compose.ui.tooling) 41 | implementation(core.compose.ui.tooling.preview) 42 | 43 | implementation(core.coil.compose) 44 | } 45 | -------------------------------------------------------------------------------- /InAppUpdate/src/main/kotlin/com/infomaniak/core/inappupdate/UpdateScheduler.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.inappupdate 19 | 20 | import android.content.Context 21 | import androidx.work.WorkManager 22 | 23 | open class UpdateScheduler( 24 | appContext: Context, 25 | private val workManager: WorkManager = WorkManager.getInstance(appContext), 26 | ) { 27 | open fun scheduleWorkIfNeeded() = Unit 28 | 29 | open suspend fun cancelWorkIfNeeded() = Unit 30 | } 31 | -------------------------------------------------------------------------------- /Network/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | An error has occurred 20 | Internet connection problem 21 | Error, user already present 22 | No connection 23 | Server Error 24 | 25 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/kotlin/com/infomaniak/core/appintegrity/AppIntegrityRoutes.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.appintegrity 19 | 20 | object AppIntegrityRoutes { 21 | 22 | private val BASE_URL_V1 = "${BuildConfig.APP_INTEGRITY_BASE_URL}/1/attest" 23 | 24 | internal val requestChallenge = "$BASE_URL_V1/challenge" 25 | internal val requestApiIntegrityCheck = "$BASE_URL_V1/integrity" 26 | const val demo = "https://api-core.devd471.dev.infomaniak.ch/1/attest/demo" 27 | } 28 | -------------------------------------------------------------------------------- /Avatar/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | #7974B4 21 | #3990BB 22 | #00A1B9 23 | #30ABFF 24 | #029688 25 | #3CB572 26 | #FFC300 27 | #ED2C6E 28 | #D9283A 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/utils/UserAgentUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.utils 19 | 20 | import android.os.Build 21 | 22 | fun buildUserAgent( 23 | appId: String, 24 | appVersionCode: Int, 25 | appVersionName: String, 26 | ): String { 27 | val androidVersion = "Android ${Build.VERSION.RELEASE}" 28 | val arch = System.getProperty("os.arch") 29 | return "$appId/$appVersionName-$appVersionCode (${Build.MODEL}; $androidVersion; $arch)" 30 | } 31 | 32 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/kotlin/com/infomaniak/core/appintegrity/exceptions/IntegrityException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.appintegrity.exceptions 19 | 20 | /** An error has occurred when verified by api play integrity or our remote api */ 21 | sealed class IntegrityException(override val cause: Throwable? = null) : Exception() 22 | 23 | class AppIntegrityException(cause: Throwable?) : IntegrityException(cause) 24 | 25 | class FDroidUnsupportedIntegrityException() : IntegrityException() 26 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/res/drawable/illu_dashboard_background.xml: -------------------------------------------------------------------------------- 1 | 18 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /Legacy/src/main/res/layout/activity_webview.xml: -------------------------------------------------------------------------------- 1 | 18 | 22 | 23 | 27 | 28 | -------------------------------------------------------------------------------- /Network/src/main/res/values-es/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Se ha producido un error 20 | Problema de conexión a Internet 21 | Error, usuario ya registrado 22 | Sin conexión 23 | Error del servidor 24 | 25 | -------------------------------------------------------------------------------- /Network/src/main/res/values-fr/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Une erreur est survenue 20 | Problème de connexion internet 21 | Erreur utilisateur déjà présent 22 | Pas de connexion 23 | Erreur serveur 24 | 25 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/Uri.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core 19 | 20 | import android.net.Uri 21 | import splitties.init.appCtx 22 | import splitties.mainthread.checkNotMainThread 23 | import java.io.FileNotFoundException 24 | 25 | fun Uri.doesFileExist(): Boolean { 26 | checkNotMainThread() 27 | return try { 28 | appCtx.contentResolver.openInputStream(this).use {} 29 | true 30 | } catch (e: FileNotFoundException) { 31 | false 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/res/drawable-night/illu_dashboard_background.xml: -------------------------------------------------------------------------------- 1 | 18 | 23 | 26 | 27 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/api/ApiRoutesCore.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.api 19 | 20 | import com.infomaniak.core.network.INFOMANIAK_API 21 | import com.infomaniak.core.network.INFOMANIAK_API_V1 22 | 23 | object ApiRoutesCore { 24 | 25 | fun getUserProfile(): String { 26 | return "$INFOMANIAK_API/profile?no_avatar_default=1" 27 | } 28 | 29 | fun sendDeviceInfo(): String { 30 | return "$INFOMANIAK_API_V1/devices" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /InAppUpdate/src/fdroid/kotlin/com/infomaniak/core/inappupdate/FdroidRelease.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.inappupdate 19 | 20 | import kotlinx.serialization.Serializable 21 | 22 | @Serializable 23 | data class FdroidRelease( 24 | val packageName: String, 25 | val suggestedVersionCode: Int, 26 | val packages: List, 27 | ) { 28 | @Serializable 29 | data class FdroidPackages( 30 | val versionName: String, 31 | val versionCode: Int, 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/java/com/infomaniak/core/ksuite/myksuite/ui/data/kSuiteDrive.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ksuite.myksuite.ui.data 19 | 20 | import androidx.room.ColumnInfo 21 | import kotlinx.serialization.SerialName 22 | import kotlinx.serialization.Serializable 23 | 24 | @Serializable 25 | data class KSuiteDrive( 26 | val id: Int, 27 | val name: String, 28 | val size: Long, 29 | @SerialName("used_size") 30 | @ColumnInfo("used_size") 31 | val usedSize: Long, 32 | ) 33 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/java/com/infomaniak/core/ksuite/myksuite/ui/network/ApiRoutes.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ksuite.myksuite.ui.network 19 | 20 | import com.infomaniak.core.network.ApiEnvironment 21 | 22 | object ApiRoutes { 23 | 24 | private val host = ApiEnvironment.current.host 25 | val MANAGER_URL = "https://manager.$host/v3/ng/home" 26 | 27 | private val BASE_URL = "https://api.$host" 28 | 29 | fun myKSuiteData() = "$BASE_URL/1/my_ksuite/current?with=drive,mail" 30 | } 31 | -------------------------------------------------------------------------------- /Legacy/src/main/res/values/attrs.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /Network/src/main/res/values-de/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Ein Fehler ist aufgetreten 20 | Problem mit der Internetverbindung 21 | Fehler Benutzer bereits vorhanden 22 | Keine Verbindung 23 | Server-Fehler 24 | 25 | -------------------------------------------------------------------------------- /Network/src/main/res/values-it/strings.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | Si è verificato un errore 20 | Problema di connessione a Internet 21 | Errore utente già esistente 22 | Nessuna connessione 23 | Errore del server 24 | 25 | -------------------------------------------------------------------------------- /Sentry/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | } 5 | 6 | val coreCompileSdk: Int by rootProject.extra 7 | val coreMinSdk: Int by rootProject.extra 8 | val javaVersion: JavaVersion by rootProject.extra 9 | 10 | android { 11 | namespace = "com.infomaniak.core.sentry" 12 | compileSdk = coreCompileSdk 13 | 14 | defaultConfig { 15 | minSdk = coreMinSdk 16 | 17 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 18 | consumerProguardFiles("consumer-rules.pro") 19 | } 20 | 21 | buildTypes { 22 | release { 23 | isMinifyEnabled = false 24 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") 25 | } 26 | } 27 | compileOptions { 28 | sourceCompatibility = javaVersion 29 | targetCompatibility = javaVersion 30 | } 31 | kotlinOptions { 32 | jvmTarget = javaVersion.toString() 33 | } 34 | } 35 | 36 | dependencies { 37 | implementation(project(":Core:Network:Models")) 38 | 39 | api(core.sentry.android) 40 | api(core.sentry.okhttp) 41 | implementation(core.sentry.android.fragment) 42 | 43 | testImplementation(kotlin("test")) 44 | } 45 | -------------------------------------------------------------------------------- /Matomo/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | } 5 | 6 | val coreCompileSdk: Int by rootProject.extra 7 | val coreMinSdk: Int by rootProject.extra 8 | val javaVersion: JavaVersion by rootProject.extra 9 | 10 | android { 11 | namespace = "com.infomaniak.core.matomo" 12 | compileSdk = coreCompileSdk 13 | 14 | defaultConfig { 15 | minSdk = coreMinSdk 16 | 17 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 18 | consumerProguardFiles("consumer-rules.pro") 19 | } 20 | 21 | buildTypes { 22 | release { 23 | isMinifyEnabled = false 24 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") 25 | } 26 | } 27 | 28 | compileOptions { 29 | sourceCompatibility = javaVersion 30 | targetCompatibility = javaVersion 31 | } 32 | 33 | buildFeatures { 34 | buildConfig = true 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = javaVersion.toString() 39 | } 40 | } 41 | 42 | dependencies { 43 | implementation(project(":Core:Network")) // To access API URL 44 | 45 | api(core.matomo) 46 | implementation(core.splitties.appctx) 47 | } 48 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/fdroidTools/FdroidRelease.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2023-2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.fdroidTools 19 | 20 | import kotlinx.serialization.Serializable 21 | 22 | @Serializable 23 | data class FdroidRelease( 24 | val packageName: String, 25 | val suggestedVersionCode: Int, 26 | val packages: List, 27 | ) { 28 | @Serializable 29 | data class FdroidPackages( 30 | val versionName: String, 31 | val versionCode: Int, 32 | ) 33 | } 34 | -------------------------------------------------------------------------------- /InAppReview/src/main/res/layout/alert_dialog_review.xml: -------------------------------------------------------------------------------- 1 | 18 | 26 | -------------------------------------------------------------------------------- /RecyclerView/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | } 5 | 6 | val coreCompileSdk: Int by rootProject.extra 7 | val coreMinSdk: Int by rootProject.extra 8 | val javaVersion: JavaVersion by rootProject.extra 9 | 10 | android { 11 | namespace = "com.infomaniak.core.recyclerview" 12 | compileSdk = coreCompileSdk 13 | 14 | defaultConfig { 15 | minSdk = coreMinSdk 16 | 17 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 18 | consumerProguardFiles("consumer-rules.pro") 19 | } 20 | 21 | buildTypes { 22 | release { 23 | isMinifyEnabled = false 24 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") 25 | } 26 | } 27 | 28 | compileOptions { 29 | sourceCompatibility = javaVersion 30 | targetCompatibility = javaVersion 31 | } 32 | 33 | kotlinOptions { 34 | jvmTarget = javaVersion.toString() 35 | } 36 | } 37 | 38 | dependencies { 39 | api(core.kotlinx.coroutines.core) 40 | api(core.androidx.recyclerview) 41 | api(core.androidx.lifecycle.runtime.ktx) 42 | 43 | testImplementation(core.junit) 44 | androidTestImplementation(core.androidx.junit) 45 | } 46 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/kotlin/com/infomaniak/core/appintegrity/models/ApiResponseStatus.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.appintegrity.models 19 | 20 | import kotlinx.serialization.SerialName 21 | import kotlinx.serialization.Serializable 22 | 23 | @Serializable 24 | internal enum class ApiResponseStatus { 25 | 26 | @SerialName("error") 27 | ERROR, 28 | 29 | @SerialName("success") 30 | SUCCESS, 31 | 32 | @SerialName("asynchronous") 33 | ASYNCHRONOUS, 34 | 35 | @SerialName("unknown") 36 | UNKNOWN; 37 | } 38 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/java/com/infomaniak/core/ksuite/myksuite/ui/views/MyKSuiteChipView.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ksuite.myksuite.ui.views 19 | 20 | import android.content.Context 21 | import android.util.AttributeSet 22 | import com.infomaniak.core.ksuite.myksuite.ui.components.MyKSuiteTier 23 | 24 | class MyKSuiteChipView @JvmOverloads constructor( 25 | context: Context, 26 | attrs: AttributeSet? = null, 27 | defStyleAttr: Int = 0, 28 | ) : BaseMyKSuiteChipView(context, attrs, defStyleAttr, MyKSuiteTier.Free) 29 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/java/com/infomaniak/core/ksuite/myksuite/ui/views/MyKSuitePlusChipView.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ksuite.myksuite.ui.views 19 | 20 | import android.content.Context 21 | import android.util.AttributeSet 22 | import com.infomaniak.core.ksuite.myksuite.ui.components.MyKSuiteTier 23 | 24 | class MyKSuitePlusChipView @JvmOverloads constructor( 25 | context: Context, 26 | attrs: AttributeSet? = null, 27 | defStyleAttr: Int = 0, 28 | ) : BaseMyKSuiteChipView(context, attrs, defStyleAttr, tier = MyKSuiteTier.Plus) 29 | -------------------------------------------------------------------------------- /Legacy/Confetti/src/main/java/com/infomaniak/core/legacy/confetti/ConfettoGenerator.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2023-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.confetti 19 | 20 | import com.infomaniak.core.legacy.confetti.confetto.Confetto 21 | import java.util.Random 22 | 23 | fun interface ConfettoGenerator { 24 | /** 25 | * Generate a random confetto to animate. 26 | * 27 | * @param random a [Random] that can be used to generate random confetto. 28 | * @return the randomly generated confetto. 29 | */ 30 | fun generateConfetto(random: Random): Confetto 31 | } 32 | -------------------------------------------------------------------------------- /WebView/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | alias(core.plugins.compose.compiler) 5 | kotlin("plugin.serialization") 6 | } 7 | 8 | val coreCompileSdk: Int by rootProject.extra 9 | val legacyMinSdk: Int by rootProject.extra 10 | val javaVersion: JavaVersion by rootProject.extra 11 | 12 | android { 13 | namespace = "com.infomaniak.core.webview" 14 | compileSdk = coreCompileSdk 15 | 16 | defaultConfig { 17 | minSdk = legacyMinSdk 18 | 19 | consumerProguardFiles("consumer-rules.pro") 20 | } 21 | 22 | buildTypes { 23 | release { 24 | isMinifyEnabled = false 25 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") 26 | } 27 | } 28 | 29 | compileOptions { 30 | sourceCompatibility = javaVersion 31 | targetCompatibility = javaVersion 32 | } 33 | 34 | kotlinOptions { 35 | jvmTarget = javaVersion.toString() 36 | } 37 | 38 | buildFeatures { 39 | compose = true 40 | } 41 | } 42 | 43 | dependencies { 44 | implementation(platform(core.compose.bom)) 45 | implementation(core.activity.compose) 46 | implementation(core.compose.foundation) 47 | implementation(core.kotlinx.serialization.json) 48 | } 49 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/extensions/AtomicFileExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.extensions 19 | 20 | import androidx.core.util.AtomicFile 21 | import java.io.OutputStream 22 | 23 | inline fun AtomicFile.write(block: (OutputStream) -> R): R { 24 | startWrite().use { outputStream -> 25 | try { 26 | val result = block(outputStream) 27 | finishWrite(outputStream) 28 | return result 29 | } catch (t: Throwable) { 30 | failWrite(outputStream) 31 | throw t 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Ui/View/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | 21 | #000000 22 | #1A1A1A 23 | #333333 24 | #666666 25 | #9F9F9F 26 | #E0E0E0 27 | #F1F1F1 28 | #F5F5F5 29 | #FAFAFA 30 | #FFFFFF 31 | 32 | -------------------------------------------------------------------------------- /CrossAppLogin/Back/src/main/kotlin/com/infomaniak/core/crossapplogin/back/internal/CustomTokenInterceptor.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.crossapplogin.back.internal 19 | 20 | import okhttp3.Interceptor 21 | import okhttp3.Response 22 | 23 | internal class CustomTokenInterceptor(private val token: String) : Interceptor { 24 | 25 | override fun intercept(chain: Interceptor.Chain): Response { 26 | val builder = chain.request().newBuilder() 27 | builder.header("Authorization", "Bearer $token") 28 | 29 | return chain.proceed(builder.build()) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/WakeLock.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core 19 | 20 | import android.os.PowerManager 21 | import splitties.systemservices.powerManager 22 | 23 | @Suppress("WakelockTimeout") 24 | inline fun withPartialWakeLock( 25 | appName: String, 26 | tagSuffix: String = "default", 27 | block: () -> R 28 | ): R { 29 | val wakeLock = powerManager.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "$appName:$tagSuffix") 30 | return try { 31 | wakeLock.acquire() 32 | block() 33 | } finally { 34 | wakeLock.release() 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/extensions/PackageManagerExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.extensions 19 | 20 | import splitties.init.appCtx 21 | import kotlin.LazyThreadSafetyMode.NONE 22 | 23 | val appName: String by lazy(NONE) { 24 | packageManager.getApplicationLabel(applicationInfo).toString() 25 | } 26 | 27 | internal val appVersionName: String by lazy(NONE) { 28 | packageManager.getPackageInfo(appCtx.packageName, 0).versionName.toString() 29 | } 30 | 31 | private val packageManager = appCtx.packageManager 32 | private val applicationInfo by lazy(NONE) { appCtx.applicationInfo } 33 | -------------------------------------------------------------------------------- /CrossAppLogin/Front/src/main/kotlin/com/infomaniak/core/crossapplogin/front/utils/Extensions.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.crossapplogin.front.utils 19 | 20 | import android.content.res.TypedArray 21 | import androidx.annotation.StyleableRes 22 | import androidx.compose.ui.graphics.Color 23 | 24 | internal fun TypedArray.getColorOrNull(@StyleableRes index: Int): Color? { 25 | return if (hasValue(index)) Color(getColor(index, -1)) else null 26 | } 27 | 28 | internal fun TypedArray.getStringOrNull(@StyleableRes index: Int): String? { 29 | return if (hasValue(index)) getString(index) else null 30 | } 31 | -------------------------------------------------------------------------------- /RecyclerView/src/main/kotlin/com/infomaniak/core/recyclerview/ResettableLazy.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.recyclerview 19 | 20 | import kotlin.reflect.KProperty 21 | 22 | internal class ResettableLazy(private val initializer: () -> T) { 23 | 24 | var value: T? = null 25 | private set 26 | 27 | operator fun getValue( 28 | @Suppress("unused") thisRef: Any?, 29 | @Suppress("unused") prop: KProperty<*> 30 | ): T { 31 | return value ?: initializer().apply { value = this } 32 | } 33 | 34 | fun reset() { 35 | value = null 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Avatar/src/main/java/com/infomaniak/core/avatar/BackgroundColorUtils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.avatar 19 | 20 | import android.content.Context 21 | import androidx.annotation.ArrayRes 22 | import androidx.annotation.ColorInt 23 | 24 | @ColorInt 25 | fun Context.getBackgroundColorResBasedOnId(id: Int, @ArrayRes array: Int? = null): Int { 26 | val arrayResource = array ?: R.array.organizationColors 27 | val colors = resources.getIntArray(arrayResource) 28 | val colorIndex = Math.floorMod(id, colors.count()) 29 | val organizationColor = colors[colorIndex] 30 | 31 | return organizationColor 32 | } 33 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/models/user/preferences/Country.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.models.user.preferences 19 | 20 | import android.os.Parcelable 21 | import androidx.room.ColumnInfo 22 | import com.google.gson.annotations.SerializedName 23 | import kotlinx.parcelize.Parcelize 24 | 25 | @Parcelize 26 | data class Country( 27 | @SerializedName("short_name") 28 | @ColumnInfo(defaultValue = "") 29 | var shortName: String, 30 | @SerializedName("is_enabled") 31 | @ColumnInfo(defaultValue = "false") 32 | var isEnabled: Boolean, 33 | ) : PreferenceTemplate(), Parcelable 34 | -------------------------------------------------------------------------------- /Network/src/main/kotlin/com/infomaniak/core/network/utils/Utils.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.network.utils 19 | 20 | import androidx.core.os.LocaleListCompat 21 | import java.util.Locale 22 | 23 | object Utils { 24 | fun getPreferredLocaleList(): List { 25 | val adjustedLocaleListCompat = LocaleListCompat.getAdjustedDefault() 26 | val preferredLocaleList = mutableListOf() 27 | for (index in 0 until adjustedLocaleListCompat.size()) { 28 | preferredLocaleList.add(adjustedLocaleListCompat[index]!!) 29 | } 30 | return preferredLocaleList 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/models/user/preferences/Country.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.models.user.preferences 19 | 20 | import android.os.Parcelable 21 | import androidx.room.ColumnInfo 22 | import com.google.gson.annotations.SerializedName 23 | import kotlinx.parcelize.Parcelize 24 | 25 | @Parcelize 26 | data class Country( 27 | @SerializedName("short_name") 28 | @ColumnInfo(defaultValue = "") 29 | var shortName: String, 30 | @SerializedName("is_enabled") 31 | @ColumnInfo(defaultValue = "false") 32 | var isEnabled: Boolean, 33 | ) : PreferenceTemplate(), Parcelable 34 | -------------------------------------------------------------------------------- /TwoFactorAuth/Back/src/main/kotlin/ConnectionAttemptInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | @file:OptIn(ExperimentalUuidApi::class) 19 | 20 | package com.infomaniak.core.twofactorauth.back 21 | 22 | import kotlin.uuid.ExperimentalUuidApi 23 | 24 | data class ConnectionAttemptInfo( 25 | val targetAccount: TargetAccount, 26 | val deviceOrBrowserName: String, 27 | val deviceType: RemoteChallenge.Device.Type?, 28 | val location: String, 29 | ) { 30 | data class TargetAccount( 31 | val avatarUrl: String?, 32 | val fullName: String, 33 | val initials: String, 34 | val email: String, 35 | val id: Long, 36 | ) 37 | } 38 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/models/user/preferences/OrganizationPreference.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.models.user.preferences 19 | 20 | import android.os.Parcelable 21 | import androidx.room.ColumnInfo 22 | import com.google.gson.annotations.SerializedName 23 | import kotlinx.parcelize.Parcelize 24 | 25 | @Parcelize 26 | data class OrganizationPreference( 27 | @SerializedName("current_account_id") 28 | @ColumnInfo(defaultValue = "0") 29 | var currentOrganizationId: Int, 30 | @SerializedName("last_login_at") 31 | @ColumnInfo(defaultValue = "0") 32 | var lastLoginAt: Long, 33 | ) : Parcelable 34 | -------------------------------------------------------------------------------- /Ui/View/EdgeToEdge/src/main/kotlin/com/infomaniak/core/ui/view/edgetoedge/EdgeToEdgeActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | package com.infomaniak.core.ui.view.edgetoedge 20 | 21 | import android.os.Build.VERSION.SDK_INT 22 | import android.os.Bundle 23 | import androidx.activity.enableEdgeToEdge 24 | import androidx.appcompat.app.AppCompatActivity 25 | 26 | 27 | abstract class EdgeToEdgeActivity() : AppCompatActivity() { 28 | 29 | override fun onCreate(savedInstanceState: Bundle?) { 30 | super.onCreate(savedInstanceState) 31 | 32 | enableEdgeToEdge() 33 | if (SDK_INT >= 29) window.isNavigationBarContrastEnforced = false 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/models/user/preferences/OrganizationPreference.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.models.user.preferences 19 | 20 | import android.os.Parcelable 21 | import androidx.room.ColumnInfo 22 | import com.google.gson.annotations.SerializedName 23 | import kotlinx.parcelize.Parcelize 24 | 25 | @Parcelize 26 | data class OrganizationPreference( 27 | @SerializedName("current_account_id") 28 | @ColumnInfo(defaultValue = "0") 29 | var currentOrganizationId: Int, 30 | @SerializedName("last_login_at") 31 | @ColumnInfo(defaultValue = "0") 32 | var lastLoginAt: Long, 33 | ) : Parcelable 34 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/api/ApiRoutesCore.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.api 19 | 20 | import com.infomaniak.core.network.INFOMANIAK_API 21 | import com.infomaniak.core.network.INFOMANIAK_API_V1 22 | import com.infomaniak.core.network.LOGIN_ENDPOINT_URL 23 | 24 | object ApiRoutesCore { 25 | 26 | val TOKEN_URL = "$LOGIN_ENDPOINT_URL/token" 27 | 28 | fun getUserProfile(): String { 29 | // TODO: Create a module for all the URLs? 30 | return "$INFOMANIAK_API/profile?no_avatar_default=1" 31 | } 32 | 33 | fun sendDeviceInfo(): String { 34 | return "$INFOMANIAK_API_V1/devices" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /DotLottie/src/main/kotlin/com/infomaniak/core/dotlottie/ThemeData.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.dotlottie 19 | 20 | import androidx.compose.ui.graphics.Color 21 | import kotlinx.serialization.Serializable 22 | 23 | @Serializable 24 | internal data class ThemeData(val rules: List) { 25 | @Serializable 26 | class Rule(val id: String, val value: List) { 27 | val type: String = "Color" 28 | 29 | constructor(entry: Map.Entry) : this(entry.key, entry.value.toFloatList()) 30 | } 31 | 32 | companion object { 33 | private fun Color.toFloatList(): List = listOf(red, green, blue) 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /KSuite/src/main/java/com/infomaniak/core/ksuite/ui/utils/MatomoKSuite.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ksuite.ui.utils 19 | 20 | object MatomoKSuite { 21 | 22 | //region Categories 23 | const val CATEGORY_MY_KSUITE = "myKSuite" 24 | const val CATEGORY_MY_KSUITE_UPGRADE_BOTTOM_SHEET = "myKSuiteUpgradeBottomSheet" 25 | const val CATEGORY_KSUITE_PRO = "kSuitePro" 26 | const val CATEGORY_KSUITE_PRO_BOTTOM_SHEET = "kSuiteProUpgradeBottomSheet" 27 | //endregion 28 | 29 | //region Names 30 | const val OPEN_DASHBOARD_NAME = "openDashboard" 31 | const val NOT_ENOUGH_STORAGE_UPGRADE_NAME = "notEnoughStorageUpgrade" 32 | //endregion 33 | } 34 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/kotlin/com/infomaniak/core/appintegrity/exceptions/ApiException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.appintegrity.exceptions 19 | 20 | /** 21 | * Thrown when an API call fails due to an error identified by a specific error code. 22 | * 23 | * This exception is used to represent errors returned by an API, with an associated error code 24 | * and message describing the problem. 25 | * 26 | * @param errorCode The specific error code returned by the API. 27 | * @param errorMessage The detailed error message explaining the cause of the failure. 28 | */ 29 | internal open class ApiException(val errorCode: String, errorMessage: String) : Exception(errorMessage) 30 | -------------------------------------------------------------------------------- /Legacy/Confetti/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 9999dp 20 | 6dp 21 | 100dp 22 | 20dp 23 | 50dp 24 | 100dp 25 | 200dp 26 | 275dp 27 | 2375dp 28 | 29 | -------------------------------------------------------------------------------- /Ui/Compose/Basics/src/main/kotlin/com/infomaniak/core/ui/compose/basics/ButtonStyle.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ui.compose.basics 19 | 20 | import androidx.compose.foundation.shape.RoundedCornerShape 21 | import androidx.compose.ui.graphics.Shape 22 | import androidx.compose.ui.unit.Dp 23 | import androidx.compose.ui.unit.dp 24 | 25 | interface ButtonStyle { 26 | val height: Dp 27 | val shape: Shape 28 | } 29 | 30 | enum class ButtonType( 31 | override val height: Dp, 32 | override val shape: Shape, 33 | ) : ButtonStyle { 34 | Mail(height = 48.dp, shape = RoundedCornerShape(16.dp)), 35 | Drive(height = 58.dp, shape = RoundedCornerShape(10.dp)), 36 | } 37 | -------------------------------------------------------------------------------- /Ui/Compose/Margin/src/main/kotlin/com/infomaniak/core/ui/compose/margin/Margin.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ui.compose.margin 19 | 20 | import androidx.compose.ui.unit.dp 21 | 22 | /** 23 | * Margins are accessible through here for now until we extract them to our design system 24 | */ 25 | object Margin { 26 | 27 | /** 4dp */ 28 | val Micro = 4.dp 29 | 30 | /** 8dp */ 31 | val Mini = 8.dp 32 | 33 | /** 12dp */ 34 | val Small = 12.dp 35 | 36 | /** 16dp */ 37 | val Medium = 16.dp 38 | 39 | /** 24dp */ 40 | val Large = 24.dp 41 | 42 | /** 32dp */ 43 | val Huge = 32.dp 44 | 45 | /** 48dp */ 46 | val Giant = 48.dp 47 | } 48 | -------------------------------------------------------------------------------- /Ui/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | plugins { 20 | id("com.android.library") 21 | alias(core.plugins.kotlin.android) 22 | } 23 | 24 | val coreCompileSdk: Int by rootProject.extra 25 | val coreMinSdk: Int by rootProject.extra 26 | val javaVersion: JavaVersion by rootProject.extra 27 | 28 | android { 29 | namespace = "com.infomaniak.core.ui" 30 | compileSdk = coreCompileSdk 31 | 32 | defaultConfig { 33 | minSdk = coreMinSdk 34 | } 35 | 36 | compileOptions { 37 | sourceCompatibility = javaVersion 38 | targetCompatibility = javaVersion 39 | } 40 | 41 | kotlinOptions { 42 | jvmTarget = javaVersion.toString() 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Auth/src/main/kotlin/com/infomaniak/core/auth/models/user/preferences/Language.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.auth.models.user.preferences 19 | 20 | import android.os.Parcelable 21 | import androidx.room.ColumnInfo 22 | import com.google.gson.annotations.SerializedName 23 | import kotlinx.parcelize.Parcelize 24 | 25 | @Parcelize 26 | data class Language( 27 | @SerializedName("short_name") 28 | @ColumnInfo(defaultValue = "") 29 | var shortName: String, 30 | @ColumnInfo(defaultValue = "") 31 | var locale: String, 32 | @SerializedName("short_locale") 33 | @ColumnInfo(defaultValue = "") 34 | var shortLocale: String, 35 | ) : PreferenceTemplate(), Parcelable 36 | -------------------------------------------------------------------------------- /Legacy/src/main/res/values-night/colors.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 | #9E9E9E 21 | @android:color/white 22 | 23 | 24 | #2D2E30 25 | #131415 26 | #242424 27 | #6F7071 28 | #222324 29 | 30 | 31 | #666666 32 | #777777 33 | 34 | -------------------------------------------------------------------------------- /Ui/View/build.gradle.kts: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | 19 | plugins { 20 | id("com.android.library") 21 | alias(core.plugins.kotlin.android) 22 | } 23 | 24 | val coreCompileSdk: Int by rootProject.extra 25 | val coreMinSdk: Int by rootProject.extra 26 | val javaVersion: JavaVersion by rootProject.extra 27 | 28 | android { 29 | namespace = "com.infomaniak.core.ui.view" 30 | compileSdk = coreCompileSdk 31 | 32 | defaultConfig { 33 | minSdk = coreMinSdk 34 | } 35 | 36 | compileOptions { 37 | sourceCompatibility = javaVersion 38 | targetCompatibility = javaVersion 39 | } 40 | 41 | kotlinOptions { 42 | jvmTarget = javaVersion.toString() 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/extensions/BundleExt.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.extensions 19 | 20 | import android.os.Build.VERSION.SDK_INT 21 | import android.os.Bundle 22 | import android.os.Parcelable 23 | 24 | inline fun Bundle.parcelableExtra(key: String): T? = when { 25 | SDK_INT >= 33 -> getParcelable(key, T::class.java) 26 | else -> @Suppress("DEPRECATION") getParcelable(key) as? T 27 | } 28 | 29 | inline fun Bundle.parcelableArrayListExtra(key: String): List? = when { 30 | SDK_INT >= 33 -> getParcelableArrayList(key, T::class.java) 31 | else -> @Suppress("DEPRECATION") getParcelableArrayList(key) 32 | } 33 | -------------------------------------------------------------------------------- /Legacy/src/main/java/com/infomaniak/core/legacy/models/user/preferences/Language.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2022-2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.legacy.models.user.preferences 19 | 20 | import android.os.Parcelable 21 | import androidx.room.ColumnInfo 22 | import com.google.gson.annotations.SerializedName 23 | import kotlinx.parcelize.Parcelize 24 | 25 | @Parcelize 26 | data class Language( 27 | @SerializedName("short_name") 28 | @ColumnInfo(defaultValue = "") 29 | var shortName: String, 30 | @ColumnInfo(defaultValue = "") 31 | var locale: String, 32 | @SerializedName("short_locale") 33 | @ColumnInfo(defaultValue = "") 34 | var shortLocale: String, 35 | ) : PreferenceTemplate(), Parcelable 36 | -------------------------------------------------------------------------------- /Network/Ktor/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | } 5 | 6 | val coreCompileSdk: Int by rootProject.extra 7 | val coreMinSdk: Int by rootProject.extra 8 | val javaVersion: JavaVersion by rootProject.extra 9 | 10 | android { 11 | namespace = "com.infomaniak.core.network.ktor" 12 | compileSdk = coreCompileSdk 13 | 14 | defaultConfig { 15 | minSdk = coreMinSdk 16 | 17 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 18 | consumerProguardFiles("consumer-rules.pro") 19 | } 20 | 21 | buildTypes { 22 | release { 23 | isMinifyEnabled = false 24 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") 25 | } 26 | } 27 | 28 | buildFeatures { 29 | buildConfig = true 30 | } 31 | 32 | compileOptions { 33 | sourceCompatibility = javaVersion 34 | targetCompatibility = javaVersion 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = javaVersion.toString() 39 | } 40 | } 41 | 42 | dependencies { 43 | api(project(":Core:Network")) 44 | implementation(project(":Core:Sentry")) 45 | 46 | api(core.ktor.client.json) 47 | api(core.ktor.client.content.negociation) 48 | api(core.ktor.client.core) 49 | api(core.ktor.client.okhttp) 50 | api(core.okhttp) 51 | 52 | api(core.kotlinx.serialization.json) 53 | } 54 | -------------------------------------------------------------------------------- /KSuite/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | alias(core.plugins.compose.compiler) 5 | alias(core.plugins.kotlin.parcelize) 6 | } 7 | 8 | val coreCompileSdk: Int by rootProject.extra 9 | val coreMinSdk: Int by rootProject.extra 10 | val javaVersion: JavaVersion by rootProject.extra 11 | 12 | android { 13 | 14 | namespace = "com.infomaniak.core.ksuite" 15 | compileSdk = coreCompileSdk 16 | 17 | defaultConfig { 18 | minSdk = coreMinSdk 19 | } 20 | 21 | buildTypes { 22 | release { 23 | isMinifyEnabled = false 24 | } 25 | } 26 | 27 | flavorDimensions += "distribution" 28 | productFlavors { 29 | create("standard") { 30 | isDefault = true 31 | } 32 | create("fdroid") 33 | } 34 | 35 | compileOptions { 36 | sourceCompatibility = javaVersion 37 | targetCompatibility = javaVersion 38 | } 39 | 40 | kotlinOptions { 41 | jvmTarget = javaVersion.toString() 42 | } 43 | 44 | buildFeatures { 45 | compose = true 46 | } 47 | } 48 | 49 | dependencies { 50 | // Compose 51 | implementation(platform(core.compose.bom)) 52 | implementation(core.compose.runtime) 53 | debugImplementation(core.compose.ui.tooling) 54 | implementation(core.compose.material3) 55 | implementation(core.compose.ui) 56 | implementation(core.compose.ui.tooling.preview) 57 | } 58 | -------------------------------------------------------------------------------- /Legacy/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 18 | 19 | 110dp 20 | 60dp 21 | 6dp 22 | 48dp 23 | 24dp 24 | 16dp 25 | 8dp 26 | 4dp 27 | 10dp 28 | 120dp 29 | 180dp 30 | 31 | -------------------------------------------------------------------------------- /AppIntegrity/src/main/kotlin/com/infomaniak/core/appintegrity/exceptions/UnexpectedApiErrorFormatException.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2024 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.appintegrity.exceptions 19 | 20 | /** 21 | * Thrown when an API call returns an error in an unexpected format that cannot be parsed. 22 | * 23 | * This exception indicates that the API response format is different from what was expected, 24 | * preventing proper parsing of the error details. 25 | * 26 | * @param statusCode The HTTP status code returned by the API. 27 | * @param bodyResponse The raw response body from the API that could not be parsed. 28 | */ 29 | internal class UnexpectedApiErrorFormatException(val statusCode: Int, val bodyResponse: String) : Exception(bodyResponse) 30 | -------------------------------------------------------------------------------- /Onboarding/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | alias(core.plugins.compose.compiler) 5 | } 6 | 7 | val coreCompileSdk: Int by rootProject.extra 8 | val coreMinSdk: Int by rootProject.extra 9 | val javaVersion: JavaVersion by rootProject.extra 10 | 11 | android { 12 | namespace = "com.infomaniak.core.onboarding" 13 | compileSdk = coreCompileSdk 14 | 15 | defaultConfig { 16 | minSdk = coreMinSdk 17 | 18 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 19 | consumerProguardFiles("consumer-rules.pro") 20 | } 21 | 22 | compileOptions { 23 | sourceCompatibility = javaVersion 24 | targetCompatibility = javaVersion 25 | } 26 | buildFeatures { 27 | compose = true 28 | } 29 | kotlinOptions { 30 | jvmTarget = javaVersion.toString() 31 | } 32 | } 33 | 34 | dependencies { 35 | implementation(project(":Core:Ui:Compose:Margin")) 36 | 37 | implementation(platform(core.compose.bom)) 38 | implementation(core.activity.compose) 39 | implementation(core.androidx.core.ktx) 40 | implementation(core.compose.foundation) 41 | implementation(core.compose.material3) 42 | implementation(core.compose.runtime) 43 | implementation(core.compose.ui.tooling.preview) 44 | 45 | implementation(core.lottie.compose) 46 | implementation(core.dotlottie) 47 | 48 | debugImplementation(core.compose.ui.tooling) 49 | } 50 | -------------------------------------------------------------------------------- /src/main/kotlin/com/infomaniak/core/Xor.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core 19 | 20 | /** 21 | * This class is a substitute for union types (that will exist as "error types" in Kotlin 2.3+). 22 | * 23 | * It is similar to `Either` from Arrow, but with fewer features (because some are not needed). 24 | * 25 | * XOR stands for eXclusive OR. 26 | */ 27 | sealed class Xor { 28 | 29 | fun firstOrNull(): FirstT? = if (this is First) this.value else null 30 | fun secondOrNull(): SecondT? = if (this is Second) this.value else null 31 | 32 | data class First(val value: LeftT) : Xor() 33 | 34 | data class Second(val value: RightT) : Xor() 35 | } 36 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/java/com/infomaniak/core/ksuite/myksuite/ui/data/MyKSuiteDataDao.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ksuite.myksuite.ui.data 19 | 20 | import androidx.room.Dao 21 | import androidx.room.Delete 22 | import androidx.room.Query 23 | import androidx.room.Upsert 24 | 25 | @Dao 26 | interface MyKSuiteDataDao { 27 | @Query("SELECT * FROM MyKSuiteData WHERE id = :id LIMIT 1") 28 | suspend fun findById(id: Int): MyKSuiteData? 29 | 30 | @Query("SELECT * FROM MyKSuiteData WHERE user_id = :userId LIMIT 1") 31 | suspend fun findByUserId(userId: Int): MyKSuiteData? 32 | 33 | @Upsert 34 | suspend fun upsert(data: MyKSuiteData) 35 | 36 | @Delete 37 | suspend fun delete(data: MyKSuiteData) 38 | } 39 | -------------------------------------------------------------------------------- /CrossAppLogin/Back/src/main/kotlin/com/infomaniak/core/crossapplogin/back/internal/certificates/AppCertificateChecker.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.infomaniak.core.crossapplogin.back.internal.certificates 18 | 19 | import kotlinx.coroutines.CoroutineScope 20 | import kotlinx.coroutines.Dispatchers 21 | 22 | internal sealed class AppCertificateChecker( 23 | val signingCertificates: AppSigningCertificates 24 | ) { 25 | 26 | companion object { 27 | val withInfomaniakApps: AppCertificateChecker = AppCertificateCheckerImpl( 28 | signingCertificates = infomaniakAppsCertificates, 29 | coroutineScope = CoroutineScope(Dispatchers.Default) 30 | ) 31 | } 32 | 33 | abstract suspend fun isUidAllowed(uid: Int): Boolean 34 | 35 | abstract suspend fun isPackageNameAllowed(packageName: String): Boolean? 36 | } 37 | -------------------------------------------------------------------------------- /CrossAppLogin/Back/src/main/kotlin/com/infomaniak/core/crossapplogin/back/internal/certificates/LazyAppSigningCertificate.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.infomaniak.core.crossapplogin.back.internal.certificates 18 | 19 | /** 20 | * The [getSha256Fingerprint] lambda return value can include the colon separator (`:`), 21 | * and can be uppercase (this is what the Play Store returns). 22 | */ 23 | internal class LazyAppSigningCertificate(getSha256Fingerprint: () -> String) { 24 | 25 | private val sha256FingerprintString by lazy { getSha256Fingerprint().replace(":", "").lowercase() } 26 | 27 | @OptIn(ExperimentalStdlibApi::class) 28 | private val sha256Fingerprint: ByteArray by lazy { sha256FingerprintString.hexToByteArray() } 29 | 30 | fun matches(expectedSha256: ByteArray): Boolean = sha256Fingerprint contentEquals expectedSha256 31 | } 32 | -------------------------------------------------------------------------------- /DotLottie/src/main/kotlin/com/infomaniak/core/dotlottie/model/DotLottieTheme.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.dotlottie.model 19 | 20 | import androidx.compose.ui.graphics.Color 21 | import com.infomaniak.core.dotlottie.ThemeData 22 | import kotlinx.serialization.json.Json 23 | 24 | sealed class DotLottieTheme(val id: String?) { 25 | class Embedded(id: String?) : DotLottieTheme(id) 26 | 27 | data class Custom(private val colorMapping: Map) : DotLottieTheme(null) { 28 | internal fun toData(): String = json.encodeToString(ThemeData(rules = colorMapping.map(ThemeData::Rule))) 29 | } 30 | 31 | companion object { 32 | private val json = Json { 33 | encodeDefaults = true 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /KSuite/MyKSuite/src/main/res/drawable/ic_envelope_bold.xml: -------------------------------------------------------------------------------- 1 | 18 | 23 | 27 | 28 | -------------------------------------------------------------------------------- /CrossAppLogin/Front/src/main/kotlin/com/infomaniak/core/crossapplogin/front/previews/AccountsCheckingStatePreviewParameterProvider.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.crossapplogin.front.previews 19 | 20 | import androidx.compose.ui.tooling.preview.PreviewParameterProvider 21 | import com.infomaniak.core.crossapplogin.back.BaseCrossAppLoginViewModel.AccountsCheckingState 22 | import com.infomaniak.core.crossapplogin.back.BaseCrossAppLoginViewModel.AccountsCheckingStatus 23 | 24 | class AccountsCheckingStatePreviewParameter : PreviewParameterProvider { 25 | override val values: Sequence = sequenceOf(accounts) 26 | } 27 | 28 | private val accounts = AccountsCheckingState(AccountsCheckingStatus.UpToDate, accountsPreviewData) 29 | -------------------------------------------------------------------------------- /Network/build.gradle.kts: -------------------------------------------------------------------------------- 1 | plugins { 2 | id("com.android.library") 3 | alias(core.plugins.kotlin.android) 4 | } 5 | 6 | val coreCompileSdk: Int by rootProject.extra 7 | val coreMinSdk: Int by rootProject.extra 8 | val javaVersion: JavaVersion by rootProject.extra 9 | 10 | android { 11 | namespace = "com.infomaniak.core.network" 12 | compileSdk = coreCompileSdk 13 | 14 | defaultConfig { 15 | minSdk = coreMinSdk 16 | 17 | testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" 18 | consumerProguardFiles("consumer-rules.pro") 19 | } 20 | 21 | buildTypes { 22 | release { 23 | isMinifyEnabled = false 24 | proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") 25 | } 26 | } 27 | 28 | buildFeatures { 29 | buildConfig = true 30 | } 31 | 32 | compileOptions { 33 | sourceCompatibility = javaVersion 34 | targetCompatibility = javaVersion 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = javaVersion.toString() 39 | } 40 | } 41 | 42 | dependencies { 43 | api(project(":Core:Network:Models")) 44 | implementation(project(":Core:Sentry")) 45 | 46 | implementation(core.androidx.core.ktx) 47 | implementation(core.kotlinx.serialization.json) 48 | implementation(core.gson) 49 | implementation(core.okhttp) 50 | implementation(core.splitties.toast) 51 | implementation(core.stetho.okhttp3) 52 | implementation(core.splitties.systemservices) 53 | } 54 | -------------------------------------------------------------------------------- /KSuite/src/main/java/com/infomaniak/core/ksuite/ui/components/KSuiteGradient.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Infomaniak Core - Android 3 | * Copyright (C) 2025 Infomaniak Network SA 4 | * 5 | * This program is free software: you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation, either version 3 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program. If not, see . 17 | */ 18 | package com.infomaniak.core.ksuite.ui.components 19 | 20 | import androidx.compose.foundation.BorderStroke 21 | import androidx.compose.ui.geometry.Offset 22 | import androidx.compose.ui.graphics.Brush 23 | import androidx.compose.ui.graphics.Color 24 | import androidx.compose.ui.unit.dp 25 | 26 | fun kSuiteGradient() = BorderStroke( 27 | width = 1.dp, 28 | brush = Brush.linearGradient( 29 | 0.0f to Color(0xFF1DDDFD), 30 | 0.3f to Color(0xFF337CFF), 31 | 0.5f to Color(0xFFA055FC), 32 | 0.7f to Color(0xFFF34BBB), 33 | 1.0f to Color(0xFFFD8C3D), 34 | start = Offset.Zero, 35 | end = Offset(Float.POSITIVE_INFINITY, 0.0f), 36 | ), 37 | ) 38 | --------------------------------------------------------------------------------