diff options
author | Divya Sharma <divyash@codeaurora.org> | 2018-02-27 08:32:05 -0800 |
---|---|---|
committer | Divya Sharma <divyash@codeaurora.org> | 2018-02-27 08:32:05 -0800 |
commit | 4e4914b22b779e6376bb00ae20636175b2a70d8c (patch) | |
tree | f4ebc5eae2c99e20aceefcc9ffc3de19782f0fbe /core/jni/fd_utils.cpp | |
parent | dbed40a3cd31af821ea99c605664908d67df2747 (diff) | |
parent | ed5d4d06907844e1c87a6ee17c4f2868a8cc6d56 (diff) |
PPR1.180219.001_AOSP_Merge
Conflicts:
core/res/res/values/config.xml
core/res/res/values/symbols.xml
packages/SystemUI/res/values/config.xml
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java
telecomm/java/android/telecom/Call.java
telecomm/java/android/telecom/Connection.java
telecomm/java/android/telecom/ConnectionService.java
Change-Id: I524d38a61608069028b3496a189118d8eff75f4b
Diffstat (limited to 'core/jni/fd_utils.cpp')
-rw-r--r-- | core/jni/fd_utils.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/jni/fd_utils.cpp b/core/jni/fd_utils.cpp index 3b7b14c58d0a..2e6058268115 100644 --- a/core/jni/fd_utils.cpp +++ b/core/jni/fd_utils.cpp @@ -317,10 +317,12 @@ bool FileDescriptorInfo::GetSocketName(const int fd, std::string* result) { return false; } - // This is a local socket with an abstract address, we do not accept it. + // This is a local socket with an abstract address. Remove the leading NUL byte and + // add a human-readable "ABSTRACT/" prefix. if (unix_addr->sun_path[0] == '\0') { - LOG(ERROR) << "Unsupported AF_UNIX socket (fd=" << fd << ") with abstract address."; - return false; + *result = "ABSTRACT/"; + result->append(&unix_addr->sun_path[1], path_len - 1); + return true; } // If we're here, sun_path must refer to a null terminated filesystem |