Fix broken tests in TextClassifierServiceTest.

We introduce SystemTCMetadata in ag/10605740 which centrializes the
needed information for the TCMS to process the requests. Because we
change the getPackageName() logic to return the calling package name
of SystemTCMetadata and the SystemTCMetadata is only created if the
event is from the SystemTC not other TCs. The tests fail because the
SelectionEvent.packageName is not populated.

This cl contains the following changes:
- Return the package name that the SelectionEvent or
TextClassificationContext originated from
- Fix incorrect javadoc of TextClassificationContext.getPackageName
- Always verify the calling package name for onSelectionEvent and
onTextClassifierEvent

Bug: 151614815
Test: atest TextClassifierServiceTest
Test: atest FrameworksCoreTests:android.view.textclassifier
Test: atest FrameworksCoreTests:android.widget.TextViewActivityTest
Test: atest CtsTextClassifierTestCases
Change-Id: Iabe1691d63e3ec6ac834984cf79b60faf9c0e765
3 files changed