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