Skip to content

Commit 1435483

Browse files
committed
version update including debug infos
1 parent 038669c commit 1435483

File tree

5 files changed

+54
-47
lines changed

5 files changed

+54
-47
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
## [v4.5-2020a] not yet released
2+
3+
## [v4.4.5-2019c] published on 2020-04-20
24
### Added
35
- Make PatternType.CLDR_DATE being applicable on PlainDate [#889]
46

57
### Fixed
6-
- Crash during app initialization (rare case) [#894]
8+
- Crash during app initialization (rare case) [#894 + #897]
79
- Incorrect sign in last term of calculation of mean lunar anomaly [#891]
810

911
## [v4.4.4-2019c] published on 2020-01-15
1012
### Changed
11-
- Update of Android version dependencies
13+
- Update of Android version dependencies [PR #2]
1214

1315
## [v4.4.3-2019c] published on 2019-11-04
1416
### Added

NOTICE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Time4A Code
2-
Copyright 2018-2019 Meno Hochschild
2+
Copyright 2018-2020 Meno Hochschild
33

44
This product includes software derived from the
55
Time4J-project (https://github.com/MenoData/Time4J/).

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Only two steps are required before coding against the API of Time4A.
3232

3333
```groovy
3434
dependencies {
35-
implementation group: 'net.time4j', name: 'time4j-android', version: '4.4.4-2019c'
35+
implementation group: 'net.time4j', name: 'time4j-android', version: '4.4.5-2019c'
3636
}
3737
```
3838

time4j-android/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ext {
1313
siteUrl = 'https://github.com/menodata/Time4A'
1414
gitUrl = 'https://github.com/menodata/Time4A.git'
1515

16-
libraryVersion = '4.4.4-2019c'
16+
libraryVersion = '4.4.5-2019c'
1717

1818
developerId = 'mhochschild'
1919
developerName = 'Meno Hochschild'
@@ -26,8 +26,8 @@ ext {
2626

2727
gradle.projectsEvaluated {
2828
tasks.withType(JavaCompile) {
29-
options.debug = false
30-
options.debugOptions.debugLevel = "source"
29+
options.debug = true
30+
options.debugOptions.debugLevel = "source,lines"
3131
options.compilerArgs << "-Xlint:deprecation"
3232
}
3333
}

time4j-android/src/main/java/net/time4j/android/ApplicationStarter.java

Lines changed: 45 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)