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 * Settings dialogs belonging to the task (e.g. Open by default settings dialog) 58 * @hide 59 */ 60 public static final int TASK_CHILD_LAYER_SETTINGS_DIALOG = 2 * TASK_CHILD_LAYER_REGION_SIZE; 61 62 /** 63 * Captions, window frames and resize handlers around task windows. 64 * @hide 65 */ 66 public static final int TASK_CHILD_LAYER_WINDOW_DECORATIONS = 3 * TASK_CHILD_LAYER_REGION_SIZE; 67 68 /** 69 * Overlays the task when going into PIP w/ gesture navigation. 70 * @hide 71 */ 72 public static final int TASK_CHILD_LAYER_RECENTS_ANIMATION_PIP_OVERLAY = 73 4 * TASK_CHILD_LAYER_REGION_SIZE; 74 75 /** 76 * Allows other apps to add overlays on the task (i.e. game dashboard) 77 * @hide 78 */ 79 public static final int TASK_CHILD_LAYER_TASK_OVERLAY = 5 * TASK_CHILD_LAYER_REGION_SIZE; 80 81 82 /** 83 * Veil to cover task surface and other window decorations during resizes. 84 * @hide 85 */ 86 public static final int TASK_CHILD_LAYER_RESIZE_VEIL = 6 * TASK_CHILD_LAYER_REGION_SIZE; 87 88 /** 89 * Floating menus belonging to a task (e.g. maximize menu). 90 * @hide 91 */ 92 public static final int TASK_CHILD_LAYER_FLOATING_MENU = 7 * TASK_CHILD_LAYER_REGION_SIZE; 93 94 /** 95 * Z-orders of task child layers other than activities, task fragments and layers interleaved 96 * with them, e.g. IME windows. [-10000, 10000) is reserved for these layers. 97 * @hide 98 */ 99 @IntDef({ 100 TASK_CHILD_LAYER_TASK_BACKGROUND, 101 TASK_CHILD_LAYER_LETTERBOX_BACKGROUND, 102 TASK_CHILD_LAYER_COMPAT_UI, 103 TASK_CHILD_LAYER_SETTINGS_DIALOG, 104 TASK_CHILD_LAYER_WINDOW_DECORATIONS, 105 TASK_CHILD_LAYER_RECENTS_ANIMATION_PIP_OVERLAY, 106 TASK_CHILD_LAYER_TASK_OVERLAY, 107 TASK_CHILD_LAYER_RESIZE_VEIL 108 }) 109 public @interface TaskChildLayer {} 110 } 111