Handle non-activity trampolines from widgets

If a widget triggers an activity through a broadcast or service, we
currently do not trigger auth. This change adds detection logic to
detect when an activity is started within 1 second of a widget
interaction, and prompts for auth.

Bug: 350468769
Test: atest WidgetTrampolineInteractorTest
Test: atest WidgetInteractionHandlerTest
Flag: com.android.systemui.communal_widget_trampoline_fix
Change-Id: Ib8436a17cf6d413fb59a8d6cc6081b2d9660a3d1
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index cdbac33..9ab9ad7 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -998,6 +998,16 @@
 }
 
 flag {
+  name: "communal_widget_trampoline_fix"
+  namespace: "systemui"
+  description: "fixes activity starts caused by non-activity trampolines from widgets."
+  bug: "350468769"
+  metadata {
+    purpose: PURPOSE_BUGFIX
+  }
+}
+
+flag {
   name: "app_clips_backlinks"
   namespace: "systemui"
   description: "Enables Backlinks improvement feature in App Clips"