summaryrefslogtreecommitdiff
path: root/core/java/android/app/ActivityTaskManager.java
diff options
context:
space:
mode:
authorEvan Rosky <erosky@google.com>2021-05-19 19:47:20 -0700
committerEvan Rosky <erosky@google.com>2021-05-21 08:47:46 -0700
commit2996ef5f4f96d93e6397efce9551465dc9f10f68 (patch)
treefee2ae25415ca5781e75d294b642826806f16a2a /core/java/android/app/ActivityTaskManager.java
parentd939d3b4db4ea2559fefd453883de316fd303273 (diff)
Hook up nav-bar attach/detach logic to Shell Transitions
For the Recents gesture animation, the navbar gets attached to the app while dragging. The actual navbar attach/detach logic lives in Core, so this change basically hacks the logic into the core-side of shell transitions. This is ugly and should be a temporary solution until that behavior can move to Shell. This also had to add an ugly API on IATM because the lifecycle of the navbar reparent is different from the transition lifecycle in this instance because of LiveTiles. Bug: 188595497 Test: With shell transit enabled, open app, swipe up to recents. Observe navbar attached to app during drag and put back on screen afterwards. Also, no more crash. Change-Id: I1aba53314329e3fd7678a7e8a5fc8ffa0294e395
Diffstat (limited to 'core/java/android/app/ActivityTaskManager.java')
-rw-r--r--core/java/android/app/ActivityTaskManager.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/java/android/app/ActivityTaskManager.java b/core/java/android/app/ActivityTaskManager.java
index 4a7fcd232ce9..a83662592513 100644
--- a/core/java/android/app/ActivityTaskManager.java
+++ b/core/java/android/app/ActivityTaskManager.java
@@ -476,6 +476,19 @@ public class ActivityTaskManager {
}
/**
+ * Detaches the navigation bar from the app it was attached to during a transition.
+ * @hide
+ */
+ @RequiresPermission(android.Manifest.permission.CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS)
+ public void detachNavigationBarFromApp(@NonNull IBinder transition) {
+ try {
+ getService().detachNavigationBarFromApp(transition);
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Information you can retrieve about a root task in the system.
* @hide
*/