Set "results source" on RemoteInput intents sent from System UI

If the input comes from RemoteInputView (the user manually typed an
inline reply), the source is set to RemoteInput.SOURCE_FREE_FORM_INPUT.
If the input comes from SmartReplyView (the user tapped on a smart reply
button), the source is set to RemoteInput.SOURCE_CHOICE.

Bug: 67765414
Test: atest RemoteInputViewTest SmartReplyViewTest
Change-Id: Icff46b903a968bd8457624b358d626b457569352
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
index 1dcdf63..2d829af 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SmartReplyView.java
@@ -52,6 +52,7 @@
             results.putString(remoteInput.getResultKey(), choice.toString());
             Intent intent = new Intent().addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
             RemoteInput.addResultsToIntent(new RemoteInput[]{remoteInput}, intent, results);
+            RemoteInput.setResultsSource(intent, RemoteInput.SOURCE_CHOICE);
             try {
                 pendingIntent.send(context, 0, intent);
             } catch (PendingIntent.CanceledException e) {