Merge "Fixed NPE when local or remote port range does not exist" am: 4e6d04a608 am: f4e93e2890

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1944225

Change-Id: Iea1531d9ca76e1df07442d2b3a286bf7ce475cb8