diff --git a/app/src/main/java/com/edricchan/studybuddy/utils/Intents.kt b/app/src/main/java/com/edricchan/studybuddy/utils/Intents.kt index f696ee29..7a7da9f9 100644 --- a/app/src/main/java/com/edricchan/studybuddy/utils/Intents.kt +++ b/app/src/main/java/com/edricchan/studybuddy/utils/Intents.kt @@ -1,11 +1,9 @@ package com.edricchan.studybuddy.utils -import android.content.Context import android.provider.Settings import androidx.core.net.toUri import com.edricchan.studybuddy.BuildConfig import com.edricchan.studybuddy.exts.android.buildIntent -import com.edricchan.studybuddy.ui.common.licenses.OssLicensesCompatActivity /** Creates an [android.content.Intent] that opens the given [packageName]'s app details. */ fun appDetailsIntent(packageName: String = BuildConfig.APPLICATION_ID) = buildIntent { @@ -18,12 +16,3 @@ fun appDetailsIntent(packageName: String = BuildConfig.APPLICATION_ID) = buildIn * @receiver The package name to use. */ val String.appDetailsIntent get() = appDetailsIntent(this) - -/** - * Creates an [android.content.Intent] that opens the - * [licenses activity][OssLicensesCompatActivity]. - */ -@Suppress("DeprecatedCallableAddReplaceWith") -@Deprecated("Use the LibrariesContainer composable if possible") -val Context.licenseIntent - get() = buildIntent(this) diff --git a/ui/common/src/main/AndroidManifest.xml b/ui/common/src/main/AndroidManifest.xml index cb5ed514..8072ee00 100644 --- a/ui/common/src/main/AndroidManifest.xml +++ b/ui/common/src/main/AndroidManifest.xml @@ -1,9 +1,2 @@ - - - - - - + diff --git a/ui/common/src/main/kotlin/com/edricchan/studybuddy/ui/common/licenses/OssLicensesCompatActivity.kt b/ui/common/src/main/kotlin/com/edricchan/studybuddy/ui/common/licenses/OssLicensesCompatActivity.kt deleted file mode 100644 index 57438d67..00000000 --- a/ui/common/src/main/kotlin/com/edricchan/studybuddy/ui/common/licenses/OssLicensesCompatActivity.kt +++ /dev/null @@ -1,53 +0,0 @@ -package com.edricchan.studybuddy.ui.common.licenses - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.activity.enableEdgeToEdge -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.LargeTopAppBar -import androidx.compose.material3.Scaffold -import androidx.compose.material3.Text -import androidx.compose.material3.TopAppBarDefaults -import androidx.compose.ui.Modifier -import androidx.compose.ui.input.nestedscroll.nestedScroll -import androidx.compose.ui.res.stringResource -import com.edricchan.studybuddy.ui.common.R -import com.edricchan.studybuddy.ui.theming.compose.StudyBuddyTheme -import com.edricchan.studybuddy.ui.widgets.compose.BackIconButton -import com.mikepenz.aboutlibraries.ui.compose.m3.LibrariesContainer - -@Deprecated( - "For interop for existing views-based UIs; " + - "consider using LibrariesContainer directly if possible" -) -class OssLicensesCompatActivity : ComponentActivity() { - @OptIn(ExperimentalMaterial3Api::class) - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - - enableEdgeToEdge() - - setContent { - val scrollBehavior = TopAppBarDefaults.exitUntilCollapsedScrollBehavior() - StudyBuddyTheme { - Scaffold( - topBar = { - LargeTopAppBar( - title = { Text(text = stringResource(R.string.activity_license_title)) }, - navigationIcon = { - BackIconButton(onClick = ::finish) - }, - scrollBehavior = scrollBehavior - ) - } - ) { - LibrariesContainer( - modifier = Modifier.nestedScroll(scrollBehavior.nestedScrollConnection), - contentPadding = it - ) - } - } - } - } -}