This reverts commit 4e013233b8.
Issue was in unexpected returned fd and errno value combination.
See comments in bionic.cpp and time_test.cpp.
Bug: 236967833
Fix: 236967833
Test: atest CtsBionicTestCases
Test: atest toybox-tests
Change-Id: I51b3e1527ff16b2a6ea4d6fedf8102019f7fd896
That was place where APK update mechanism placed tzdata file. Now
the mechanism is removed, so no need to look for tzdata there.
Bug: 148144561
Test: atest CtsBionicTestCases
Test: atest BionicTzdbConsistencyTest
Change-Id: I584400a75651cf24a25df74c7007fcd584838395
It's a historical accident that we try all the other files even if a
higher-priority file doesn't contain the sought-for olson id. Stop
doing that.
Also remove a TODO that has never been warranted, and add one that it
will be many years before anyone can do anything about it, but by that
time the historical knowledge may have been lost.
Bug: http://b/159613340
Test: treehugger
Change-Id: I873579268753c84b0bb721ea56f71ba64506d45a
The tzdata format has changed:
Firstly, there is now a "final_offset", which serves as a pointer to the
beginning of the section after the last known section. The pointer means
that file size is no longer a factor when reading the last section and
new sections could be added to the end of the file in future in a
backwards compatible way.
Secondly, since nothing uses zone.tab on Android it is being removed and
the zonetab_offset is replaced by final_offset.
The net effect for bionic is zero besides some comment / name changes.
Test: build only
Change-Id: Ia315083879c891f2d3fc84cf48e304c323ca89f2
The tzdata file is being removed from the runtime mainline module
in an upcoming commit. This commit removes the bionic references
to it.
This commit also contains general comment tidy-ups.
Bug: 132168458
Test: build only
Change-Id: I83cd9ff756b36e1d1222b7830f97c8bde2885ce4
To mirror device code more closely, look for time zone data using
ANDROID_TZDATA_ROOT on host. For device usecases the path is still
hardcoded.
Bug: 128422035
Test: build only
Change-Id: I5762745349338bcc3e3a173c1c9b18ea5a3324dd
The "if defined(__ANDROID__)" else branch is there to support
bionic when running on host environments.
The code now checks the
${ANDROID_RUNTIME_ROOT}/etc/tz/tzdata path as well.
This is similar to the current on-device expectations.
Eventually, we may remove the /system / ANDROID_ROOT cases.
Bug: 119293618
Test: build only
Change-Id: I8310f7b5a1c14567a648673970c636c7c84ff818
Look for the tzdata file in the runtime module before looking
in /system. It is still an open question how the removal of
tzdata will be handled, if at all. Until it is worked out it
will be duplicated.
Bug: 119293618
Bug: 119390260
Test: build / boot
Change-Id: I7e14ef41d0ec226caa595c56be61df5ecf50c382
The same prebuilts will be used in both runtime and time zone
modules. Having the rules put the files in etc/tz/ will make
them more appropriate for the runtime module.
Bug: 119026403
Test: build /boot only
Change-Id: Ia1370457e9d1547b35ed56bb385213d3727c8b9a
The package name in the manifest.json is changing to
remove apex so the hardcoded path must change.
Bug: 119026403
Test: build
Change-Id: I906b595a1325b40f8af8c37d7d08cd543c988cc8
The changes needed to pick up time zone data files from
a mounted APEX directory. Code that looks for time zone
data now looks in a new location after checking for
data installed by the time zone updates via APK feature.
This hasn't been tested in combination with a real APEX but
it shouldn't do anything bad if the new path does not exist.
Bug: 115612964
Test: CTS: run cts-dev -m CtsBionicTests
Test: Build / boot without APEX support
Change-Id: I56ae50e26f2cbfa0e537029a0e6f679fa2394327
Since localtime.c is C, this entails pulling our code out into its own
C++ file, which we should probably have done years ago anyway.
Bug: N/A
Test: ran tests, and manually tested via Settings
Change-Id: Ifc787a553e8f739a87641a2d35321aca40a47286