@@ -63,10 +63,10 @@ public class ApplicationStarter {
6363
6464 //~ Statische Felder/Initialisierungen --------------------------------
6565
66- private static final String VERSION = "v4.4.4 -2019c" ;
66+ private static final String VERSION = "v4.4.5 -2019c" ;
6767 private static final int RELEASE_YEAR = 2020 ;
68- private static final int RELEASE_MONTH = 1 ;
69- private static final int RELEASE_DAY = 15 ;
68+ private static final int RELEASE_MONTH = 4 ;
69+ private static final int RELEASE_DAY = 20 ;
7070 private static final String TIME4A = "TIME4A" ;
7171
7272 private static final AtomicBoolean PREPARED = new AtomicBoolean (false );
@@ -119,43 +119,7 @@ public static void initialize(
119119
120120 initialize (
121121 context ,
122- prefetch
123- ? new Runnable () {
124- @ Override
125- public void run () {
126- long start2 = System .nanoTime ();
127- int offset =
128- TimeZone .getDefault ().getOffset (System .currentTimeMillis ()) / 1000 ;
129- TZID tzid = ZonalOffset .ofTotalSeconds (offset );
130- Locale sysloc = Locale .getDefault ();
131- DisplayMode style = DisplayMode .FULL ;
132- try {
133- Moment moment = SystemClock .currentMoment ();
134- tzid = Timezone .ofSystem ().getID ();
135- Log .i (TIME4A , "System time zone at start: [" + tzid .canonical () + "]" );
136- Log .i (TIME4A , "System locale at start: [" + sysloc .toString () + "]" );
137- String currentTime =
138- ChronoFormatter .ofMomentStyle (
139- style ,
140- style ,
141- sysloc ,
142- tzid
143- ).format (moment );
144- Log .i (TIME4A , currentTime );
145- } catch (Throwable thr ) {
146- Log .e (
147- TIME4A ,
148- "Error on prefetch thread with: time zone="
149- + tzid .canonical ()
150- + ", locale=" + sysloc + "!" ,
151- thr );
152- throw new IllegalStateException (thr ); // rethrow for Google Play Store etc.
153- }
154- long delta = (System .nanoTime () - start2 ) / 1000000 ;
155- Log .i (TIME4A , "Prefetch thread consumed (in ms): " + delta );
156- }
157- }
158- : null
122+ prefetch ? new StdPrefetch () : null
159123 );
160124
161125 }
@@ -305,4 +269,45 @@ public void onReceive(Context context, Intent intent) {
305269
306270 }
307271
272+ private static class StdPrefetch
273+ implements Runnable {
274+
275+ //~ Methoden ------------------------------------------------------
276+
277+ @ Override
278+ public void run () {
279+ long start2 = System .nanoTime ();
280+ int offset = TimeZone .getDefault ().getOffset (System .currentTimeMillis ()) / 1000 ;
281+ TZID tzid = ZonalOffset .ofTotalSeconds (offset );
282+ Locale sysloc = Locale .getDefault ();
283+
284+ try {
285+ Moment moment = SystemClock .currentMoment ();
286+ tzid = Timezone .ofSystem ().getID ();
287+ Log .i (TIME4A , "System time zone at start: [" + tzid .canonical () + "]" );
288+ Log .i (TIME4A , "System locale at start: [" + sysloc .toString () + "]" );
289+ String currentTime =
290+ ChronoFormatter .ofMomentStyle (
291+ DisplayMode .FULL ,
292+ DisplayMode .FULL ,
293+ sysloc ,
294+ tzid
295+ ).format (moment );
296+ Log .i (TIME4A , currentTime );
297+ } catch (Throwable thr ) {
298+ Log .e (
299+ TIME4A ,
300+ "Error on prefetch thread with: time zone="
301+ + tzid .canonical ()
302+ + ", locale=" + sysloc + "!" ,
303+ thr );
304+ throw new IllegalStateException (thr ); // rethrow for Google Play Store etc.
305+ }
306+
307+ long delta = (System .nanoTime () - start2 ) / 1000000 ;
308+ Log .i (TIME4A , "Prefetch thread consumed (in ms): " + delta );
309+ }
310+
311+ }
312+
308313}
0 commit comments