diff options
Diffstat (limited to 'src/com/android/server/telecom/TelecomSystem.java')
-rw-r--r-- | src/com/android/server/telecom/TelecomSystem.java | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/src/com/android/server/telecom/TelecomSystem.java b/src/com/android/server/telecom/TelecomSystem.java index da325f71b..101cd2d09 100644 --- a/src/com/android/server/telecom/TelecomSystem.java +++ b/src/com/android/server/telecom/TelecomSystem.java @@ -45,8 +45,12 @@ import com.android.server.telecom.bluetooth.BluetoothDeviceManager; import com.android.server.telecom.bluetooth.BluetoothRouteManager; import com.android.server.telecom.bluetooth.BluetoothStateReceiver; import com.android.server.telecom.callfiltering.BlockedNumbersAdapter; +import com.android.server.telecom.callfiltering.CallFilterResultCallback; +import com.android.server.telecom.callfiltering.IncomingCallFilterGraph; +import com.android.server.telecom.callfiltering.IncomingCallFilterGraphProvider; import com.android.server.telecom.components.UserCallIntentProcessor; import com.android.server.telecom.components.UserCallIntentProcessorFactory; +import com.android.server.telecom.flags.FeatureFlags; import com.android.server.telecom.ui.AudioProcessingNotification; import com.android.server.telecom.ui.CallStreamingNotification; import com.android.server.telecom.ui.DisconnectedCallNotifier; @@ -224,7 +228,8 @@ public class TelecomSystem { Ringer.AccessibilityManagerAdapter accessibilityManagerAdapter, Executor asyncTaskExecutor, Executor asyncCallAudioTaskExecutor, - BlockedNumbersAdapter blockedNumbersAdapter) { + BlockedNumbersAdapter blockedNumbersAdapter, + FeatureFlags featureFlags) { mContext = context.getApplicationContext(); LogUtils.initLogging(mContext); android.telecom.Log.setLock(mLock); @@ -250,13 +255,19 @@ public class TelecomSystem { return context.getContentResolver().openInputStream(uri); } }); + CallAudioCommunicationDeviceTracker communicationDeviceTracker = new + CallAudioCommunicationDeviceTracker(mContext); BluetoothDeviceManager bluetoothDeviceManager = new BluetoothDeviceManager(mContext, - mContext.getSystemService(BluetoothManager.class).getAdapter()); + mContext.getSystemService(BluetoothManager.class).getAdapter(), + communicationDeviceTracker, featureFlags); BluetoothRouteManager bluetoothRouteManager = new BluetoothRouteManager(mContext, mLock, - bluetoothDeviceManager, new Timeouts.Adapter()); + bluetoothDeviceManager, new Timeouts.Adapter(), + communicationDeviceTracker, featureFlags); BluetoothStateReceiver bluetoothStateReceiver = new BluetoothStateReceiver( - bluetoothDeviceManager, bluetoothRouteManager); + bluetoothDeviceManager, bluetoothRouteManager, + communicationDeviceTracker, featureFlags); mContext.registerReceiver(bluetoothStateReceiver, BluetoothStateReceiver.INTENT_FILTER); + communicationDeviceTracker.setBluetoothRouteManager(bluetoothRouteManager); WiredHeadsetManager wiredHeadsetManager = new WiredHeadsetManager(mContext); SystemStateHelper systemStateHelper = new SystemStateHelper(mContext, mLock); @@ -264,7 +275,8 @@ public class TelecomSystem { mMissedCallNotifier = missedCallNotifierImplFactory .makeMissedCallNotifierImpl(mContext, mPhoneAccountRegistrar, defaultDialerCache, - deviceIdleControllerAdapter); + deviceIdleControllerAdapter, + featureFlags); DisconnectedCallNotifier.Factory disconnectedCallNotifierFactory = new DisconnectedCallNotifier.Default(); @@ -283,7 +295,7 @@ public class TelecomSystem { EmergencyCallHelper emergencyCallHelper) { return new InCallController(context, lock, callsManager, systemStateProvider, defaultDialerCache, timeoutsAdapter, emergencyCallHelper, - new CarModeTracker(), clockProxy); + new CarModeTracker(), clockProxy, featureFlags); } }; @@ -401,7 +413,10 @@ public class TelecomSystem { blockedNumbersAdapter, transactionManager, emergencyCallDiagnosticLogger, - callStreamingNotification); + communicationDeviceTracker, + callStreamingNotification, + featureFlags, + IncomingCallFilterGraph::new); mIncomingCallNotifier = incomingCallNotifier; incomingCallNotifier.setCallsManagerProxy(new IncomingCallNotifier.CallsManagerProxy() { @@ -445,7 +460,7 @@ public class TelecomSystem { } mCallIntentProcessor = new CallIntentProcessor(mContext, mCallsManager, - defaultDialerCache); + defaultDialerCache, featureFlags); mTelecomBroadcastIntentProcessor = new TelecomBroadcastIntentProcessor( mContext, mCallsManager); @@ -469,6 +484,7 @@ public class TelecomSystem { defaultDialerCache, new TelecomServiceImpl.SubscriptionManagerAdapterImpl(), new TelecomServiceImpl.SettingsSecureAdapterImpl(), + featureFlags, mLock); } finally { Log.endSession(); |