From 182972ce4a28c9962558565d33941ef62e55e4c7 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Wed, 16 Oct 2024 15:47:42 +0530 Subject: [PATCH] [mob][photos] Add delay before calling setHideAppContent in init of LockScreenSettings to check whether 'lateinit property activity has not been initialized' PlatformExecption goes away --- mobile/lib/utils/lock_screen_settings.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mobile/lib/utils/lock_screen_settings.dart b/mobile/lib/utils/lock_screen_settings.dart index b08f77f4c8..2912e60ea5 100644 --- a/mobile/lib/utils/lock_screen_settings.dart +++ b/mobile/lib/utils/lock_screen_settings.dart @@ -33,6 +33,10 @@ class LockScreenSettings { _secureStorage = const FlutterSecureStorage(); _preferences = prefs; + /// Workaround to check if "lateinit property activity has not been + /// initialized" PlatformException goes away. + await Future.delayed(const Duration(milliseconds: 500)); + ///Workaround for privacyScreen not working when app is killed and opened. await setHideAppContent(getShouldHideAppContent()); }