1634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen/*
2634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen * Copyright (C) 2016 The Android Open Source Project
3634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen *
4634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen * Licensed under the Apache License, Version 2.0 (the "License");
5634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen * you may not use this file except in compliance with the License.
6634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen * You may obtain a copy of the License at
7634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen *
8634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen *      http://www.apache.org/licenses/LICENSE-2.0
9634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen *
10634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen * Unless required by applicable law or agreed to in writing, software
11634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen * distributed under the License is distributed on an "AS IS" BASIS,
12634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen * See the License for the specific language governing permissions and
14634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen * limitations under the License.
15634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen */
16634acb9712f2627acf9279a78d120ea2da1e0464Yao Chenpackage com.android.systemui.car;
17634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen
18634acb9712f2627acf9279a78d120ea2da1e0464Yao Chenimport android.content.Context;
19782cd6711bc15e3f03456210b3543a67606d6591Jason Monkimport android.util.ArrayMap;
207e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenningimport android.view.View;
21634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen
227e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenningimport com.android.internal.widget.LockPatternUtils;
237e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenningimport com.android.keyguard.ViewMediatorCallback;
24782cd6711bc15e3f03456210b3543a67606d6591Jason Monkimport com.android.systemui.Dependency.DependencyProvider;
25634acb9712f2627acf9279a78d120ea2da1e0464Yao Chenimport com.android.systemui.SystemUIFactory;
26a6d8cf294dfb587f130fdecc5e6897e75de7bf45Eliot Courtneyimport com.android.systemui.statusbar.NotificationEntryManager;
2738b46f82f718891de608ca31e49034d824a88a12Brad Stenningimport com.android.systemui.statusbar.car.CarFacetButtonController;
287e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenningimport com.android.systemui.statusbar.car.CarStatusBar;
297e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenningimport com.android.systemui.statusbar.car.CarStatusBarKeyguardViewManager;
3038b46f82f718891de608ca31e49034d824a88a12Brad Stenningimport com.android.systemui.statusbar.car.hvac.HvacController;
317e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenningimport com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
32634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen
33634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen/**
34634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen * Class factory to provide car specific SystemUI components.
35634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen */
36634acb9712f2627acf9279a78d120ea2da1e0464Yao Chenpublic class CarSystemUIFactory extends SystemUIFactory {
377e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenning
387e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenning    public StatusBarKeyguardViewManager createStatusBarKeyguardViewManager(Context context,
397e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenning            ViewMediatorCallback viewMediatorCallback, LockPatternUtils lockPatternUtils) {
407e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenning        return new CarStatusBarKeyguardViewManager(context, viewMediatorCallback, lockPatternUtils);
417e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenning    }
427e4118135a6e2b685a98073e26637d5d89fdec06Brad Stenning
43634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen    @Override
44782cd6711bc15e3f03456210b3543a67606d6591Jason Monk    public void injectDependencies(ArrayMap<Object, DependencyProvider> providers,
45782cd6711bc15e3f03456210b3543a67606d6591Jason Monk            Context context) {
46782cd6711bc15e3f03456210b3543a67606d6591Jason Monk        super.injectDependencies(providers, context);
476c313d3224c878d832db3ed833f4a3dd3786fb1fEliot Courtney        providers.put(NotificationEntryManager.class,
486c313d3224c878d832db3ed833f4a3dd3786fb1fEliot Courtney                () -> new CarNotificationEntryManager(context));
4938b46f82f718891de608ca31e49034d824a88a12Brad Stenning        providers.put(CarFacetButtonController.class, () -> new CarFacetButtonController(context));
5038b46f82f718891de608ca31e49034d824a88a12Brad Stenning        providers.put(HvacController.class, () -> new HvacController(context));
51634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen    }
52634acb9712f2627acf9279a78d120ea2da1e0464Yao Chen}
53