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

Commit 18468bb9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[Action Corner] Add action corner methods in LauncherProxy aidl" into main

parents d3f31648 426c8bc1
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -159,4 +159,10 @@ oneway interface ILauncherProxy {
     * Sent when {@link TaskbarDelegate#onDisplayRemoveSystemDecorations} is called.
     * Sent when {@link TaskbarDelegate#onDisplayRemoveSystemDecorations} is called.
     */
     */
    void onDisplayRemoveSystemDecorations(int displayId) = 38;
    void onDisplayRemoveSystemDecorations(int displayId) = 38;

    /**
     * Sent when active action corner is received in {@link ActionCornerInteractor}. Please refer to
     * {@link ActionCornerConstants.Action} for all possible actions.
     */
    void onActionCornerActivated(int action, int displayId) = 39;
}
}
+38 −0
Original line number Original line Diff line number Diff line
/*
 * Copyright 2025 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.android.systemui.shared.system.actioncorner;

import android.annotation.IntDef;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

public class ActionCornerConstants {
    /** Go to the home screen. */
    public static final int HOME = 0;
    /** Open the overview screen. */
    public static final int OVERVIEW = 1;
    /** Open the notification shade. */
    public static final int NOTIFICATION = 2;
    /** Open the quick settings panel. */
    public static final int QUICK_SETTING = 3;

    @IntDef({HOME, OVERVIEW, NOTIFICATION, QUICK_SETTING})
    @Retention(RetentionPolicy.SOURCE)
    public @interface Action {
    }
}
+15 −0
Original line number Original line Diff line number Diff line
@@ -119,6 +119,7 @@ import com.android.systemui.shared.recents.ILauncherProxy;
import com.android.systemui.shared.recents.ISystemUiProxy;
import com.android.systemui.shared.recents.ISystemUiProxy;
import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.shared.system.QuickStepContract;
import com.android.systemui.shared.system.QuickStepContract.SystemUiStateFlags;
import com.android.systemui.shared.system.QuickStepContract.SystemUiStateFlags;
import com.android.systemui.shared.system.actioncorner.ActionCornerConstants.Action;
import com.android.systemui.shared.system.smartspace.ISysuiUnlockAnimationController;
import com.android.systemui.shared.system.smartspace.ISysuiUnlockAnimationController;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationShadeWindowController;
import com.android.systemui.statusbar.NotificationShadeWindowController;
@@ -953,6 +954,20 @@ public class LauncherProxyService implements CallbackController<LauncherProxyLis
        }
        }
    }
    }


    /**
     * Notifies the launcher that an action corner has been activated, sending the corresponding
     * action and display id.
     */
    public void onActionCornerActivated(@Action int action, int displayId) {
        try {
            if (mLauncherProxy != null) {
                mLauncherProxy.onActionCornerActivated(action, displayId);
            }
        } catch (RemoteException e) {
            Log.e(TAG_OPS, "Failed to call onActionCornerActivated()", e);
        }
    }

    public void cleanupAfterDeath() {
    public void cleanupAfterDeath() {
        if (mInputFocusTransferStarted) {
        if (mInputFocusTransferStarted) {
            mHandler.post(() -> {
            mHandler.post(() -> {