nativeloader: Ignore empty java_permitted_path

Passing empty permitted path should result in no-op.
This addresses review comment on CL with commit
f334cbf0e1

Bug: http://b/28639227
Change-Id: I4a4540e522e90a145a374939921932c86f35e88d
(cherry picked from commit d0b1531929)
This commit is contained in:
Dimitry Ivanov 2016-05-10 16:21:25 -07:00
parent 0756fae4f1
commit 72ca40f738
1 changed files with 3 additions and 1 deletions

View File

@ -76,7 +76,9 @@ class LibraryNamespaces {
if (java_permitted_path != nullptr) {
ScopedUtfChars path(env, java_permitted_path);
permitted_path = permitted_path + ":" + path.c_str();
if (path.c_str() != nullptr && path.size() > 0) {
permitted_path = permitted_path + ":" + path.c_str();
}
}
if (!initialized_ && !InitPublicNamespace(library_path.c_str())) {