Disable tzdata in $ANDROID_DATA.
(cherry picked from 4c30130a2155c37e80af4c3b53bf4f6ce832e760.) Bug: 18139284 Change-Id: I2670dc1791d635139a5d39a438dc08777439476b
This commit is contained in:
parent
f96eaf6202
commit
e24bf5d7b9
@ -2252,14 +2252,11 @@ static int __bionic_open_tzdata_path(const char* path_prefix_variable, const cha
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int __bionic_open_tzdata(const char* olson_id, int* data_size) {
|
static int __bionic_open_tzdata(const char* olson_id, int* data_size) {
|
||||||
int fd = __bionic_open_tzdata_path("ANDROID_DATA", "/misc/zoneinfo/tzdata", olson_id, data_size);
|
int fd = __bionic_open_tzdata_path("ANDROID_ROOT", "/usr/share/zoneinfo/tzdata", olson_id, data_size);
|
||||||
if (fd < 0) {
|
if (fd == -2) {
|
||||||
fd = __bionic_open_tzdata_path("ANDROID_ROOT", "/usr/share/zoneinfo/tzdata", olson_id, data_size);
|
// The first thing that 'recovery' does is try to format the current time. It doesn't have
|
||||||
if (fd == -2) {
|
// any tzdata available, so we must not abort here --- doing so breaks the recovery image!
|
||||||
// The first thing that 'recovery' does is try to format the current time. It doesn't have
|
fprintf(stderr, "%s: couldn't find any tzdata when looking for %s!\n", __FUNCTION__, olson_id);
|
||||||
// any tzdata available, so we must not abort here --- doing so breaks the recovery image!
|
|
||||||
fprintf(stderr, "%s: couldn't find any tzdata when looking for %s!\n", __FUNCTION__, olson_id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user