[Android] Enable access to up-to-date tzdata on Android 10+ (#20350)
commitabfd341464b32d5cd914c5f3ffde6c8cd8dc10ca
authormonojenkins <jo.shields+jenkins@xamarin.com>
Fri, 4 Sep 2020 18:56:21 +0000 (4 14:56 -0400)
committerGitHub <noreply@github.com>
Fri, 4 Sep 2020 18:56:21 +0000 (4 20:56 +0200)
tree394c9b2a3c9011f77597729619212aa34e71222f
parent32c0b1aaf9e9351aaff6f028787a525dac94036a
[Android] Enable access to up-to-date tzdata on Android 10+ (#20350)

Context: https://source.android.com/devices/architecture/modular-system/runtime#time-zone-data-interactions
Context: https://source.android.com/devices/tech/config/timezone-rules#timezone-apex
Maybe Fixes: https://github.com/xamarin/xamarin-android/issues/5080

Add support to read ICANN timezone data from two new locations found on
devices running Android 10+.  The data in the previously searched
location still exists but it's most likely out of date.

On Android 10+ tzdata updates will be derived via an APEX TimeData
package update, whose data directory this commit sets as the first
location to be searched.

This commit potentially fixes the Xamarin.Android issue mentioned above.
"Potentially" because I can't be sure this is what's causing it since
I'm unable to reproduce the issue locally.  However, out-of-date tz
database seems to be the most probable cause.

Co-authored-by: Marek Habersack <grendel@twistedcode.net>
mcs/class/corlib/System/TimeZoneInfo.Android.cs