diff --git a/app/src/main/kotlin/com/x8bit/bitwarden/MainActivity.kt b/app/src/main/kotlin/com/x8bit/bitwarden/MainActivity.kt index 2d2ae7d38e..81292d3c51 100644 --- a/app/src/main/kotlin/com/x8bit/bitwarden/MainActivity.kt +++ b/app/src/main/kotlin/com/x8bit/bitwarden/MainActivity.kt @@ -43,8 +43,6 @@ import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.flow.map import javax.inject.Inject -private const val ANDROID_15_BUG_MAX_REVISION: Int = 241007 - /** * Primary entry point for the application. */ @@ -217,35 +215,7 @@ class MainActivity : AppCompatActivity() { } private fun handleRecreate() { - val isOldAndroidBuildRevision = { - // This fetches the date portion of the ID in order to determine the revision of - // Android 15 being used and whether we want to use the `recreate` API or not. - // If we fail to parse a date, we assume it is not an old revision. - "\\.([^.]+)\\." - .toRegex() - .find(Build.ID) - ?.groups - ?.get(1) - ?.value - ?.toIntOrNull() - ?.let { it <= ANDROID_15_BUG_MAX_REVISION } == true - } - if (Build.VERSION.SDK_INT == Build.VERSION_CODES.VANILLA_ICE_CREAM && - isOldAndroidBuildRevision() - ) { - // This is done to avoid a bug in specific older revisions of Android 15. The bug has - // been fixed but certain phones that are no longer supported will never get the fix. - // The OS bug is tracked here: https://issuetracker.google.com/issues/370180732 - startActivity( - Intent - .makeMainActivity(componentName) - .addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION), - ) - finish() - overrideActivityTransition(OVERRIDE_TRANSITION_CLOSE, 0, 0) - } else { - ActivityCompat.recreate(this) - } + ActivityCompat.recreate(this) } private fun updateScreenCapture(isScreenCaptureAllowed: Boolean) {