Joshua Tsuji | 2e78ec4 | 2020-02-14 11:27:57 -0500 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2020 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.bubbles; |
| 18 | |
Mady Mellor | 9adfe6a | 2020-03-30 17:23:26 -0700 | [diff] [blame] | 19 | import android.app.INotificationManager; |
Joshua Tsuji | 2e78ec4 | 2020-02-14 11:27:57 -0500 | [diff] [blame] | 20 | import android.content.Context; |
Joshua Tsuji | 3347739 | 2020-06-19 18:35:35 -0400 | [diff] [blame] | 21 | import android.content.pm.LauncherApps; |
Mady Mellor | 59a7b98 | 2020-05-11 15:19:59 -0700 | [diff] [blame] | 22 | import android.view.WindowManager; |
Joshua Tsuji | 2e78ec4 | 2020-02-14 11:27:57 -0500 | [diff] [blame] | 23 | |
Mady Mellor | 458a626 | 2020-06-07 21:09:19 -0700 | [diff] [blame] | 24 | import com.android.internal.statusbar.IStatusBarService; |
Ned Burns | aaeb44b | 2020-02-12 23:48:26 -0500 | [diff] [blame] | 25 | import com.android.systemui.dump.DumpManager; |
Joshua Tsuji | be60a58 | 2020-03-23 17:17:26 -0400 | [diff] [blame] | 26 | import com.android.systemui.model.SysUiState; |
Joshua Tsuji | 2e78ec4 | 2020-02-14 11:27:57 -0500 | [diff] [blame] | 27 | import com.android.systemui.plugins.statusbar.StatusBarStateController; |
| 28 | import com.android.systemui.statusbar.FeatureFlags; |
| 29 | import com.android.systemui.statusbar.NotificationLockscreenUserManager; |
| 30 | import com.android.systemui.statusbar.notification.NotificationEntryManager; |
Joshua Tsuji | 2e78ec4 | 2020-02-14 11:27:57 -0500 | [diff] [blame] | 31 | import com.android.systemui.statusbar.notification.collection.NotifPipeline; |
Beverly Tai | d1e175c | 2020-03-10 16:37:04 +0000 | [diff] [blame] | 32 | import com.android.systemui.statusbar.notification.interruption.NotificationInterruptStateProvider; |
Joshua Tsuji | 2e78ec4 | 2020-02-14 11:27:57 -0500 | [diff] [blame] | 33 | import com.android.systemui.statusbar.phone.NotificationGroupManager; |
| 34 | import com.android.systemui.statusbar.phone.NotificationShadeWindowController; |
| 35 | import com.android.systemui.statusbar.phone.ShadeController; |
| 36 | import com.android.systemui.statusbar.policy.ConfigurationController; |
| 37 | import com.android.systemui.statusbar.policy.ZenModeController; |
Joshua Tsuji | 7155bf1 | 2020-02-13 16:14:29 -0500 | [diff] [blame] | 38 | import com.android.systemui.util.FloatingContentCoordinator; |
Joshua Tsuji | 2e78ec4 | 2020-02-14 11:27:57 -0500 | [diff] [blame] | 39 | |
| 40 | /** |
| 41 | * Testable BubbleController subclass that immediately synchronizes surfaces. |
| 42 | */ |
| 43 | public class TestableBubbleController extends BubbleController { |
| 44 | |
| 45 | // Let's assume surfaces can be synchronized immediately. |
| 46 | TestableBubbleController(Context context, |
| 47 | NotificationShadeWindowController notificationShadeWindowController, |
| 48 | StatusBarStateController statusBarStateController, |
| 49 | ShadeController shadeController, |
| 50 | BubbleData data, |
| 51 | ConfigurationController configurationController, |
Beverly Tai | d1e175c | 2020-03-10 16:37:04 +0000 | [diff] [blame] | 52 | NotificationInterruptStateProvider interruptionStateProvider, |
Joshua Tsuji | 2e78ec4 | 2020-02-14 11:27:57 -0500 | [diff] [blame] | 53 | ZenModeController zenModeController, |
| 54 | NotificationLockscreenUserManager lockscreenUserManager, |
| 55 | NotificationGroupManager groupManager, |
| 56 | NotificationEntryManager entryManager, |
| 57 | NotifPipeline notifPipeline, |
| 58 | FeatureFlags featureFlags, |
Ned Burns | aaeb44b | 2020-02-12 23:48:26 -0500 | [diff] [blame] | 59 | DumpManager dumpManager, |
Joshua Tsuji | be60a58 | 2020-03-23 17:17:26 -0400 | [diff] [blame] | 60 | FloatingContentCoordinator floatingContentCoordinator, |
Pinyao Ting | ee191b1 | 2020-04-29 18:35:39 -0700 | [diff] [blame] | 61 | BubbleDataRepository dataRepository, |
Mady Mellor | 9adfe6a | 2020-03-30 17:23:26 -0700 | [diff] [blame] | 62 | SysUiState sysUiState, |
Mady Mellor | 59a7b98 | 2020-05-11 15:19:59 -0700 | [diff] [blame] | 63 | INotificationManager notificationManager, |
Mady Mellor | 458a626 | 2020-06-07 21:09:19 -0700 | [diff] [blame] | 64 | IStatusBarService statusBarService, |
Joshua Tsuji | 3347739 | 2020-06-19 18:35:35 -0400 | [diff] [blame] | 65 | WindowManager windowManager, |
| 66 | LauncherApps launcherApps) { |
Joshua Tsuji | 2e78ec4 | 2020-02-14 11:27:57 -0500 | [diff] [blame] | 67 | super(context, |
| 68 | notificationShadeWindowController, statusBarStateController, shadeController, |
| 69 | data, Runnable::run, configurationController, interruptionStateProvider, |
| 70 | zenModeController, lockscreenUserManager, groupManager, entryManager, |
Pinyao Ting | ee191b1 | 2020-04-29 18:35:39 -0700 | [diff] [blame] | 71 | notifPipeline, featureFlags, dumpManager, floatingContentCoordinator, |
Mady Mellor | 458a626 | 2020-06-07 21:09:19 -0700 | [diff] [blame] | 72 | dataRepository, sysUiState, notificationManager, statusBarService, |
Joshua Tsuji | 3347739 | 2020-06-19 18:35:35 -0400 | [diff] [blame] | 73 | windowManager, launcherApps); |
Joshua Tsuji | 2e78ec4 | 2020-02-14 11:27:57 -0500 | [diff] [blame] | 74 | setInflateSynchronously(true); |
| 75 | } |
| 76 | } |