Only capture activity snapshot if the app has adapted to onBackInvoked

Since back navigation is the only one user for activity snapshot.

Bug: 259497289
Test: enable activity snapshot, verify only record activity snapshot
for adapted apps.

Change-Id: I44067b9fec2c380105d9b1a35d6f57e253d5deef
1 file changed