Fix FileUtilsTest.testCreateSubFile for Android One devices
createSubFile() was assuming that java.io.tmpdir did not
itself contain symlink. Generally true, but not for
Android One devices.
Previously the createSubFile() would have tolerated a name
parameter that directly referenced a symlink that pointed
outside of the parent dir (though not if the symlink was
actually dereferenced). This is unnecessarily lenient and
making it stricter makes the code simpler.
This fixes the FileUtils code and fixes/adds more cases to
the FileUtilsTest to confirm it all works as intended when
existing files and directories are present.
This change only affects the TzDataBundleInstaller which is
only executed in the event of an over-the-air timezone data
(cherry-picked from commit e9a8e16980a5733852a829c48ed38497cff610b1)
3 files changed