From d0c22cc8e51c5297d11f708be706ba1ce0582426 Mon Sep 17 00:00:00 2001 From: Yurii Zubrytskyi Date: Thu, 10 Nov 2022 14:11:05 -0800 Subject: IsFabricatedOverlay() optimization This function is used mostly to select what type should be parsing the very same file, so instead of opening that file again later make it able to accept an opened fd Bug: 237583012 Test: build + boot Change-Id: I9ca1f44d6fe16fec0dd4732bfc9f0d6272d3b1e7 --- libs/androidfw/AssetsProvider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libs/androidfw/AssetsProvider.cpp') diff --git a/libs/androidfw/AssetsProvider.cpp b/libs/androidfw/AssetsProvider.cpp index 289d7e660402..80e560747a3e 100644 --- a/libs/androidfw/AssetsProvider.cpp +++ b/libs/androidfw/AssetsProvider.cpp @@ -393,8 +393,8 @@ std::unique_ptr EmptyAssetsProvider::Create() { return std::unique_ptr(new EmptyAssetsProvider({})); } -std::unique_ptr EmptyAssetsProvider::Create(const std::string& path) { - return std::unique_ptr(new EmptyAssetsProvider(path)); +std::unique_ptr EmptyAssetsProvider::Create(std::string path) { + return std::unique_ptr(new EmptyAssetsProvider(std::move(path))); } std::unique_ptr EmptyAssetsProvider::OpenInternal(const std::string& /* path */, -- cgit v1.2.3-59-g8ed1b