Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions app/src/main/java/si/maev/twa/LauncherActivity.kt
Original file line number Diff line number Diff line change
@@ -1,39 +1,23 @@
package si.maev.twa

import android.content.Context
import android.content.Intent
import android.net.ConnectivityManager
import android.net.NetworkCapabilities
import android.net.Uri
import android.os.Bundle
import android.widget.Button
import androidx.browser.customtabs.CustomTabsCallback
import androidx.browser.customtabs.CustomTabsCallback.NAVIGATION_FINISHED
import androidx.core.content.FileProvider
import androidx.core.content.edit
import androidx.core.net.toUri
import com.google.androidbrowserhelper.trusted.QualityEnforcer
import com.google.androidbrowserhelper.trusted.SessionStore
import com.google.androidbrowserhelper.trusted.SharedPreferencesTokenStore
import java.io.File
import java.lang.ref.WeakReference

class LauncherActivity : com.google.androidbrowserhelper.trusted.LauncherActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
// Chrome 152+ rejects the splash image unless this app holds a grant on it, and Android
// records no grant for the provider's owner without the persistable flag. Remove once
// https://github.com/GoogleChrome/android-browser-helper/issues/623 ships a fix.
// The path mirrors the library's internal `SplashImageTransferTask` constants.
grantUriPermission(
packageName,
FileProvider.getUriForFile(
this,
getString(R.string.providerAuthority),
File(filesDir, "twa_splash/splash_image.png"),
),
Intent.FLAG_GRANT_READ_URI_PERMISSION or Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION,
)
super.onCreate(savedInstanceState)
if (isFinishing) return

Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[versions]
agp = "9.5.2"
abh = "2.7.4"
abh = "2.8.0"
abhLocationDelegation = "1.1.2"
playPublisher = "4.1.2"

Expand Down
Loading