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 android.window; 18 19 import android.annotation.IntDef; 20 21 /** 22 * Holds constants related to task managements but not suitable in {@code TaskOrganizer}. 23 * @hide 24 */ 25 public class TaskConstants { 26 27 /** 28 * Sizes of a z-order region assigned to child layers of task layers. Components are allowed to 29 * use all values in [assigned value, assigned value + region size). 30 * @hide 31 */ 32 public static final int TASK_CHILD_LAYER_REGION_SIZE = 10000; 33 34 /** 35 * Indicates system responding to task drag resizing while app content isn't updated. 36 * @hide 37 */ 38 public static final int TASK_CHILD_LAYER_TASK_BACKGROUND = -3 * TASK_CHILD_LAYER_REGION_SIZE; 39 40 /** 41 * Provides solid color letterbox background or blur effect and dimming for the wallpaper 42 * letterbox background. It also listens to touches for double tap gesture for repositioning 43 * letterbox. 44 * @hide 45 */ 46 public static final int TASK_CHILD_LAYER_LETTERBOX_BACKGROUND = 47 -2 * TASK_CHILD_LAYER_REGION_SIZE; 48 49 /** 50 * Compat UI components: reachability education, size compat restart 51 * button, letterbox education, restart dialog. 52 * @hide 53 */ 54 public static final int TASK_CHILD_LAYER_COMPAT_UI = TASK_CHILD_LAYER_REGION_SIZE; 55 56 57 /** 58 * Captions, window frames and resize handlers around task windows. 59 * @hide 60 */ 61 public static final int TASK_CHILD_LAYER_WINDOW_DECORATIONS = 2 * TASK_CHILD_LAYER_REGION_SIZE; 62 63 /** 64 * Overlays the task when going into PIP w/ gesture navigation. 65 * @hide 66 */ 67 public static final int TASK_CHILD_LAYER_RECENTS_ANIMATION_PIP_OVERLAY = 68 3 * TASK_CHILD_LAYER_REGION_SIZE; 69 70 /** 71 * Allows other apps to add overlays on the task (i.e. game dashboard) 72 * @hide 73 */ 74 public static final int TASK_CHILD_LAYER_TASK_OVERLAY = 4 * TASK_CHILD_LAYER_REGION_SIZE; 75 76 77 /** 78 * Veil to cover task surface and other window decorations during resizes. 79 * @hide 80 */ 81 public static final int TASK_CHILD_LAYER_RESIZE_VEIL = 6 * TASK_CHILD_LAYER_REGION_SIZE; 82 83 /** 84 * Floating menus belonging to a task (e.g. maximize menu). 85 * @hide 86 */ 87 public static final int TASK_CHILD_LAYER_FLOATING_MENU = 7 * TASK_CHILD_LAYER_REGION_SIZE; 88 89 /** 90 * Z-orders of task child layers other than activities, task fragments and layers interleaved 91 * with them, e.g. IME windows. [-10000, 10000) is reserved for these layers. 92 * @hide 93 */ 94 @IntDef({ 95 TASK_CHILD_LAYER_TASK_BACKGROUND, 96 TASK_CHILD_LAYER_LETTERBOX_BACKGROUND, 97 TASK_CHILD_LAYER_COMPAT_UI, 98 TASK_CHILD_LAYER_WINDOW_DECORATIONS, 99 TASK_CHILD_LAYER_RECENTS_ANIMATION_PIP_OVERLAY, 100 TASK_CHILD_LAYER_TASK_OVERLAY, 101 TASK_CHILD_LAYER_RESIZE_VEIL 102 }) 103 public @interface TaskChildLayer {} 104 } 105