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

Commit 317d3441 authored by Lingyu Feng's avatar Lingyu Feng
Browse files

Notify TaskBar via onDisplayRemoveSystemDecorations when starting mirroring

In this CL, when taskbar receives onDisplayRemoveSystemDecorations, it
performs similar actions to those triggered by onDisplayRemoved.

Bug: 352461502
Flag: com.android.server.display.feature.flags.enable_display_content_mode_management
Test: manually (adb shell settings put secure mirror_built_in_display
{1|0})

Change-Id: Id5caffcf39de7f080eeb0534c223c3fcd8341b4a
parent 64d00c2f
Loading
Loading
Loading
Loading
+6 −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: 38
// Next ID: 39
oneway interface IOverviewProxy {

    void onActiveNavBarRegionChanges(in Region activeRegion) = 11;
@@ -154,4 +154,9 @@ oneway interface IOverviewProxy {
     * Sent when {@link TaskbarDelegate#onDisplayRemoved} is called.
     */
    void onDisplayRemoved(int displayId) = 37;

    /**
     * Sent when {@link TaskbarDelegate#onDisplayRemoveSystemDecorations} is called.
     */
    void onDisplayRemoveSystemDecorations(int displayId) = 38;
}
+14 −0
Original line number Diff line number Diff line
@@ -261,6 +261,20 @@ public class TaskbarDelegate implements CommandQueue.Callbacks,
        }
    }

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

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

    // Separated into a method to keep setDependencies() clean/readable.
    private LightBarTransitionsController createLightBarTransitionsController() {