From 411f9e83c490df04e1e2befd7577923ea7093675 Mon Sep 17 00:00:00 2001 From: Joshua Trask Date: Thu, 18 Apr 2024 21:34:53 +0000 Subject: System action refinement. This is an important bugfix since Android API docs imply that app developers may start a share session with an "incomplete" payload and rely on refinement to replace the content post-selection. System actions will similarly want to use "complete" (i.e., potentially-refined) payloads. The approach is based on the observation that our existing refinement flow, despite historically operating in terms of `TargetInfo` objects, is really a function (async) from a list of one or more matching intents to a refined intent filter-matching at least one of the sources, and we can use the same mechanism to request a refinement of the "target intent" we originally used to derive the system actions and then simply re-derive them by applying the same logic to the refined intent. Per feedback on the earlier prototypes (ag/26681688 and ag/26765080), this implementation explicitly tracks the requested "type" of selection when we initiate a refinement flow so that we can handle the result by-cases when we later `consume()` the result. Bug: 331206205 Flag: com.android.intentresolver.refine_system_actions DEVELOPMENT Test: existing refinement tests + manually exercised w/ShareTest app Change-Id: I83e5a2e088387c495dec7e41fee0e311a82644f1 --- aconfig/FeatureFlags.aconfig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'aconfig') diff --git a/aconfig/FeatureFlags.aconfig b/aconfig/FeatureFlags.aconfig index 583d8502..f61bce26 100644 --- a/aconfig/FeatureFlags.aconfig +++ b/aconfig/FeatureFlags.aconfig @@ -49,3 +49,13 @@ flag { description: "Enable private profile support" bug: "328029692" } + +flag { + name: "refine_system_actions" + namespace: "intentresolver" + description: "This flag enables sending system actions to the caller refinement flow" + bug: "331206205" + metadata { + purpose: PURPOSE_BUGFIX + } +} -- cgit v1.2.3-59-g8ed1b