feat: rename package to app.revanced.manager

This commit is contained in:
CnC-Robert 2023-06-04 18:27:40 +02:00
parent fcb75dd780
commit 27426b1390
83 changed files with 270 additions and 270 deletions

View file

@ -7,12 +7,12 @@ plugins {
}
android {
namespace = "app.revanced.manager.compose"
namespace = "app.revanced.manager"
compileSdk = 33
buildToolsVersion = "33.0.2"
defaultConfig {
applicationId = "app.revanced.manager.compose"
applicationId = "app.revanced.manager"
minSdk = 26
targetSdk = 33
versionCode = 1

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose
package app.revanced.manager
import android.os.Bundle
import androidx.activity.ComponentActivity
@ -6,16 +6,16 @@ import androidx.activity.compose.setContent
import androidx.compose.animation.ExperimentalAnimationApi
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import app.revanced.manager.compose.domain.manager.PreferencesManager
import app.revanced.manager.compose.ui.destination.Destination
import app.revanced.manager.compose.ui.screen.AppSelectorScreen
import app.revanced.manager.compose.ui.screen.DashboardScreen
import app.revanced.manager.compose.ui.screen.InstallerScreen
import app.revanced.manager.compose.ui.screen.PatchesSelectorScreen
import app.revanced.manager.compose.ui.screen.SettingsScreen
import app.revanced.manager.compose.ui.theme.ReVancedManagerTheme
import app.revanced.manager.compose.ui.theme.Theme
import app.revanced.manager.compose.ui.viewmodel.MainViewModel
import app.revanced.manager.domain.manager.PreferencesManager
import app.revanced.manager.ui.destination.Destination
import app.revanced.manager.ui.screen.AppSelectorScreen
import app.revanced.manager.ui.screen.DashboardScreen
import app.revanced.manager.ui.screen.InstallerScreen
import app.revanced.manager.ui.screen.PatchesSelectorScreen
import app.revanced.manager.ui.screen.SettingsScreen
import app.revanced.manager.ui.theme.ReVancedManagerTheme
import app.revanced.manager.ui.theme.Theme
import app.revanced.manager.ui.viewmodel.MainViewModel
import coil.Coil
import coil.ImageLoader
import dev.olshevski.navigation.reimagined.AnimatedNavHost

View file

@ -1,7 +1,7 @@
package app.revanced.manager.compose
package app.revanced.manager
import android.app.Application
import app.revanced.manager.compose.di.*
import app.revanced.manager.di.*
import org.koin.android.ext.koin.androidContext
import org.koin.androidx.workmanager.koin.workManagerFactory
import org.koin.core.context.startKoin

View file

@ -1,15 +0,0 @@
package app.revanced.manager.compose.di
import app.revanced.manager.compose.domain.repository.ReVancedRepository
import app.revanced.manager.compose.network.api.ManagerAPI
import app.revanced.manager.compose.domain.repository.SourcePersistenceRepository
import app.revanced.manager.compose.domain.repository.SourceRepository
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module
val repositoryModule = module {
singleOf(::ReVancedRepository)
singleOf(::ManagerAPI)
singleOf(::SourcePersistenceRepository)
singleOf(::SourceRepository)
}

View file

@ -1,10 +1,10 @@
package app.revanced.manager.compose.data.room
package app.revanced.manager.data.room
import androidx.room.Database
import androidx.room.RoomDatabase
import androidx.room.TypeConverters
import app.revanced.manager.compose.data.room.sources.SourceEntity
import app.revanced.manager.compose.data.room.sources.SourceDao
import app.revanced.manager.data.room.sources.SourceEntity
import app.revanced.manager.data.room.sources.SourceDao
@Database(entities = [SourceEntity::class], version = 1)
@TypeConverters(Converters::class)

View file

@ -1,7 +1,7 @@
package app.revanced.manager.compose.data.room
package app.revanced.manager.data.room
import androidx.room.TypeConverter
import app.revanced.manager.compose.data.room.sources.SourceLocation
import app.revanced.manager.data.room.sources.SourceLocation
import io.ktor.http.*
class Converters {

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.data.room.sources
package app.revanced.manager.data.room.sources
import androidx.room.*

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.data.room.sources
package app.revanced.manager.data.room.sources
import androidx.room.*
import io.ktor.http.*

View file

@ -1,8 +1,8 @@
package app.revanced.manager.compose.di
package app.revanced.manager.di
import android.content.Context
import androidx.room.Room
import app.revanced.manager.compose.data.room.AppDatabase
import app.revanced.manager.data.room.AppDatabase
import org.koin.android.ext.koin.androidContext
import org.koin.dsl.module

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.di
package app.revanced.manager.di
import android.content.Context
import io.ktor.client.*

View file

@ -1,7 +1,7 @@
package app.revanced.manager.compose.di
package app.revanced.manager.di
import app.revanced.manager.compose.patcher.SignerService
import app.revanced.manager.compose.util.PM
import app.revanced.manager.patcher.SignerService
import app.revanced.manager.util.PM
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module

View file

@ -1,7 +1,7 @@
package app.revanced.manager.compose.di
package app.revanced.manager.di
import android.content.Context
import app.revanced.manager.compose.domain.manager.PreferencesManager
import app.revanced.manager.domain.manager.PreferencesManager
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module

View file

@ -0,0 +1,15 @@
package app.revanced.manager.di
import app.revanced.manager.domain.repository.ReVancedRepository
import app.revanced.manager.network.api.ManagerAPI
import app.revanced.manager.domain.repository.SourcePersistenceRepository
import app.revanced.manager.domain.repository.SourceRepository
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module
val repositoryModule = module {
singleOf(::ReVancedRepository)
singleOf(::ManagerAPI)
singleOf(::SourcePersistenceRepository)
singleOf(::SourceRepository)
}

View file

@ -1,7 +1,7 @@
package app.revanced.manager.compose.di
package app.revanced.manager.di
import app.revanced.manager.compose.network.service.HttpService
import app.revanced.manager.compose.network.service.ReVancedService
import app.revanced.manager.network.service.HttpService
import app.revanced.manager.network.service.ReVancedService
import org.koin.core.module.dsl.singleOf
import org.koin.dsl.module

View file

@ -1,6 +1,6 @@
package app.revanced.manager.compose.di
package app.revanced.manager.di
import app.revanced.manager.compose.ui.viewmodel.*
import app.revanced.manager.ui.viewmodel.*
import org.koin.androidx.viewmodel.dsl.viewModelOf
import org.koin.dsl.module

View file

@ -1,6 +1,6 @@
package app.revanced.manager.compose.di
package app.revanced.manager.di
import app.revanced.manager.compose.patcher.worker.PatcherWorker
import app.revanced.manager.patcher.worker.PatcherWorker
import org.koin.androidx.workmanager.dsl.workerOf
import org.koin.dsl.module

View file

@ -1,8 +1,8 @@
package app.revanced.manager.compose.domain.manager
package app.revanced.manager.domain.manager
import android.content.SharedPreferences
import app.revanced.manager.compose.domain.manager.base.BasePreferenceManager
import app.revanced.manager.compose.ui.theme.Theme
import app.revanced.manager.domain.manager.base.BasePreferenceManager
import app.revanced.manager.ui.theme.Theme
/**
* @author Hyperion Authors, zt64

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.domain.manager.base
package app.revanced.manager.domain.manager.base
import android.content.SharedPreferences
import androidx.compose.runtime.getValue

View file

@ -1,6 +1,6 @@
package app.revanced.manager.compose.domain.repository
package app.revanced.manager.domain.repository
import app.revanced.manager.compose.network.service.ReVancedService
import app.revanced.manager.network.service.ReVancedService
class ReVancedRepository(
private val service: ReVancedService

View file

@ -1,10 +1,10 @@
package app.revanced.manager.compose.domain.repository
package app.revanced.manager.domain.repository
import app.revanced.manager.compose.data.room.AppDatabase
import app.revanced.manager.compose.data.room.sources.SourceEntity
import app.revanced.manager.compose.data.room.sources.SourceLocation
import app.revanced.manager.compose.data.room.sources.VersionInfo
import app.revanced.manager.compose.util.apiURL
import app.revanced.manager.data.room.AppDatabase
import app.revanced.manager.data.room.sources.SourceEntity
import app.revanced.manager.data.room.sources.SourceLocation
import app.revanced.manager.data.room.sources.VersionInfo
import app.revanced.manager.util.apiURL
import kotlin.random.Random
import io.ktor.http.*

View file

@ -1,13 +1,13 @@
package app.revanced.manager.compose.domain.repository
package app.revanced.manager.domain.repository
import android.app.Application
import android.util.Log
import app.revanced.manager.compose.data.room.sources.SourceEntity
import app.revanced.manager.compose.data.room.sources.SourceLocation
import app.revanced.manager.compose.domain.sources.LocalSource
import app.revanced.manager.compose.domain.sources.RemoteSource
import app.revanced.manager.compose.domain.sources.Source
import app.revanced.manager.compose.util.tag
import app.revanced.manager.data.room.sources.SourceEntity
import app.revanced.manager.data.room.sources.SourceLocation
import app.revanced.manager.domain.sources.LocalSource
import app.revanced.manager.domain.sources.RemoteSource
import app.revanced.manager.domain.sources.Source
import app.revanced.manager.util.tag
import io.ktor.http.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.ExperimentalCoroutinesApi

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.domain.sources
package app.revanced.manager.domain.sources
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

View file

@ -1,7 +1,7 @@
package app.revanced.manager.compose.domain.sources
package app.revanced.manager.domain.sources
import androidx.compose.runtime.Stable
import app.revanced.manager.compose.network.api.ManagerAPI
import app.revanced.manager.network.api.ManagerAPI
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import org.koin.core.component.get

View file

@ -1,10 +1,10 @@
package app.revanced.manager.compose.domain.sources
package app.revanced.manager.domain.sources
import android.util.Log
import androidx.compose.runtime.Stable
import app.revanced.manager.compose.patcher.patch.PatchBundle
import app.revanced.manager.compose.domain.repository.SourcePersistenceRepository
import app.revanced.manager.compose.util.tag
import app.revanced.manager.patcher.patch.PatchBundle
import app.revanced.manager.domain.repository.SourcePersistenceRepository
import app.revanced.manager.util.tag
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import org.koin.core.component.KoinComponent

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.network.api
package app.revanced.manager.network.api
import android.app.Application
import android.os.Environment
@ -6,8 +6,8 @@ import android.util.Log
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import app.revanced.manager.compose.domain.repository.ReVancedRepository
import app.revanced.manager.compose.util.*
import app.revanced.manager.domain.repository.ReVancedRepository
import app.revanced.manager.util.*
import io.ktor.client.*
import io.ktor.client.plugins.*
import io.ktor.client.request.*

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.network.dto
package app.revanced.manager.network.dto
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.network.dto
package app.revanced.manager.network.dto
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

View file

@ -1,10 +1,10 @@
package app.revanced.manager.compose.network.service
package app.revanced.manager.network.service
import android.util.Log
import app.revanced.manager.compose.network.utils.APIError
import app.revanced.manager.compose.network.utils.APIFailure
import app.revanced.manager.compose.network.utils.APIResponse
import app.revanced.manager.compose.util.tag
import app.revanced.manager.network.utils.APIError
import app.revanced.manager.network.utils.APIFailure
import app.revanced.manager.network.utils.APIResponse
import app.revanced.manager.util.tag
import io.ktor.client.*
import io.ktor.client.request.*
import io.ktor.client.statement.*

View file

@ -1,12 +1,12 @@
package app.revanced.manager.compose.network.service
package app.revanced.manager.network.service
import app.revanced.manager.compose.network.api.MissingAssetException
import app.revanced.manager.compose.network.dto.Assets
import app.revanced.manager.compose.network.dto.ReVancedReleases
import app.revanced.manager.compose.network.dto.ReVancedRepositories
import app.revanced.manager.compose.network.utils.APIResponse
import app.revanced.manager.compose.network.utils.getOrThrow
import app.revanced.manager.compose.util.apiURL
import app.revanced.manager.network.api.MissingAssetException
import app.revanced.manager.network.dto.Assets
import app.revanced.manager.network.dto.ReVancedReleases
import app.revanced.manager.network.dto.ReVancedRepositories
import app.revanced.manager.network.utils.APIResponse
import app.revanced.manager.network.utils.getOrThrow
import app.revanced.manager.util.apiURL
import io.ktor.client.request.*
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

View file

@ -1,6 +1,6 @@
@file:Suppress("NOTHING_TO_INLINE")
package app.revanced.manager.compose.network.utils
package app.revanced.manager.network.utils
import io.ktor.http.*

View file

@ -1,8 +1,8 @@
package app.revanced.manager.compose.patcher
package app.revanced.manager.patcher
import app.revanced.manager.compose.patcher.alignment.ZipAligner
import app.revanced.manager.compose.patcher.alignment.zip.ZipFile
import app.revanced.manager.compose.patcher.alignment.zip.structures.ZipEntry
import app.revanced.manager.patcher.alignment.ZipAligner
import app.revanced.manager.patcher.alignment.zip.ZipFile
import app.revanced.manager.patcher.alignment.zip.structures.ZipEntry
import app.revanced.patcher.PatcherResult
import java.io.File

View file

@ -1,8 +1,8 @@
package app.revanced.manager.compose.patcher
package app.revanced.manager.patcher
import android.util.Log
import app.revanced.manager.compose.patcher.worker.Progress
import app.revanced.manager.compose.util.tag
import app.revanced.manager.patcher.worker.Progress
import app.revanced.manager.util.tag
import app.revanced.patcher.Patcher
import app.revanced.patcher.PatcherOptions
import app.revanced.patcher.data.Context

View file

@ -1,8 +1,8 @@
package app.revanced.manager.compose.patcher
package app.revanced.manager.patcher
import android.app.Application
import app.revanced.manager.compose.util.signing.Signer
import app.revanced.manager.compose.util.signing.SigningOptions
import app.revanced.manager.util.signing.Signer
import app.revanced.manager.util.signing.SigningOptions
class SignerService(app: Application) {
private val options = SigningOptions("ReVanced", "ReVanced", app.dataDir.resolve("manager.keystore").path)

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.patcher.aapt
package app.revanced.manager.patcher.aapt
import android.content.Context
import java.io.File

View file

@ -1,6 +1,6 @@
package app.revanced.manager.compose.patcher.alignment
package app.revanced.manager.patcher.alignment
import app.revanced.manager.compose.patcher.alignment.zip.structures.ZipEntry
import app.revanced.manager.patcher.alignment.zip.structures.ZipEntry
internal object ZipAligner {
private const val DEFAULT_ALIGNMENT = 4

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.patcher.alignment.zip
package app.revanced.manager.patcher.alignment.zip
import java.io.DataInput
import java.io.DataOutput

View file

@ -1,7 +1,7 @@
package app.revanced.manager.compose.patcher.alignment.zip
package app.revanced.manager.patcher.alignment.zip
import app.revanced.manager.compose.patcher.alignment.zip.structures.ZipEndRecord
import app.revanced.manager.compose.patcher.alignment.zip.structures.ZipEntry
import app.revanced.manager.patcher.alignment.zip.structures.ZipEndRecord
import app.revanced.manager.patcher.alignment.zip.structures.ZipEntry
import java.io.Closeable
import java.io.File

View file

@ -1,9 +1,9 @@
package app.revanced.manager.compose.patcher.alignment.zip.structures
package app.revanced.manager.patcher.alignment.zip.structures
import app.revanced.manager.compose.patcher.alignment.zip.putUInt
import app.revanced.manager.compose.patcher.alignment.zip.putUShort
import app.revanced.manager.compose.patcher.alignment.zip.readUIntLE
import app.revanced.manager.compose.patcher.alignment.zip.readUShortLE
import app.revanced.manager.patcher.alignment.zip.putUInt
import app.revanced.manager.patcher.alignment.zip.putUShort
import app.revanced.manager.patcher.alignment.zip.readUIntLE
import app.revanced.manager.patcher.alignment.zip.readUShortLE
import java.io.DataInput
import java.nio.ByteBuffer
import java.nio.ByteOrder

View file

@ -1,6 +1,6 @@
package app.revanced.manager.compose.patcher.alignment.zip.structures
package app.revanced.manager.patcher.alignment.zip.structures
import app.revanced.manager.compose.patcher.alignment.zip.*
import app.revanced.manager.patcher.alignment.zip.*
import java.io.DataInput
import java.nio.ByteBuffer
import java.nio.ByteOrder

View file

@ -1,8 +1,8 @@
package app.revanced.manager.compose.patcher.patch
package app.revanced.manager.patcher.patch
import android.util.Log
import app.revanced.manager.compose.patcher.PatchClass
import app.revanced.manager.compose.util.tag
import app.revanced.manager.patcher.PatchClass
import app.revanced.manager.util.tag
import app.revanced.patcher.Patcher
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
import app.revanced.patcher.util.patch.PatchBundle

View file

@ -1,7 +1,7 @@
package app.revanced.manager.compose.patcher.patch
package app.revanced.manager.patcher.patch
import androidx.compose.runtime.Immutable
import app.revanced.manager.compose.patcher.PatchClass
import app.revanced.manager.patcher.PatchClass
import app.revanced.patcher.annotation.Package
import app.revanced.patcher.extensions.PatchExtensions.compatiblePackages
import app.revanced.patcher.extensions.PatchExtensions.dependencies

View file

@ -1,11 +1,11 @@
package app.revanced.manager.compose.patcher.worker
package app.revanced.manager.patcher.worker
import android.content.Context
import androidx.annotation.StringRes
import androidx.work.Data
import androidx.work.workDataOf
import app.revanced.manager.compose.R
import app.revanced.manager.compose.patcher.Session
import app.revanced.manager.R
import app.revanced.manager.patcher.Session
import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.persistentListOf
import kotlinx.collections.immutable.toImmutableList

View file

@ -1,14 +1,14 @@
package app.revanced.manager.compose.patcher.worker
package app.revanced.manager.patcher.worker
import android.content.Context
import android.util.Log
import androidx.work.CoroutineWorker
import androidx.work.WorkerParameters
import app.revanced.manager.compose.domain.repository.SourceRepository
import app.revanced.manager.compose.patcher.Session
import app.revanced.manager.compose.patcher.aapt.Aapt
import app.revanced.manager.compose.util.PatchesSelection
import app.revanced.manager.compose.util.tag
import app.revanced.manager.domain.repository.SourceRepository
import app.revanced.manager.patcher.Session
import app.revanced.manager.patcher.aapt.Aapt
import app.revanced.manager.util.PatchesSelection
import app.revanced.manager.util.tag
import app.revanced.patcher.extensions.PatchExtensions.patchName
import kotlinx.coroutines.flow.first
import kotlinx.serialization.Serializable

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.service
package app.revanced.manager.service
import android.app.Service
import android.content.Intent

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.service
package app.revanced.manager.service
import android.app.Service
import android.content.Intent

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.component
package app.revanced.manager.ui.component
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.size
@ -10,7 +10,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.ColorFilter
import androidx.compose.ui.graphics.vector.rememberVectorPainter
import androidx.compose.ui.unit.dp
import app.revanced.manager.compose.util.AppInfo
import app.revanced.manager.util.AppInfo
import coil.compose.AsyncImage
@Composable

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.component
package app.revanced.manager.ui.component
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.RowScope

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.component
package app.revanced.manager.ui.component
import android.net.Uri
import androidx.activity.compose.rememberLauncherForActivityResult

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.component
package app.revanced.manager.ui.component
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.MaterialTheme

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.component
package app.revanced.manager.ui.component
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Column

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.component.sources
package app.revanced.manager.ui.component.sources
import android.net.Uri
import androidx.compose.foundation.layout.Arrangement
@ -6,9 +6,9 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.unit.dp
import app.revanced.manager.compose.ui.component.FileSelector
import app.revanced.manager.compose.util.APK_MIMETYPE
import app.revanced.manager.compose.util.JAR_MIMETYPE
import app.revanced.manager.ui.component.FileSelector
import app.revanced.manager.util.APK_MIMETYPE
import app.revanced.manager.util.JAR_MIMETYPE
@Composable
fun LocalBundleSelectors(onPatchesSelection: (Uri) -> Unit, onIntegrationsSelection: (Uri) -> Unit) {

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.component.sources
package app.revanced.manager.ui.component.sources
import android.net.Uri
import androidx.compose.foundation.layout.Column
@ -12,8 +12,8 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties
import app.revanced.manager.compose.R
import app.revanced.manager.compose.util.parseUrlOrNull
import app.revanced.manager.R
import app.revanced.manager.util.parseUrlOrNull
import io.ktor.http.*
@Composable

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.component.sources
package app.revanced.manager.ui.component.sources
import android.net.Uri
import androidx.annotation.StringRes
@ -13,12 +13,12 @@ import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import app.revanced.manager.compose.R
import app.revanced.manager.compose.domain.sources.LocalSource
import app.revanced.manager.compose.domain.sources.RemoteSource
import app.revanced.manager.compose.domain.sources.Source
import app.revanced.manager.compose.ui.viewmodel.SourcesViewModel
import app.revanced.manager.compose.util.uiSafe
import app.revanced.manager.R
import app.revanced.manager.domain.sources.LocalSource
import app.revanced.manager.domain.sources.RemoteSource
import app.revanced.manager.domain.sources.Source
import app.revanced.manager.ui.viewmodel.SourcesViewModel
import app.revanced.manager.util.uiSafe
import kotlinx.coroutines.launch
import java.io.InputStream

View file

@ -1,8 +1,8 @@
package app.revanced.manager.compose.ui.destination
package app.revanced.manager.ui.destination
import android.os.Parcelable
import app.revanced.manager.compose.util.AppInfo
import app.revanced.manager.compose.util.PatchesSelection
import app.revanced.manager.util.AppInfo
import app.revanced.manager.util.PatchesSelection
import kotlinx.parcelize.Parcelize
sealed interface Destination : Parcelable {

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.destination
package app.revanced.manager.ui.destination
import android.os.Parcelable
import kotlinx.parcelize.Parcelize

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen
package app.revanced.manager.ui.screen
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts
@ -23,13 +23,13 @@ import androidx.compose.ui.res.pluralStringResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import app.revanced.manager.compose.R
import app.revanced.manager.compose.ui.component.AppIcon
import app.revanced.manager.compose.ui.component.AppTopBar
import app.revanced.manager.compose.ui.component.LoadingIndicator
import app.revanced.manager.compose.ui.viewmodel.AppSelectorViewModel
import app.revanced.manager.compose.util.APK_MIMETYPE
import app.revanced.manager.compose.util.AppInfo
import app.revanced.manager.R
import app.revanced.manager.ui.component.AppIcon
import app.revanced.manager.ui.component.AppTopBar
import app.revanced.manager.ui.component.LoadingIndicator
import app.revanced.manager.ui.viewmodel.AppSelectorViewModel
import app.revanced.manager.util.APK_MIMETYPE
import app.revanced.manager.util.AppInfo
import org.koin.androidx.compose.getViewModel
@OptIn(ExperimentalMaterial3Api::class)

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen
package app.revanced.manager.ui.screen
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.layout.Column
@ -18,8 +18,8 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import app.revanced.manager.compose.R
import app.revanced.manager.compose.ui.component.AppTopBar
import app.revanced.manager.R
import app.revanced.manager.ui.component.AppTopBar
import kotlinx.coroutines.launch
enum class DashboardPage(

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen
package app.revanced.manager.ui.screen
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
@ -8,7 +8,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import app.revanced.manager.compose.R
import app.revanced.manager.R
@Composable
fun InstalledAppsScreen() {

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen
package app.revanced.manager.ui.screen
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.result.contract.ActivityResultContracts.CreateDocument
@ -28,13 +28,13 @@ import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.style.TextOverflow
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import app.revanced.manager.compose.R
import app.revanced.manager.compose.patcher.worker.StepGroup
import app.revanced.manager.compose.patcher.worker.StepStatus
import app.revanced.manager.compose.ui.component.AppScaffold
import app.revanced.manager.compose.ui.component.AppTopBar
import app.revanced.manager.compose.ui.viewmodel.InstallerViewModel
import app.revanced.manager.compose.util.APK_MIMETYPE
import app.revanced.manager.R
import app.revanced.manager.patcher.worker.StepGroup
import app.revanced.manager.patcher.worker.StepStatus
import app.revanced.manager.ui.component.AppScaffold
import app.revanced.manager.ui.component.AppTopBar
import app.revanced.manager.ui.viewmodel.InstallerViewModel
import app.revanced.manager.util.APK_MIMETYPE
import kotlin.math.floor
@OptIn(ExperimentalMaterial3Api::class)

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen
package app.revanced.manager.ui.screen
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.clickable
@ -21,12 +21,12 @@ import androidx.compose.ui.draw.alpha
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import app.revanced.manager.compose.R
import app.revanced.manager.compose.patcher.patch.PatchInfo
import app.revanced.manager.compose.ui.component.AppTopBar
import app.revanced.manager.compose.ui.component.GroupHeader
import app.revanced.manager.compose.ui.viewmodel.PatchesSelectorViewModel
import app.revanced.manager.compose.util.PatchesSelection
import app.revanced.manager.R
import app.revanced.manager.patcher.patch.PatchInfo
import app.revanced.manager.ui.component.AppTopBar
import app.revanced.manager.ui.component.GroupHeader
import app.revanced.manager.ui.viewmodel.PatchesSelectorViewModel
import app.revanced.manager.util.PatchesSelection
import kotlinx.coroutines.launch
const val allowUnsupported = false

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen
package app.revanced.manager.ui.screen
import android.annotation.SuppressLint
import android.content.Context
@ -35,11 +35,11 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import app.revanced.manager.compose.R
import app.revanced.manager.compose.ui.component.AppTopBar
import app.revanced.manager.compose.ui.destination.SettingsDestination
import app.revanced.manager.compose.ui.screen.settings.*
import app.revanced.manager.compose.ui.viewmodel.SettingsViewModel
import app.revanced.manager.R
import app.revanced.manager.ui.component.AppTopBar
import app.revanced.manager.ui.destination.SettingsDestination
import app.revanced.manager.ui.screen.settings.*
import app.revanced.manager.ui.viewmodel.SettingsViewModel
import dev.olshevski.navigation.reimagined.*
import org.koin.androidx.compose.getViewModel

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen
package app.revanced.manager.ui.screen
import androidx.compose.foundation.layout.*
import androidx.compose.material3.*
@ -7,10 +7,10 @@ import androidx.compose.runtime.saveable.rememberSaveable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import app.revanced.manager.compose.R
import app.revanced.manager.compose.ui.component.sources.NewSourceDialog
import app.revanced.manager.compose.ui.component.sources.SourceItem
import app.revanced.manager.compose.ui.viewmodel.SourcesViewModel
import app.revanced.manager.R
import app.revanced.manager.ui.component.sources.NewSourceDialog
import app.revanced.manager.ui.component.sources.SourceItem
import app.revanced.manager.ui.viewmodel.SourcesViewModel
import kotlinx.coroutines.launch
import org.koin.androidx.compose.getViewModel

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen.settings
package app.revanced.manager.ui.screen.settings
import androidx.compose.foundation.Image
import androidx.compose.foundation.border
@ -19,10 +19,10 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.unit.dp
import app.revanced.manager.compose.BuildConfig
import app.revanced.manager.compose.R
import app.revanced.manager.compose.ui.component.AppTopBar
import app.revanced.manager.compose.util.openUrl
import app.revanced.manager.BuildConfig
import app.revanced.manager.R
import app.revanced.manager.ui.component.AppTopBar
import app.revanced.manager.util.openUrl
import com.google.accompanist.drawablepainter.rememberDrawablePainter
@OptIn(ExperimentalMaterial3Api::class)

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen.settings
package app.revanced.manager.ui.screen.settings
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
@ -10,8 +10,8 @@ import androidx.compose.material3.Scaffold
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import app.revanced.manager.compose.R
import app.revanced.manager.compose.ui.component.AppTopBar
import app.revanced.manager.R
import app.revanced.manager.ui.component.AppTopBar
@OptIn(ExperimentalMaterial3Api::class)
@Composable

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen.settings
package app.revanced.manager.ui.screen.settings
import android.os.Build
import androidx.compose.foundation.clickable
@ -14,12 +14,12 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import app.revanced.manager.compose.R
import app.revanced.manager.compose.domain.manager.PreferencesManager
import app.revanced.manager.compose.ui.component.AppTopBar
import app.revanced.manager.compose.ui.component.GroupHeader
import app.revanced.manager.compose.ui.theme.Theme
import app.revanced.manager.compose.ui.viewmodel.SettingsViewModel
import app.revanced.manager.R
import app.revanced.manager.domain.manager.PreferencesManager
import app.revanced.manager.ui.component.AppTopBar
import app.revanced.manager.ui.component.GroupHeader
import app.revanced.manager.ui.theme.Theme
import app.revanced.manager.ui.viewmodel.SettingsViewModel
import org.koin.compose.koinInject
@OptIn(ExperimentalMaterial3Api::class)

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen.settings
package app.revanced.manager.ui.screen.settings
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Column
@ -13,9 +13,9 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import app.revanced.manager.compose.R
import app.revanced.manager.compose.ui.component.AppTopBar
import app.revanced.manager.compose.ui.component.GroupHeader
import app.revanced.manager.R
import app.revanced.manager.ui.component.AppTopBar
import app.revanced.manager.ui.component.GroupHeader
@OptIn(ExperimentalMaterial3Api::class)
@Composable

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.screen.settings
package app.revanced.manager.ui.screen.settings
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
@ -35,10 +35,10 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import app.revanced.manager.compose.R
import app.revanced.manager.compose.ui.component.AppTopBar
import app.revanced.manager.compose.ui.destination.SettingsDestination
import app.revanced.manager.compose.ui.viewmodel.UpdateSettingsViewModel
import app.revanced.manager.R
import app.revanced.manager.ui.component.AppTopBar
import app.revanced.manager.ui.destination.SettingsDestination
import app.revanced.manager.ui.viewmodel.UpdateSettingsViewModel
import dev.olshevski.navigation.reimagined.NavController
import dev.olshevski.navigation.reimagined.navigate
import org.koin.androidx.compose.getViewModel

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.theme
package app.revanced.manager.ui.theme
import androidx.compose.ui.graphics.Color

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.theme
package app.revanced.manager.ui.theme
import android.app.Activity
import android.os.Build
@ -10,7 +10,7 @@ import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.platform.LocalView
import androidx.core.view.WindowCompat
import app.revanced.manager.compose.R
import app.revanced.manager.R
private val DarkColorScheme = darkColorScheme(
primary = Purple80,

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.theme
package app.revanced.manager.ui.theme
import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle

View file

@ -1,10 +1,10 @@
package app.revanced.manager.compose.ui.viewmodel
package app.revanced.manager.ui.viewmodel
import android.app.Application
import android.content.pm.PackageInfo
import android.net.Uri
import androidx.lifecycle.ViewModel
import app.revanced.manager.compose.util.PM
import app.revanced.manager.util.PM
import java.io.File
import java.nio.file.Files

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.viewmodel
package app.revanced.manager.ui.viewmodel
import android.app.Application
import android.content.BroadcastReceiver
@ -15,17 +15,17 @@ import androidx.compose.runtime.setValue
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModel
import androidx.work.*
import app.revanced.manager.compose.R
import app.revanced.manager.compose.patcher.SignerService
import app.revanced.manager.compose.patcher.worker.PatcherProgressManager
import app.revanced.manager.compose.patcher.worker.PatcherWorker
import app.revanced.manager.compose.patcher.worker.StepGroup
import app.revanced.manager.compose.service.InstallService
import app.revanced.manager.compose.service.UninstallService
import app.revanced.manager.compose.util.AppInfo
import app.revanced.manager.compose.util.PM
import app.revanced.manager.compose.util.PatchesSelection
import app.revanced.manager.compose.util.toast
import app.revanced.manager.R
import app.revanced.manager.patcher.SignerService
import app.revanced.manager.patcher.worker.PatcherProgressManager
import app.revanced.manager.patcher.worker.PatcherWorker
import app.revanced.manager.patcher.worker.StepGroup
import app.revanced.manager.service.InstallService
import app.revanced.manager.service.UninstallService
import app.revanced.manager.util.AppInfo
import app.revanced.manager.util.PM
import app.revanced.manager.util.PatchesSelection
import app.revanced.manager.util.toast
import kotlinx.serialization.encodeToString
import kotlinx.serialization.json.Json
import org.koin.core.component.KoinComponent

View file

@ -1,9 +1,9 @@
package app.revanced.manager.compose.ui.viewmodel
package app.revanced.manager.ui.viewmodel
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import app.revanced.manager.compose.domain.repository.SourceRepository
import app.revanced.manager.compose.util.PM
import app.revanced.manager.domain.repository.SourceRepository
import app.revanced.manager.util.PM
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.ui.viewmodel
package app.revanced.manager.ui.viewmodel
import androidx.compose.runtime.Stable
import androidx.compose.runtime.getValue
@ -6,10 +6,10 @@ import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import androidx.lifecycle.ViewModel
import app.revanced.manager.compose.domain.repository.SourceRepository
import app.revanced.manager.compose.patcher.patch.PatchInfo
import app.revanced.manager.compose.util.AppInfo
import app.revanced.manager.compose.util.PatchesSelection
import app.revanced.manager.domain.repository.SourceRepository
import app.revanced.manager.patcher.patch.PatchInfo
import app.revanced.manager.util.AppInfo
import app.revanced.manager.util.PatchesSelection
import kotlinx.coroutines.flow.map
import org.koin.core.component.KoinComponent
import org.koin.core.component.get

View file

@ -1,8 +1,8 @@
package app.revanced.manager.compose.ui.viewmodel
package app.revanced.manager.ui.viewmodel
import androidx.lifecycle.ViewModel
import app.revanced.manager.compose.domain.manager.PreferencesManager
import app.revanced.manager.compose.ui.theme.Theme
import app.revanced.manager.domain.manager.PreferencesManager
import app.revanced.manager.ui.theme.Theme
class SettingsViewModel(
val prefs: PreferencesManager

View file

@ -1,14 +1,14 @@
package app.revanced.manager.compose.ui.viewmodel
package app.revanced.manager.ui.viewmodel
import android.app.Application
import android.content.ContentResolver
import android.net.Uri
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import app.revanced.manager.compose.R
import app.revanced.manager.compose.domain.sources.Source
import app.revanced.manager.compose.domain.repository.SourceRepository
import app.revanced.manager.compose.util.uiSafe
import app.revanced.manager.R
import app.revanced.manager.domain.sources.Source
import app.revanced.manager.domain.repository.SourceRepository
import app.revanced.manager.util.uiSafe
import io.ktor.http.*
import kotlinx.coroutines.launch

View file

@ -1,10 +1,10 @@
package app.revanced.manager.compose.ui.viewmodel
package app.revanced.manager.ui.viewmodel
import android.os.Environment
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import app.revanced.manager.compose.network.api.ManagerAPI
import app.revanced.manager.compose.util.PM
import app.revanced.manager.network.api.ManagerAPI
import app.revanced.manager.util.PM
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import java.io.File

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.util
package app.revanced.manager.util
private const val team = "revanced"
const val ghOrganization = "https://github.com/$team"

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.util
package app.revanced.manager.util
import android.annotation.SuppressLint
import android.app.Application
@ -12,9 +12,9 @@ import android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES
import android.os.Build
import android.os.Parcelable
import androidx.compose.runtime.Immutable
import app.revanced.manager.compose.domain.repository.SourceRepository
import app.revanced.manager.compose.service.InstallService
import app.revanced.manager.compose.service.UninstallService
import app.revanced.manager.domain.repository.SourceRepository
import app.revanced.manager.service.InstallService
import app.revanced.manager.service.UninstallService
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.util
package app.revanced.manager.util
import android.content.Context
import android.content.Intent

View file

@ -1,7 +1,7 @@
package app.revanced.manager.compose.util.signing
package app.revanced.manager.util.signing
import android.util.Log
import app.revanced.manager.compose.util.tag
import app.revanced.manager.util.tag
import com.android.apksig.ApkSigner
import org.bouncycastle.asn1.x500.X500Name
import org.bouncycastle.asn1.x509.SubjectPublicKeyInfo

View file

@ -1,4 +1,4 @@
package app.revanced.manager.compose.util.signing
package app.revanced.manager.util.signing
data class SigningOptions(
val cn: String,