[Screen share] Update our status to "projecting" earlier in process.
In the old screen share icon, we started showing the icon as soon as
MediaProjectionManager.Callback#onStart is called. With the new screen
share chips, we only started showing the icon when
MediaProjectionManager.Callback#onRecordingSessionSet is called. If a
user is only sharing *audio* to an app, but not their screen,
the #onRecordingSessionSet method is never triggered but we should still
show the screen share chip.
Bug: 373308507
Bug: 332662551
Flag: com.android.systemui.status_bar_show_audio_only_projection_chip
Regression tests:
Test: Screen record single app -> verify chip does 3-2-1 countdown then
starts timer, has screen record icon
Test: Screen record full screen -> verify chip does 3-2-1 countdown then
starts timer, has screen record icon
Test: Share screen to app that does a 3-2-1 countdown -> verify chip
starts showing with just share-to-app icon, then shows timer after 3-2-1
countdown is done
Test: Share screen to app that immediately starts recording -> verify
chip timer immediately starts
Test: Cast screen to another device -> verify chip shows cast icon +
timer
Test: Cast audio to another device -> verify chip just shows cast icon
Test: atest MediaProjectionManagerRepositoryTest
New test:
Test: Share *audio* to another app -> verify chip shows, and has
share-to-app icon
Change-Id: Ifa84ec811ef3456792a3cd6b7766d6c738536af2
diff --git a/packages/SystemUI/aconfig/systemui.aconfig b/packages/SystemUI/aconfig/systemui.aconfig
index a21a805..bd872eb 100644
--- a/packages/SystemUI/aconfig/systemui.aconfig
+++ b/packages/SystemUI/aconfig/systemui.aconfig
@@ -338,6 +338,17 @@
}
flag {
+ name: "status_bar_show_audio_only_projection_chip"
+ namespace: "systemui"
+ description: "Show chip on the left side of the status bar when a user is only sharing *audio* "
+ "during a media projection"
+ bug: "373308507"
+ metadata {
+ purpose: PURPOSE_BUGFIX
+ }
+}
+
+flag {
name: "status_bar_use_repos_for_call_chip"
namespace: "systemui"
description: "Use repositories as the source of truth for call notifications shown as a chip in"