commit | 65b4e5bc4fbc45649efb0506ea16b6676af9e46e | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Sat Oct 05 10:47:13 2019 +0800 |
committer | Mike Yu <yumike@google.com> | Sat Oct 05 10:47:13 2019 +0800 |
tree | bee1ed332a8cceab6830d5c57e1c2d4cb12b8ab4 | |
parent | c4f469ad1075f6840346e8810fd02ee25c091d74 [diff] |
Fix setResolverConfiguration to return negative error code This fixes the logging bug in dumpsys netd. For example, when resolv_set_nameservers fails: It used to print setResolverConfiguration() -> ServiceSpecificException(-22, "Unknown error -22") <0.18ms> After the fix, it prints setResolverConfiguration() -> ServiceSpecificException(22, "Invalid argument") <0.28ms> Test: m com.android.resolv Change-Id: I916e6e31dcdd2f421592e8ca71663ffbddc7b3b5
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.