1 /* 2 * Copyright (C) 2019 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.view; 18 19 import static android.view.WindowInsetsController.APPEARANCE_FORCE_LIGHT_NAVIGATION_BARS; 20 import static android.view.WindowInsetsController.APPEARANCE_LIGHT_CAPTION_BARS; 21 import static android.view.WindowInsetsController.APPEARANCE_LIGHT_NAVIGATION_BARS; 22 import static android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS; 23 import static android.view.WindowInsetsController.APPEARANCE_LOW_PROFILE_BARS; 24 import static android.view.WindowInsetsController.APPEARANCE_OPAQUE_NAVIGATION_BARS; 25 import static android.view.WindowInsetsController.APPEARANCE_OPAQUE_STATUS_BARS; 26 import static android.view.WindowInsetsController.APPEARANCE_SEMI_TRANSPARENT_NAVIGATION_BARS; 27 import static android.view.WindowInsetsController.APPEARANCE_SEMI_TRANSPARENT_STATUS_BARS; 28 import static android.view.WindowInsetsController.APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND; 29 import static android.view.WindowInsetsController.BEHAVIOR_DEFAULT; 30 import static android.view.WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE; 31 32 import android.view.WindowInsetsController.Appearance; 33 import android.view.WindowInsetsController.Behavior; 34 35 /** 36 * Contains the information about {@link Appearance} and {@link Behavior} of system windows which 37 * can produce insets. This is for carrying the request from a client to the system server. 38 * @hide 39 */ 40 public class InsetsFlags { 41 42 @ViewDebug.ExportedProperty(flagMapping = { 43 @ViewDebug.FlagToString( 44 mask = APPEARANCE_OPAQUE_STATUS_BARS, 45 equals = APPEARANCE_OPAQUE_STATUS_BARS, 46 name = "OPAQUE_STATUS_BARS"), 47 @ViewDebug.FlagToString( 48 mask = APPEARANCE_OPAQUE_NAVIGATION_BARS, 49 equals = APPEARANCE_OPAQUE_NAVIGATION_BARS, 50 name = "OPAQUE_NAVIGATION_BARS"), 51 @ViewDebug.FlagToString( 52 mask = APPEARANCE_LOW_PROFILE_BARS, 53 equals = APPEARANCE_LOW_PROFILE_BARS, 54 name = "LOW_PROFILE_BARS"), 55 @ViewDebug.FlagToString( 56 mask = APPEARANCE_LIGHT_STATUS_BARS, 57 equals = APPEARANCE_LIGHT_STATUS_BARS, 58 name = "LIGHT_STATUS_BARS"), 59 @ViewDebug.FlagToString( 60 mask = APPEARANCE_LIGHT_NAVIGATION_BARS, 61 equals = APPEARANCE_LIGHT_NAVIGATION_BARS, 62 name = "LIGHT_NAVIGATION_BARS"), 63 @ViewDebug.FlagToString( 64 mask = APPEARANCE_SEMI_TRANSPARENT_STATUS_BARS, 65 equals = APPEARANCE_SEMI_TRANSPARENT_STATUS_BARS, 66 name = "SEMI_TRANSPARENT_STATUS_BARS"), 67 @ViewDebug.FlagToString( 68 mask = APPEARANCE_SEMI_TRANSPARENT_NAVIGATION_BARS, 69 equals = APPEARANCE_SEMI_TRANSPARENT_NAVIGATION_BARS, 70 name = "SEMI_TRANSPARENT_NAVIGATION_BARS"), 71 @ViewDebug.FlagToString( 72 mask = APPEARANCE_FORCE_LIGHT_NAVIGATION_BARS, 73 equals = APPEARANCE_FORCE_LIGHT_NAVIGATION_BARS, 74 name = "FORCE_LIGHT_NAVIGATION_BARS"), 75 @ViewDebug.FlagToString( 76 mask = APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND, 77 equals = APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND, 78 name = "APPEARANCE_TRANSPARENT_CAPTION_BAR_BACKGROUND"), 79 @ViewDebug.FlagToString( 80 mask = APPEARANCE_LIGHT_CAPTION_BARS, 81 equals = APPEARANCE_LIGHT_CAPTION_BARS, 82 name = "APPEARANCE_LIGHT_CAPTION_BARS") 83 }) 84 public @Appearance int appearance; 85 86 @ViewDebug.ExportedProperty(flagMapping = { 87 @ViewDebug.FlagToString( 88 mask = BEHAVIOR_DEFAULT, 89 equals = BEHAVIOR_DEFAULT, 90 name = "DEFAULT"), 91 @ViewDebug.FlagToString( 92 mask = BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE, 93 equals = BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE, 94 name = "SHOW_TRANSIENT_BARS_BY_SWIPE") 95 }) 96 public @Behavior int behavior = BEHAVIOR_DEFAULT; 97 } 98