Fix non-unique PendingIntent issue with TCImpl.
As per the referenced bug, we're running into issues where apps are being fired with stale intents. The reason is because we need intents we fire to be unique by Intent.filterEquals. Some of the intents we generate put unique data in the intent extra which is not considered by filterEquals. The solution here is to create PendingIntents with unique request codes (using classifiedText.hashCode()). See more info about this in https://developer.android.com/reference/android/app/PendingIntent.html Bug: 77930684 Test: manually tested broken scenarios. See referenced bug Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest Change-Id: Ib7275f94ca5ada51e4ba191742d4b614df12e1ea
Loading
Please register or sign in to comment