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 com.android.systemui.stackdivider;
18 
19 import android.content.Context;
20 import android.os.Handler;
21 
22 import com.android.systemui.TransactionPool;
23 import com.android.systemui.dagger.qualifiers.Main;
24 import com.android.systemui.recents.Recents;
25 import com.android.systemui.statusbar.policy.KeyguardStateController;
26 import com.android.systemui.wm.DisplayController;
27 import com.android.systemui.wm.DisplayImeController;
28 import com.android.systemui.wm.SystemWindows;
29 
30 import java.util.Optional;
31 
32 import javax.inject.Singleton;
33 
34 import dagger.Lazy;
35 import dagger.Module;
36 import dagger.Provides;
37 
38 /**
39  * Module which provides a Divider.
40  */
41 @Module
42 public class DividerModule {
43     @Singleton
44     @Provides
provideDivider(Context context, Optional<Lazy<Recents>> recentsOptionalLazy, DisplayController displayController, SystemWindows systemWindows, DisplayImeController imeController, @Main Handler handler, KeyguardStateController keyguardStateController, TransactionPool transactionPool)45     static Divider provideDivider(Context context, Optional<Lazy<Recents>> recentsOptionalLazy,
46             DisplayController displayController, SystemWindows systemWindows,
47             DisplayImeController imeController, @Main Handler handler,
48             KeyguardStateController keyguardStateController, TransactionPool transactionPool) {
49         return new Divider(context, recentsOptionalLazy, displayController, systemWindows,
50                 imeController, handler, keyguardStateController, transactionPool);
51     }
52 }
53