Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d4f7aef authored by Jon @'s avatar Jon @ Committed by Android (Google) Code Review
Browse files

Merge "Make HomeTransitionListener oneway and only work for DEFAULT_DISPLAY." into main

parents aa9fe075 a72b3b3a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.wm.shell.transition;

import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
import static android.view.Display.DEFAULT_DISPLAY;
import static android.window.TransitionInfo.FLAG_BACK_GESTURE_ANIMATED;

import static com.android.wm.shell.transition.Transitions.TransitionObserver;
@@ -35,7 +36,8 @@ import com.android.wm.shell.util.TransitionUtil;

/**
 * The {@link TransitionObserver} that observes for transitions involving the home
 * activity. It reports transitions to the caller via {@link IHomeTransitionListener}.
 * activity on the {@link android.view.Display#DEFAULT_DISPLAY} only.
 * It reports transitions to the caller via {@link IHomeTransitionListener}.
 */
public class HomeTransitionObserver implements TransitionObserver,
        RemoteCallable<HomeTransitionObserver> {
@@ -58,6 +60,7 @@ public class HomeTransitionObserver implements TransitionObserver,
        for (TransitionInfo.Change change : info.getChanges()) {
            final ActivityManager.RunningTaskInfo taskInfo = change.getTaskInfo();
            if (taskInfo == null
                    || taskInfo.displayId != DEFAULT_DISPLAY
                    || taskInfo.taskId == -1
                    || !taskInfo.isRunning) {
                continue;
+4 −3
Original line number Diff line number Diff line
@@ -20,12 +20,13 @@ import android.window.RemoteTransition;
import android.window.TransitionFilter;

/**
 *  Listener interface that Launcher attaches to SystemUI to get home activity transition callbacks.
 * Listener interface that Launcher attaches to SystemUI to get home activity transition callbacks
 * on the default display.
 */
interface IHomeTransitionListener {
oneway interface IHomeTransitionListener {

    /**
     * Called when a transition changes the visibility of the home activity.
     * Called when a transition changes the visibility of the home activity on the default display.
     */
    void onHomeVisibilityChanged(in boolean isVisible);
}