From 4ea1e4288985508e3e0f21febe4da242c86a7dd1 Mon Sep 17 00:00:00 2001 From: Ryan Mitchell Date: Wed, 11 Mar 2020 13:15:28 -0700 Subject: Move AssetsProvider to native layer Querying in the native layer for assets provided through AssetsProviders does not currently work. This change refactors the AssetProvider API to return a file descriptor that is read in the native layer and can bubble up to the java layer. This change also removes the InputStream API to favor of developers using memfd_create. Bug: 142716192 Test: atest ResourceLoaderValuesTest Change-Id: I1a7eca0994c3b7cc32008d9a72bf91086ff0e816 --- startop/view_compiler/apk_layout_compiler.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'startop') diff --git a/startop/view_compiler/apk_layout_compiler.cc b/startop/view_compiler/apk_layout_compiler.cc index e70c68852b67..eaa3e04cc814 100644 --- a/startop/view_compiler/apk_layout_compiler.cc +++ b/startop/view_compiler/apk_layout_compiler.cc @@ -168,8 +168,7 @@ void CompileApkLayouts(const std::string& filename, CompilationTarget target, void CompileApkLayoutsFd(android::base::unique_fd fd, CompilationTarget target, std::ostream& target_out) { constexpr const char* friendly_name{"viewcompiler assets"}; - auto assets = android::ApkAssets::LoadFromFd( - std::move(fd), friendly_name, /*system=*/false, /*force_shared_lib=*/false); + auto assets = android::ApkAssets::LoadFromFd(std::move(fd), friendly_name); CompileApkAssetsLayouts(assets, target, target_out); } -- cgit v1.2.3