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