File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -7,19 +7,22 @@ namespace DIPS.Xamarin.UI.Android
77 /// </summary>
88 public static class Library
99 {
10+ private static bool s_isInitialized ;
1011
1112 /// <summary>
1213 /// Method to call at startup of the app in order to keep assemblies and to run other initializing methods in the library
1314 /// </summary>
1415 public static void Initialize ( )
1516 {
17+ if ( s_isInitialized ) return ;
1618 Inspector . Instance = new Util . Inspector ( ) ;
1719 InternalDatePickerRenderer . Initialize ( ) ;
1820 InternalButtonRenderer . Initialize ( ) ;
1921
2022 var vibrationService = new VibrationService ( ) ;
2123 Vibration . Vibration . Initialize ( vibrationService ) ;
2224 VibrationService . Initialize ( ) ;
25+ s_isInitialized = true ;
2326 }
2427 }
2528}
Original file line number Diff line number Diff line change @@ -9,17 +9,21 @@ namespace DIPS.Xamarin.UI.iOS
99 /// </summary>
1010 public static class Library
1111 {
12+ private static bool s_isInitialized ;
13+
1214 /// <summary>
1315 /// Method to call at startup of the app in order to keep assemblies and to run other initializing methods in the library
1416 /// </summary>
1517 public static void Initialize ( )
1618 {
19+ if ( s_isInitialized ) return ;
1720 DIPS . Xamarin . UI . Internal . Utilities . Inspector . Instance = new Inspector ( ) ;
1821 InternalDatePickerRenderer . Initialize ( ) ;
1922
2023 var vibrationService = new VibrationService ( ) ;
2124 Vibration . Vibration . Initialize ( vibrationService ) ;
2225 VibrationService . Initialize ( ) ;
26+ s_isInitialized = true ;
2327 }
2428 }
2529}
You can’t perform that action at this time.
0 commit comments