1 /* 2 * Copyright (C) 2024 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.bubbles 18 19 import com.android.wm.shell.shared.bubbles.BubbleBarLocation 20 import java.util.Collections 21 22 /** Fake implementation of [BubbleExpandedViewManager] for testing. */ 23 class FakeBubbleExpandedViewManager(var bubbleBar: Boolean = false, var expanded: Boolean = false) : 24 BubbleExpandedViewManager { 25 26 override val overflowBubbles: List<Bubble> 27 get() = Collections.emptyList() 28 setOverflowListenernull29 override fun setOverflowListener(listener: BubbleData.Listener) {} 30 collapseStacknull31 override fun collapseStack() {} 32 updateWindowFlagsForBackpressnull33 override fun updateWindowFlagsForBackpress(intercept: Boolean) {} 34 promoteBubbleFromOverflownull35 override fun promoteBubbleFromOverflow(bubble: Bubble) {} 36 removeBubblenull37 override fun removeBubble(key: String, reason: Int) {} 38 dismissBubblenull39 override fun dismissBubble(bubble: Bubble, reason: Int) {} 40 setNoteBubbleTaskIdnull41 override fun setNoteBubbleTaskId(key: String, taskId: Int) {} 42 isStackExpandednull43 override fun isStackExpanded(): Boolean { 44 return expanded 45 } 46 isShowingAsBubbleBarnull47 override fun isShowingAsBubbleBar(): Boolean { 48 return bubbleBar 49 } 50 hideCurrentInputMethodnull51 override fun hideCurrentInputMethod() {} 52 updateBubbleBarLocationnull53 override fun updateBubbleBarLocation(location: BubbleBarLocation, source: Int) {} 54 } 55