Compressor 1.6.4 - redistribution notices Original developer: JoshAtticus Source repository: https://github.com/JoshAtticus/Compressor Source tag: 1.6.4 Tag object: 1fc9aa6f6849396b0eeede2339ef6039908b63b8 Declared license: MIT Corresponding source retained: no (not required by this permissive license) APK redistributed without modification. Store media is normalized without cropping. FILE: Compressor-1.6.4/LICENSE MIT License Copyright (c) 2026 JoshAtticus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. FILE: Compressor-1.6.4/app/src/main/java/compress/joshattic/us/ui/screens/settings/LicensesScreen.kt package compress.joshattic.us.ui.screens.settings import androidx.compose.foundation.background import androidx.compose.foundation.clickable import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.verticalScroll import androidx.compose.material.icons.Icons import androidx.compose.material.icons.automirrored.filled.ArrowBack import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.LargeTopAppBar import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Scaffold import androidx.compose.material3.Surface import androidx.compose.material3.Text import androidx.compose.material3.TopAppBarDefaults import androidx.compose.runtime.Composable import androidx.compose.runtime.remember import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.input.nestedscroll.nestedScroll import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import compress.joshattic.us.R import com.mikepenz.aboutlibraries.Libs import com.mikepenz.aboutlibraries.entity.Library @OptIn(ExperimentalMaterial3Api::class) @Composable fun LicensesScreen(onBack: () -> Unit) { val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior() val uriHandler = LocalUriHandler.current val context = LocalContext.current val libraries = remember { runCatching { val data = context.resources.openRawResource(R.raw.aboutlibraries) .bufferedReader() .use { it.readText() } Libs.Builder() .withJson(data) .build() .libraries }.getOrDefault(emptyList()) } Scaffold( modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection), containerColor = MaterialTheme.colorScheme.background, topBar = { LargeTopAppBar( title = { Text( stringResource(R.string.open_source_licenses), fontWeight = FontWeight.Bold, modifier = Modifier.padding(start = 10.dp) ) }, navigationIcon = { Box(modifier = Modifier.padding(start = 12.dp, end = 12.dp)) { IconButton( onClick = onBack, modifier = Modifier .size(40.dp) .clip(CircleShape) .background(MaterialTheme.colorScheme.onSurface.copy(alpha = 0.08f)) ) { Icon( imageVector = Icons.AutoMirrored.Filled.ArrowBack, contentDescription = stringResource(R.string.back), tint = MaterialTheme.colorScheme.onSurface ) } } }, scrollBehavior = scrollBehavior, colors = TopAppBarDefaults.largeTopAppBarColors( containerColor = MaterialTheme.colorScheme.background, scrolledContainerColor = MaterialTheme.colorScheme.surface ) ) } ) { innerPadding -> Column( modifier = Modifier .fillMaxSize() .padding(innerPadding) .verticalScroll(rememberScrollState()) .padding(horizontal = 16.dp, vertical = 8.dp) ) { Surface( modifier = Modifier .fillMaxWidth() .padding(bottom = 32.dp), shape = RoundedCornerShape(32.dp), color = MaterialTheme.colorScheme.surfaceContainer ) { Column { libraries.forEachIndexed { index, library -> if (index > 0) { HorizontalDivider( modifier = Modifier.padding(horizontal = 20.dp), color = MaterialTheme.colorScheme.outlineVariant.copy(alpha = 0.4f) ) } LibraryLicenseRow(library = library, onOpenUrl = { uriHandler.openUri(it) }) } } } } } } @Composable private fun LibraryLicenseRow(library: Library, onOpenUrl: (String) -> Unit) { val metadata = remember(library.uniqueId, library.artifactVersion) { buildString { library.artifactVersion?.takeIf { it.isNotBlank() }?.let { append(it) } val licenseNames = library.licenses .mapNotNull { license -> license.name.takeIf { it.isNotBlank() } } if (licenseNames.isNotEmpty()) { if (isNotEmpty()) append(" • ") append(licenseNames.joinToString(", ")) } } } val linkUrl = remember(library.uniqueId) { library.website?.takeIf { it.isNotBlank() } ?: library.scm?.url?.takeIf { it.isNotBlank() } ?: library.licenses.firstNotNullOfOrNull { it.url?.takeIf { url -> url.isNotBlank() } } } Column( modifier = Modifier .fillMaxWidth() .then( if (linkUrl != null) { Modifier.clickable { onOpenUrl(linkUrl) } } else { Modifier } ) .padding(horizontal = 20.dp, vertical = 14.dp) ) { Text( text = library.name.ifBlank { library.uniqueId }, style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.Bold, color = MaterialTheme.colorScheme.onSurface ) Spacer(modifier = Modifier.height(2.dp)) Text( text = metadata, style = MaterialTheme.typography.bodyMedium, fontWeight = FontWeight.SemiBold, color = MaterialTheme.colorScheme.onSurfaceVariant ) } }