PhoneNumberManagerService: Fix AIOOBE on P-Associated-URI

Fixes an uncaught ArrayIndexOutOfBoundsException in
PhoneNumberManagerService and ImsPhone caused by processing a
P-Associated-URI composed only of the delimiter (e.g., sip:@). By
passing a limit to split, the array is never empty. Additionally,
catches RuntimeException from PhoneNumberManager in ImsPhone to prevent
crash loops.

Bug: 517377202
Test: atest PhoneNumberManagerTest
Flag: EXEMPT BUGFIX

TAG=agy
CONV=96a2cb83-a901-4037-81da-7fa7df3a933f
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:a1c599418e5ca00c4d26db840bc5b3881dc9692f
Merged-In: I10f10a9712dc273a7a71cd0c9227cb958e3ffa48
Change-Id: I10f10a9712dc273a7a71cd0c9227cb958e3ffa48
2 files changed
tree: 4aa9978c02800d417fe27516b355a66676201b78
  1. apex/
  2. flags/
  3. framework/
  4. libs/
  5. telecom/
  6. tests/
  7. .gitignore
  8. OWNERS
  9. PREUPLOAD.cfg
  10. TEST_MAPPING