From 0bdb02b2ba55b7a5f3ebdd80ad65ad70431db132 Mon Sep 17 00:00:00 2001 From: Adam Velebil Date: Thu, 9 Jan 2025 15:35:03 +0100 Subject: [PATCH 1/3] target sdk 35 --- android/build.gradle | 4 ++-- android/flutter_plugins/qrscanner_zxing/android/build.gradle | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 92bf1bceb..0a288bfa6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,8 +6,8 @@ allprojects { project.ext { minSdkVersion = 21 - targetSdkVersion = 34 - compileSdkVersion = 34 + targetSdkVersion = 35 + compileSdkVersion = 35 yubiKitVersion = "2.7.0" junitVersion = "4.13.2" diff --git a/android/flutter_plugins/qrscanner_zxing/android/build.gradle b/android/flutter_plugins/qrscanner_zxing/android/build.gradle index 9e34f8827..90b9009cb 100644 --- a/android/flutter_plugins/qrscanner_zxing/android/build.gradle +++ b/android/flutter_plugins/qrscanner_zxing/android/build.gradle @@ -28,7 +28,7 @@ android { namespace 'com.yubico.authenticator.flutter_plugins.qrscanner_zxing' - compileSdk 34 + compileSdk 35 compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 @@ -45,7 +45,7 @@ android { defaultConfig { minSdkVersion 21 - targetSdk 34 + targetSdk 35 } } From bc11602594b25d91053f79b2d1e8e9954f205858 Mon Sep 17 00:00:00 2001 From: Adam Velebil Date: Thu, 9 Jan 2025 15:35:25 +0100 Subject: [PATCH 2/3] fix UnsafeIntentLaunchViolation --- .../flutter_plugins/qrscanner_zxing/QRScannerView.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android/flutter_plugins/qrscanner_zxing/android/src/main/kotlin/com/yubico/authenticator/flutter_plugins/qrscanner_zxing/QRScannerView.kt b/android/flutter_plugins/qrscanner_zxing/android/src/main/kotlin/com/yubico/authenticator/flutter_plugins/qrscanner_zxing/QRScannerView.kt index 998e34bb0..6838b0d40 100644 --- a/android/flutter_plugins/qrscanner_zxing/android/src/main/kotlin/com/yubico/authenticator/flutter_plugins/qrscanner_zxing/QRScannerView.kt +++ b/android/flutter_plugins/qrscanner_zxing/android/src/main/kotlin/com/yubico/authenticator/flutter_plugins/qrscanner_zxing/QRScannerView.kt @@ -430,7 +430,9 @@ internal class QRScannerView( if (cameraOpened && t.type == CameraState.Type.CLOSED) { Log.v(TAG, "Camera closed") val stateChangedIntent = - Intent("com.yubico.authenticator.QRScannerView.CameraClosed") + Intent("com.yubico.authenticator.QRScannerView.CameraClosed").apply { + setPackage("com.yubico.yubioath") + } context.sendBroadcast(stateChangedIntent) cameraOpened = false } From 845f0a292c5f8d131459af18c452b0e62e0d366e Mon Sep 17 00:00:00 2001 From: Adam Velebil Date: Fri, 10 Jan 2025 11:09:34 +0100 Subject: [PATCH 3/3] fix window insets --- lib/app/views/app_page.dart | 122 ++++++++++++++++++------------------ 1 file changed, 62 insertions(+), 60 deletions(-) diff --git a/lib/app/views/app_page.dart b/lib/app/views/app_page.dart index bd309567f..d5fb99a5c 100755 --- a/lib/app/views/app_page.dart +++ b/lib/app/views/app_page.dart @@ -544,75 +544,77 @@ class _AppPageState extends ConsumerState { Actions.invoke(context, const EscapeIntent()); FocusManager.instance.primaryFocus?.unfocus(); }, - child: Row( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - if (hasRail && (!fullyExpanded || !showNavigation)) - SizedBox( - width: 72, - child: _VisibilityListener( - targetKey: _navKey, - controller: _navController, - child: SingleChildScrollView( - child: NavigationContent( - key: _navKey, - shouldPop: false, - extended: false, - ), - ), - ), - ), - if (fullyExpanded && showNavigation) - SizedBox( - width: 280, + child: SafeArea( + child: Row( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + if (hasRail && (!fullyExpanded || !showNavigation)) + SizedBox( + width: 72, child: _VisibilityListener( + targetKey: _navKey, controller: _navController, - targetKey: _navExpandedKey, child: SingleChildScrollView( - child: Material( - type: MaterialType.transparency, - child: NavigationContent( - key: _navExpandedKey, - shouldPop: false, - extended: true, - ), + child: NavigationContent( + key: _navKey, + shouldPop: false, + extended: false, ), ), - )), - const SizedBox(width: 8), - Expanded(child: body), - if (hasManage && - !hasDetailsOrKeyActions && - showDetailView && - widget.capabilities != null && - widget.capabilities?.first != Capability.u2f) - // Add a placeholder for the Manage/Details column. Exceptions are: - // - the "Security Key" because it does not have any actions/details. - // - pages without Capabilities - const SizedBox(width: 336), // simulate column - if (hasManage && hasDetailsOrKeyActions && showDetailView) - _VisibilityListener( - controller: _detailsController, - targetKey: _detailsViewGlobalKey, - child: SingleChildScrollView( - child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8), - child: SizedBox( - width: 320, - child: Column( - key: _detailsViewGlobalKey, - children: [ - if (widget.detailViewBuilder != null) - widget.detailViewBuilder!(context), - if (widget.keyActionsBuilder != null) - widget.keyActionsBuilder!(context), - ], + ), + ), + if (fullyExpanded && showNavigation) + SizedBox( + width: 280, + child: _VisibilityListener( + controller: _navController, + targetKey: _navExpandedKey, + child: SingleChildScrollView( + child: Material( + type: MaterialType.transparency, + child: NavigationContent( + key: _navExpandedKey, + shouldPop: false, + extended: true, + ), + ), + ), + )), + const SizedBox(width: 8), + Expanded(child: body), + if (hasManage && + !hasDetailsOrKeyActions && + showDetailView && + widget.capabilities != null && + widget.capabilities?.first != Capability.u2f) + // Add a placeholder for the Manage/Details column. Exceptions are: + // - the "Security Key" because it does not have any actions/details. + // - pages without Capabilities + const SizedBox(width: 336), // simulate column + if (hasManage && hasDetailsOrKeyActions && showDetailView) + _VisibilityListener( + controller: _detailsController, + targetKey: _detailsViewGlobalKey, + child: SingleChildScrollView( + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 8), + child: SizedBox( + width: 320, + child: Column( + key: _detailsViewGlobalKey, + children: [ + if (widget.detailViewBuilder != null) + widget.detailViewBuilder!(context), + if (widget.keyActionsBuilder != null) + widget.keyActionsBuilder!(context), + ], + ), ), ), ), ), - ), - ], + ], + ), ), ); }