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 com.android.systemui.media.taptotransfer.receiver
18 
19 import android.content.Context
20 import android.os.Handler
21 import android.os.PowerManager
22 import android.view.ViewGroup
23 import android.view.WindowManager
24 import android.view.accessibility.AccessibilityManager
25 import com.android.systemui.dump.DumpManager
26 import com.android.systemui.media.taptotransfer.MediaTttFlags
27 import com.android.systemui.statusbar.CommandQueue
28 import com.android.systemui.statusbar.policy.ConfigurationController
29 import com.android.systemui.temporarydisplay.TemporaryViewUiEventLogger
30 import com.android.systemui.util.concurrency.DelayableExecutor
31 import com.android.systemui.util.time.SystemClock
32 import com.android.systemui.util.view.ViewUtil
33 import com.android.systemui.util.wakelock.WakeLock
34 
35 class FakeMediaTttChipControllerReceiver(
36     commandQueue: CommandQueue,
37     context: Context,
38     logger: MediaTttReceiverLogger,
39     windowManager: WindowManager,
40     mainExecutor: DelayableExecutor,
41     accessibilityManager: AccessibilityManager,
42     configurationController: ConfigurationController,
43     dumpManager: DumpManager,
44     powerManager: PowerManager,
45     mainHandler: Handler,
46     mediaTttFlags: MediaTttFlags,
47     uiEventLogger: MediaTttReceiverUiEventLogger,
48     viewUtil: ViewUtil,
49     wakeLockBuilder: WakeLock.Builder,
50     systemClock: SystemClock,
51     rippleController: MediaTttReceiverRippleController,
52     temporaryViewUiEventLogger: TemporaryViewUiEventLogger,
53 ) :
54     MediaTttChipControllerReceiver(
55         commandQueue,
56         context,
57         logger,
58         windowManager,
59         mainExecutor,
60         accessibilityManager,
61         configurationController,
62         dumpManager,
63         powerManager,
64         mainHandler,
65         mediaTttFlags,
66         uiEventLogger,
67         viewUtil,
68         wakeLockBuilder,
69         systemClock,
70         rippleController,
71         temporaryViewUiEventLogger,
72     ) {
animateViewOutnull73     override fun animateViewOut(view: ViewGroup, removalReason: String?, onAnimationEnd: Runnable) {
74         // Just bypass the animation in tests
75         onAnimationEnd.run()
76     }
77 }
78