Promote app transition target its ancestor if possible.

Previously we only animated ActivityRecord. When hierarchical animation
is enabled, we find the top most entity from the window hierarchy (i.e.
ActivityRecord < Task < ActivityStack) which we can animate without
user visible changes, and set app transition animation on it.

The hierarchical animation is disabled by default. To enable it,
system property "persist.wm.hierarchical_animations" must be set.

Test: atest AppTransitionControllerTest
Bug: 131661052
Change-Id: I4709fd178de09d289d72cf1833b056b4e34fc92b
diff --git a/data/etc/services.core.protolog.json b/data/etc/services.core.protolog.json
index 3060476..d450db7 100644
--- a/data/etc/services.core.protolog.json
+++ b/data/etc/services.core.protolog.json
@@ -1729,6 +1729,12 @@
       "group": "WM_DEBUG_APP_TRANSITIONS_ANIM",
       "at": "com\/android\/server\/wm\/AppTransition.java"
     },
+    "1460759282": {
+      "message": "getAnimationTarget in=%s, out=%s",
+      "level": "VERBOSE",
+      "group": "WM_DEBUG_APP_TRANSITIONS_ANIM",
+      "at": "com\/android\/server\/wm\/AppTransitionController.java"
+    },
     "1469292670": {
       "message": "Changing focus from %s to %s displayId=%d Callers=%s",
       "level": "VERBOSE",