diff --git a/app/build.gradle b/app/build.gradle index 93cd7f8931a42df802b481ee8b7a1d6a687bfbb8..bbfdd10baa729e4548d80e399bdf8c3ff8c05d97 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -135,6 +135,7 @@ dependencies { implementation 'com.google.android.flexbox:flexbox:3.0.0' implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'com.google.android.material:material:1.6.1' + implementation 'androidx.work:work-runtime-ktx:2.7.1' def room_version = '2.4.3' implementation "androidx.room:room-runtime:$room_version" diff --git a/app/src/main/java/at/bitfire/davdroid/ui/setup/GoogleAuthenticatorFragment.kt b/app/src/main/java/at/bitfire/davdroid/ui/setup/GoogleAuthenticatorFragment.kt index 8e8401d0aa1821f33065a842e55936a139c92547..01d1d82a5c1f3c9681ac035199194b81bc250fd6 100644 --- a/app/src/main/java/at/bitfire/davdroid/ui/setup/GoogleAuthenticatorFragment.kt +++ b/app/src/main/java/at/bitfire/davdroid/ui/setup/GoogleAuthenticatorFragment.kt @@ -22,6 +22,7 @@ import android.content.Context import android.content.Intent import android.net.ConnectivityManager import android.os.AsyncTask +import android.os.Build import android.os.Bundle import android.os.Handler import android.os.Looper @@ -200,7 +201,12 @@ class GoogleAuthenticatorFragment : Fragment(), AuthorizationService.TokenRespon intent.putExtra(LoginActivity.OPEN_APP_PACKAGE_AFTER_AUTH, requireActivity().intent.getStringExtra(LoginActivity.OPEN_APP_PACKAGE_AFTER_AUTH)) intent.putExtra(LoginActivity.OPEN_APP_ACTIVITY_AFTER_AUTH, requireActivity().intent.getStringExtra(LoginActivity.OPEN_APP_ACTIVITY_AFTER_AUTH)) - return PendingIntent.getActivity(context, request.hashCode(), intent, 0) + var flag = 0 + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { + flag = flag or PendingIntent.FLAG_MUTABLE + } + + return PendingIntent.getActivity(context, request.hashCode(), intent, flag) } private fun exchangeAuthorizationCode(authorizationResponse: AuthorizationResponse) {