• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2025 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.shared.bubbles;
18 
19 import com.android.wm.shell.Flags;
20 
21 /**
22  * Bubble anything has some dependent flags, this class simplifies the checks.
23  * (TODO: b/389737359 - remove this when the feature is launched).
24  */
25 public class BubbleAnythingFlagHelper {
26 
BubbleAnythingFlagHelper()27     private BubbleAnythingFlagHelper() {}
28 
29     /** Whether creating any bubble or the overall bubble anything feature is enabled. */
enableCreateAnyBubble()30     public static boolean enableCreateAnyBubble() {
31         return enableBubbleAnything() || Flags.enableCreateAnyBubble();
32     }
33 
34     /**
35      * Whether creating any bubble and transforming to fullscreen, or the overall bubble anything
36      * feature is enabled.
37      */
enableBubbleToFullscreen()38     public static boolean enableBubbleToFullscreen() {
39         return enableBubbleAnything()
40                 || (Flags.enableBubbleToFullscreen()
41                 && Flags.enableCreateAnyBubble());
42     }
43 
44     /** Whether the overall bubble anything feature is enabled. */
enableBubbleAnything()45     public static boolean enableBubbleAnything() {
46         return Flags.enableBubbleAnything();
47     }
48 }
49