Skip refinement for suspended targets.
It's just rude to send users into the refinement flow when we expect
the launch to fail (with a message dialog indicating that the entire
target app was never supposed to work; i.e., we make it clear to users
that this failure had nothing to do with their refinement choices).
OTOH if we skip refinement, we have some handling to bounce back into
a usable Sharesheet session after that dialog appears, so we'd like to
take advantage of that.
A subsequent CL will "plug all the holes" in our handling of various
refinement exit conditions. There's currently an analogous
post-refinement "bounce back" for suspended targets, but we won't be
able to recover a Sharesheet session at that time, so (TODO) we'll
turn that into a hard failure (as with any other refinement problems).
Bug: 273864843
Test: manually tested `adb shell cmd package suspend <packagename>`
confirm we no longer invoke refinement (and instead trigger the
system dialog immediately) when the suspended target is chosen.
Change-Id: Iff1cf67f67015c754437726b8f52431deca797e0
1 file changed