dumpstate: add Apps NetworkRequest to limited bugreports

This patch adds the output of "dumpsys connectivity requests" to limited
bugreports used for example on ChromeOS ARC branches. This content helps
identifying App compatibility issues and can be used to confirm that
Apps on ChromeOS ARC were properly listening to networking events.

Example of output:
"""
------ 0.028s was the duration of 'DUMPSYS ARC_NETWORK_SERVICE' ------
------ DUMPSYS CONNECTIVITY REQUESTS (/system/bin/dumpsys -T 10000 connectivity requests) ------
uid/pid:1000/117 NetworkRequest [ REQUEST id=1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN Unwanted: ] ]
uid/pid:1000/117 NetworkRequest [ BACKGROUND_REQUEST id=2, [ Transports: CELLULAR Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN Unwanted: ] ]
uid/pid:1000/117 NetworkRequest [ LISTEN id=3, [] ]
uid/pid:1000/117 NetworkRequest [ LISTEN id=4, [ Transports: VPN Capabilities: NOT_RESTRICTED&TRUSTED Unwanted:  Uid: 1000] ]
uid/pid:1000/117 NetworkRequest [ LISTEN id=5, [ Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN Unwanted:  Uid: 1000] ]
uid/pid:1000/117 NetworkRequest [ TRACK_DEFAULT id=6, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED Unwanted:  Uid: 1000] ]
uid/pid:1000/117 NetworkRequest [ REQUEST id=7, [ Transports: WIFI Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN Unwanted:  Specifier: <ArcNetworkFactory#1> Uid: 1000] ]
uid/pid:1000/117 NetworkRequest [ REQUEST id=8, [ Transports: ETHERNET Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN Unwanted:  Specifier: <ArcNetworkFactory#2> Uid: 1000] ]
uid/pid:1000/117 NetworkRequest [ LISTEN id=9, [ Transports: CELLULAR Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN Unwanted:  Uid: 1000] ]
uid/pid:1000/117 NetworkRequest [ LISTEN id=10, [ Capabilities: NOT_RESTRICTED&TRUSTED&NOT_VPN Unwanted:  Uid: 1000] ]
uid/pid:1000/117 NetworkRequest [ TRACK_DEFAULT id=11, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED Unwanted:  Uid: 1000] ]
uid/pid:10018/877 NetworkRequest [ LISTEN id=13, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED&NOT_VPN Unwanted:  Uid: 10018] ]
uid/pid:10018/853 NetworkRequest [ LISTEN id=14, [ Capabilities: NOT_RESTRICTED Unwanted:  Uid: 10018] ]
uid/pid:10018/877 NetworkRequest [ TRACK_DEFAULT id=26, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED Unwanted:  Uid: 10018] ]
uid/pid:10018/877 NetworkRequest [ LISTEN id=27, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED Unwanted:  Uid: 10018] ]
uid/pid:10104/6437 NetworkRequest [ TRACK_DEFAULT id=37, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED Unwanted:  Uid: 10104] ]
uid/pid:10104/6437 NetworkRequest [ LISTEN id=38, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED Unwanted:  Uid: 10104] ]
"""

Information contained in that dump output are App uids/pids that have
registered android.net.ConnectivityManager.NetworkRequest to the system
server, as well as NetwokRequest metadata. It does not add PIIs to the
output of bugreports.

Bug: 157866928
Test: Flashed kukui-arc-r, generated arc bugreport with
chrome://network#logs and checked that the content of dumpsys
connectivity requests was there.

Change-Id: Ied6e90ed95e3a189d241cc6e7de0ab957dbffb73
1 file changed