Loading cmds/idmap2/idmap2/Main.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -29,8 +29,8 @@ using android::idmap2::CommandLineOptions; typedef std::map<std::string, std::function<bool(const std::vector<std::string>&, std::ostream&)>> NameToFunctionMap; using NameToFunctionMap = std::map<std::string, std::function<bool(const std::vector<std::string>&, std::ostream&)>>; namespace { Loading cmds/idmap2/idmap2/Scan.cpp +4 −5 Original line number Diff line number Diff line Loading @@ -56,8 +56,7 @@ std::unique_ptr<std::vector<std::string>> FindApkFiles(const std::vector<std::st } paths.insert(apk_paths->cbegin(), apk_paths->cend()); } return std::unique_ptr<std::vector<std::string>>( new std::vector<std::string>(paths.cbegin(), paths.cend())); return std::make_unique<std::vector<std::string>>(paths.cbegin(), paths.cend()); } } // namespace Loading Loading @@ -138,15 +137,15 @@ bool Scan(const std::vector<std::string>& args, std::ostream& out_error) { } std::stringstream stream; for (auto iter = interesting_apks.cbegin(); iter != interesting_apks.cend(); ++iter) { const std::string idmap_path = Idmap::CanonicalIdmapPathFor(output_directory, *iter); for (const auto& apk : interesting_apks) { const std::string idmap_path = Idmap::CanonicalIdmapPathFor(output_directory, apk); std::stringstream dev_null; if (!Verify(std::vector<std::string>({"--idmap-path", idmap_path}), dev_null) && !Create(std::vector<std::string>({ "--target-apk-path", target_apk_path, "--overlay-apk-path", *iter, apk, "--idmap-path", idmap_path, }), Loading cmds/idmap2/idmap2d/Idmap2Service.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -56,8 +56,7 @@ Status error(const std::string& msg) { } // namespace namespace android { namespace os { namespace android::os { Status Idmap2Service::getIdmapPath(const std::string& overlay_apk_path, int32_t user_id ATTRIBUTE_UNUSED, std::string* _aidl_return) { Loading Loading @@ -132,9 +131,8 @@ Status Idmap2Service::createIdmap(const std::string& target_apk_path, return error("failed to write to idmap path " + idmap_path); } _aidl_return->reset(new std::string(idmap_path)); *_aidl_return = std::make_unique<std::string>(idmap_path); return ok(); } } // namespace os } // namespace android } // namespace android::os cmds/idmap2/idmap2d/Idmap2Service.h +4 −4 Original line number Diff line number Diff line Loading @@ -25,8 +25,8 @@ #include "android/os/BnIdmap2.h" namespace android { namespace os { namespace android::os { class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 { public: static char const* getServiceName() { Loading @@ -46,7 +46,7 @@ class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 { const std::string& overlay_apk_path, int32_t user_id, std::unique_ptr<std::string>* _aidl_return); }; } // namespace os } // namespace android } // namespace android::os #endif // IDMAP2_IDMAP2D_IDMAP2SERVICE_H_ cmds/idmap2/include/idmap2/BinaryStreamVisitor.h +2 −4 Original line number Diff line number Diff line Loading @@ -23,8 +23,7 @@ #include "idmap2/Idmap.h" namespace android { namespace idmap2 { namespace android::idmap2 { class BinaryStreamVisitor : public Visitor { public: Loading @@ -43,7 +42,6 @@ class BinaryStreamVisitor : public Visitor { std::ostream& stream_; }; } // namespace idmap2 } // namespace android } // namespace android::idmap2 #endif // IDMAP2_INCLUDE_IDMAP2_BINARYSTREAMVISITOR_H_ Loading
cmds/idmap2/idmap2/Main.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -29,8 +29,8 @@ using android::idmap2::CommandLineOptions; typedef std::map<std::string, std::function<bool(const std::vector<std::string>&, std::ostream&)>> NameToFunctionMap; using NameToFunctionMap = std::map<std::string, std::function<bool(const std::vector<std::string>&, std::ostream&)>>; namespace { Loading
cmds/idmap2/idmap2/Scan.cpp +4 −5 Original line number Diff line number Diff line Loading @@ -56,8 +56,7 @@ std::unique_ptr<std::vector<std::string>> FindApkFiles(const std::vector<std::st } paths.insert(apk_paths->cbegin(), apk_paths->cend()); } return std::unique_ptr<std::vector<std::string>>( new std::vector<std::string>(paths.cbegin(), paths.cend())); return std::make_unique<std::vector<std::string>>(paths.cbegin(), paths.cend()); } } // namespace Loading Loading @@ -138,15 +137,15 @@ bool Scan(const std::vector<std::string>& args, std::ostream& out_error) { } std::stringstream stream; for (auto iter = interesting_apks.cbegin(); iter != interesting_apks.cend(); ++iter) { const std::string idmap_path = Idmap::CanonicalIdmapPathFor(output_directory, *iter); for (const auto& apk : interesting_apks) { const std::string idmap_path = Idmap::CanonicalIdmapPathFor(output_directory, apk); std::stringstream dev_null; if (!Verify(std::vector<std::string>({"--idmap-path", idmap_path}), dev_null) && !Create(std::vector<std::string>({ "--target-apk-path", target_apk_path, "--overlay-apk-path", *iter, apk, "--idmap-path", idmap_path, }), Loading
cmds/idmap2/idmap2d/Idmap2Service.cpp +3 −5 Original line number Diff line number Diff line Loading @@ -56,8 +56,7 @@ Status error(const std::string& msg) { } // namespace namespace android { namespace os { namespace android::os { Status Idmap2Service::getIdmapPath(const std::string& overlay_apk_path, int32_t user_id ATTRIBUTE_UNUSED, std::string* _aidl_return) { Loading Loading @@ -132,9 +131,8 @@ Status Idmap2Service::createIdmap(const std::string& target_apk_path, return error("failed to write to idmap path " + idmap_path); } _aidl_return->reset(new std::string(idmap_path)); *_aidl_return = std::make_unique<std::string>(idmap_path); return ok(); } } // namespace os } // namespace android } // namespace android::os
cmds/idmap2/idmap2d/Idmap2Service.h +4 −4 Original line number Diff line number Diff line Loading @@ -25,8 +25,8 @@ #include "android/os/BnIdmap2.h" namespace android { namespace os { namespace android::os { class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 { public: static char const* getServiceName() { Loading @@ -46,7 +46,7 @@ class Idmap2Service : public BinderService<Idmap2Service>, public BnIdmap2 { const std::string& overlay_apk_path, int32_t user_id, std::unique_ptr<std::string>* _aidl_return); }; } // namespace os } // namespace android } // namespace android::os #endif // IDMAP2_IDMAP2D_IDMAP2SERVICE_H_
cmds/idmap2/include/idmap2/BinaryStreamVisitor.h +2 −4 Original line number Diff line number Diff line Loading @@ -23,8 +23,7 @@ #include "idmap2/Idmap.h" namespace android { namespace idmap2 { namespace android::idmap2 { class BinaryStreamVisitor : public Visitor { public: Loading @@ -43,7 +42,6 @@ class BinaryStreamVisitor : public Visitor { std::ostream& stream_; }; } // namespace idmap2 } // namespace android } // namespace android::idmap2 #endif // IDMAP2_INCLUDE_IDMAP2_BINARYSTREAMVISITOR_H_