Use better Exception handling in IMS APIs.

1) Use IllegalArgumentException and IllegalStateException
to convey exception cases, instead of always throwing a
RemoteException.

2) Remove the constraint that the subId must be valid to
unregister a callback. Since we already manage the callbacks
internally when the subscription is removed, it is now just
a no-op.

3) Clarified what some of the callbacks do in comments.

Bug: 122480210
Test: FrameworksTelephonyTests
Change-Id: I6f308ce021f3202373e3d037c7123fe92d7e6063
2 files changed