Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1b6f9a4c authored by Guillaume Jacquart's avatar Guillaume Jacquart Committed by Guillaume Jacquart
Browse files

4025:Feat: add install-app-lib, unittests

parent b10ac710
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -186,3 +186,13 @@ publish-contracts:
    - ./gradlew :parental-control-data:build
    - ./gradlew :parental-control-data:publish
  allow_failure: true

publish-installapplib:
  stage: publish
  needs:
    - job: build-release
  rules: *rules_publish
  script:
    - ./gradlew :install-app-lib:build
    - ./gradlew :install-app-lib:publish
  allow_failure: true
+7 −6
Original line number Diff line number Diff line
@@ -74,13 +74,13 @@ tasks.withType(Test).configureEach {
}

android {
    compileSdk = 36
    compileSdk = libs.versions.compileSdk.get().toInteger()

    defaultConfig {
        applicationId = "foundation.e.apps"
        minSdk = 30
        minSdk = libs.versions.minSdk.get().toInteger()
        //noinspection OldTargetApi
        targetSdk = 34
        targetSdk = libs.versions.targetSdk.get().toInteger()
        versionCode = versionMajor * 1000000 + versionMinor * 1000 + versionPatch
        versionName = "${versionMajor}.${versionMinor}.${versionPatch}"

@@ -129,11 +129,11 @@ android {
        aidl = true
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_21
        targetCompatibility = JavaVersion.VERSION_21
        sourceCompatibility = JavaVersion.toVersion(libs.versions.jvmTarget.get())
        targetCompatibility = JavaVersion.toVersion(libs.versions.jvmTarget.get())
    }
    kotlinOptions {
        jvmTarget = '21'
        jvmTarget = libs.versions.jvmTarget.get()
    }
    lint {
        lintConfig = file('lint.xml')
@@ -196,6 +196,7 @@ dependencies {
    // Project dependencies
    implementation(project(":auth-data-lib"))
    implementation(project(":parental-control-data"))
    implementation(project(":install-app-lib"))

    // eFoundation libraries
    implementation(libs.telemetry)
+0 −1
Original line number Diff line number Diff line
@@ -135,7 +135,6 @@
        <service
            android:name=".services.InstallAppService"
            android:exported="true"
            android:foregroundServiceType="dataSync"
            android:permission="foundation.e.apps.permission.BIND_INSTALL_SERVICE">
        </service>

+0 −7
Original line number Diff line number Diff line
package foundation.e.apps;

interface IInstallAppCallback {
    boolean onStatusUpdate(String status);
    void onError(String code, String message);
    void onProgress(int percent);
}
+30 −0
Original line number Diff line number Diff line
/*
 * Copyright MURENA SAS 2026
 * Apps  Quickly and easily install Android apps onto your device!
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package foundation.e.apps.domain.install

import foundation.e.apps.data.enums.Source

class UninstallableApp(message: String?) : Exception(message)
class UnavailableApp(
    message: String?,
    val sources: Collection<Source>,
    cause: Throwable? = null
) : Exception(message, cause)

class StoreNotConfigured(message: String?) : Exception(message)
Loading