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

Commit baea3fbb authored by Sukesh Ram's avatar Sukesh Ram Committed by Android (Google) Code Review
Browse files

Merge "[CD Taskbar] Refactor to Listen to Display Ready/Removed Signals" into main

parents 7eebcc9d 8af4d370
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ import android.os.IRemoteCallback;
import android.view.MotionEvent;
import com.android.systemui.shared.recents.ISystemUiProxy;

// Next ID: 36
// Next ID: 38
oneway interface IOverviewProxy {

    void onActiveNavBarRegionChanges(in Region activeRegion) = 11;
@@ -144,4 +144,14 @@ oneway interface IOverviewProxy {
     * TouchInteractionService is expected to send the reply once it has finished cleaning up.
     */
    void onUnbind(IRemoteCallback reply) = 35;

    /**
     * Sent when {@link TaskbarDelegate#onDisplayReady} is called.
     */
    void onDisplayReady(int displayId) = 36;

    /**
     * Sent when {@link TaskbarDelegate#onDisplayRemoved} is called.
     */
    void onDisplayRemoved(int displayId) = 37;
}
+18 −0
Original line number Diff line number Diff line
@@ -236,11 +236,29 @@ public class TaskbarDelegate implements CommandQueue.Callbacks,
    @Override
    public void onDisplayReady(int displayId) {
        CommandQueue.Callbacks.super.onDisplayReady(displayId);
        if (mOverviewProxyService.getProxy() == null) {
            return;
        }

        try {
            mOverviewProxyService.getProxy().onDisplayReady(displayId);
        } catch (RemoteException e) {
            Log.e(TAG, "onDisplayReady() failed", e);
        }
    }

    @Override
    public void onDisplayRemoved(int displayId) {
        CommandQueue.Callbacks.super.onDisplayRemoved(displayId);
        if (mOverviewProxyService.getProxy() == null) {
            return;
        }

        try {
            mOverviewProxyService.getProxy().onDisplayRemoved(displayId);
        } catch (RemoteException e) {
            Log.e(TAG, "onDisplayRemoved() failed", e);
        }
    }

    // Separated into a method to keep setDependencies() clean/readable.