1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.wm.shell.desktopmode; 18 19 import android.app.ActivityManager.RunningTaskInfo; 20 import com.android.wm.shell.desktopmode.IDesktopTaskListener; 21 22 /** 23 * Interface that is exposed to remote callers to manipulate desktop mode features. 24 */ 25 interface IDesktopMode { 26 27 /** Show apps on the desktop on the given display */ showDesktopApps(int displayId)28 void showDesktopApps(int displayId); 29 30 /** Stash apps on the desktop to allow launching another app from home screen */ stashDesktopApps(int displayId)31 void stashDesktopApps(int displayId); 32 33 /** Hide apps that may be stashed */ hideStashedDesktopApps(int displayId)34 void hideStashedDesktopApps(int displayId); 35 36 /** Bring task with the given id to front */ showDesktopApp(int taskId)37 oneway void showDesktopApp(int taskId); 38 39 /** Get count of visible desktop tasks on the given display */ getVisibleTaskCount(int displayId)40 int getVisibleTaskCount(int displayId); 41 42 /** Perform cleanup transactions after the animation to split select is complete */ onDesktopSplitSelectAnimComplete(in RunningTaskInfo taskInfo)43 oneway void onDesktopSplitSelectAnimComplete(in RunningTaskInfo taskInfo); 44 45 /** Set listener that will receive callbacks about updates to desktop tasks */ setTaskListener(IDesktopTaskListener listener)46 oneway void setTaskListener(IDesktopTaskListener listener); 47 }