OSDN Git Service

AssetManager2: Fix list function
authorAdam Lesinski <adamlesinski@google.com>
Fri, 9 Feb 2018 06:35:21 +0000 (22:35 -0800)
committerAdam Lesinski <adamlesinski@google.com>
Fri, 9 Feb 2018 06:37:48 +0000 (22:37 -0800)
commitadc0b87ec235a71d722fb8d6aad50ceaeac8c6d5
tree00b9574251a5a6b6ce184f39d1b2f04a129a057b
parent1b6f515550969020f0622afb7f82b24d7150c3c1
AssetManager2: Fix list function

List was skipping directories. Include them, and add tests to ensure
the order and precedence is correct.

Bug: 72511641
Test: make libandroidfw_tests
Test: atest CtsContentTestCases:AssetManagerTest
Change-Id: Iadf45883283d3e4aae93bd7c3343745912e34fa0
13 files changed:
core/jni/android_util_AssetManager.cpp
libs/androidfw/ApkAssets.cpp
libs/androidfw/tests/AssetManager2_test.cpp
libs/androidfw/tests/data/app/app.apk
libs/androidfw/tests/data/app/assets/app_file.txt [new file with mode: 0644]
libs/androidfw/tests/data/app/assets/file.txt [new file with mode: 0644]
libs/androidfw/tests/data/app/build
libs/androidfw/tests/data/system/assets/file.txt [new file with mode: 0644]
libs/androidfw/tests/data/system/assets/subdir/subdir_file.txt [new file with mode: 0644]
libs/androidfw/tests/data/system/build
libs/androidfw/tests/data/system/res/values-sv/values.xml
libs/androidfw/tests/data/system/res/values/themes.xml
libs/androidfw/tests/data/system/system.apk