Add a test api for checking if system supports TaskSnapshot

Use this test api to make sure testing
KeyboardVisibilityControlTest#testRestoreImeVisibility_.* that
requires the system supporting TaskSnapshot mechanism, otherwise skip
the test when the system doesn't support it.

Bug: 184978234
Test: m checkapi & atest KeyboardVisibilityControlTest
Change-Id: I777053aeeb6a2734a4bbd37711cf56ced41c1bd9
6 files changed