Loading src/com/android/server/telecom/CallRecordingTonePlayer.java +2 −3 Original line number Diff line number Diff line Loading @@ -128,12 +128,11 @@ public class CallRecordingTonePlayer extends CallsManagerListenerBase { public CallRecordingTonePlayer(Context context, AudioManager audioManager, Timeouts.Adapter timeouts, TelecomSystem.SyncRoot lock, FeatureFlags featureFlags) { mFeatureFlags = featureFlags; mContext = context; mAudioManager = audioManager; mLock = lock; mRepeatInterval = timeouts.getCallRecordingToneRepeatIntervalMillis( context.getContentResolver()); mFeatureFlags = featureFlags; mRepeatInterval = timeouts.getCallRecordingToneRepeatIntervalMillis(context, featureFlags); } @Override Loading src/com/android/server/telecom/CallScreeningServiceHelper.java +6 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.text.TextUtils; import com.android.internal.telecom.ICallScreeningAdapter; import com.android.internal.telecom.ICallScreeningService; import com.android.server.telecom.flags.FeatureFlags; import java.util.List; import java.util.concurrent.CompletableFuture; Loading Loading @@ -74,10 +75,12 @@ public class CallScreeningServiceHelper { private final Session mLoggingSession; private CompletableFuture mFuture; private String mPackageName; private final FeatureFlags mFeatureFlags; public CallScreeningServiceHelper(Context context, TelecomSystem.SyncRoot telecomLock, String packageName, ParcelableCallUtils.Converter converter, UserHandle userHandle, Call call, AppLabelProxy appLabelProxy) { UserHandle userHandle, Call call, AppLabelProxy appLabelProxy, FeatureFlags featureFlags) { mContext = context; mTelecomLock = telecomLock; mParcelableCallUtilsConverter = converter; Loading @@ -86,6 +89,7 @@ public class CallScreeningServiceHelper { mPackageName = packageName; mAppLabelProxy = appLabelProxy; mLoggingSession = Log.createSubsession(); mFeatureFlags = featureFlags; } /** Loading Loading @@ -184,7 +188,7 @@ public class CallScreeningServiceHelper { Log.endSession(); } }, Timeouts.getCallScreeningTimeoutMillis(mContext.getContentResolver())); Timeouts.getCallScreeningTimeoutMillis(mContext, mFeatureFlags)); return mFuture; } Loading src/com/android/server/telecom/CallsManager.java +9 −8 Original line number Diff line number Diff line Loading @@ -716,7 +716,7 @@ public class CallsManager extends Call.ListenerBase } mDtmfLocalTonePlayer = new DtmfLocalTonePlayer(new DtmfLocalTonePlayer.ToneGeneratorProxy()); new DtmfLocalTonePlayer(new DtmfLocalTonePlayer.ToneGeneratorProxy(), featureFlags); // TODO: add another flag check when // bluetoothDeviceManager.getBluetoothHeadset().isScoManagedByAudio() // available and return true Loading Loading @@ -790,7 +790,7 @@ public class CallsManager extends Call.ListenerBase mConnectionSvrFocusMgr = connectionServiceFocusManagerFactory.create(mRequester); mHeadsetMediaButton = headsetMediaButtonFactory.create(context, this, mLock); mTtyManager = new TtyManager(context, mWiredHeadsetManager); mTtyManager = new TtyManager(context, mWiredHeadsetManager, featureFlags); mProximitySensorManager = proximitySensorManagerFactory.create(context, this); mPhoneStateBroadcaster = new PhoneStateBroadcaster(this); mCallLogManager = new CallLogManager(context, phoneAccountRegistrar, mMissedCallNotifier, Loading Loading @@ -1297,7 +1297,7 @@ public class CallsManager extends Call.ListenerBase } }; mHandler.postDelayed(mStopTone.prepare(), Timeouts.getDelayBetweenDtmfTonesMillis(mContext.getContentResolver())); Timeouts.getDelayBetweenDtmfTonesMillis(mContext, mFeatureFlags)); } else if (nextChar == 0 || nextChar == TelecomManager.DTMF_CHARACTER_WAIT || nextChar == TelecomManager.DTMF_CHARACTER_PAUSE) { // Stop the tone if a tone is playing, removing any other stopTone callbacks since Loading Loading @@ -2236,7 +2236,7 @@ public class CallsManager extends Call.ListenerBase } Context userContext = mContext.createContextAsUser(getCurrentUserHandle(), 0); return PhoneAccountSuggestionHelper.bindAndGetSuggestions(userContext, finalCall.getHandle(), potentialPhoneAccounts); finalCall.getHandle(), potentialPhoneAccounts, mFeatureFlags); }, new LoggedHandlerExecutor(outgoingCallHandler, "CM.cOCSS", mLock)); Loading Loading @@ -2790,7 +2790,7 @@ public class CallsManager extends Call.ListenerBase public CharSequence getAppLabel(String packageName, UserHandle userHandle) { return Util.getAppLabel(mContext, userHandle, packageName, mFeatureFlags); } }).process(); }, mFeatureFlags).process(); future.thenApply( v -> { Log.i(this, "Outgoing caller ID complete"); return null; Loading Loading @@ -4041,8 +4041,9 @@ public class CallsManager extends Call.ListenerBase } private boolean isRttSettingOn(PhoneAccountHandle handle) { int userId = UserUtil.getUserIdFromContext(mContext, mFeatureFlags); boolean isRttModeSettingOn = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.RTT_CALLING_MODE, 0, mContext.getUserId()) != 0; Settings.Secure.RTT_CALLING_MODE, 0, userId) != 0; // If the carrier config says that we should ignore the RTT mode setting from the user, // assume that it's off (i.e. only make an RTT call if it's requested through the extra). boolean shouldIgnoreRttModeSetting = getCarrierConfigForPhoneAccount(handle) Loading Loading @@ -4372,8 +4373,8 @@ public class CallsManager extends Call.ListenerBase // Setup the future with a timeout so that the CDS is time boxed. CompletableFuture<Boolean> future = call.initializeDiagnosticCompleteFuture( mTimeoutsAdapter.getCallDiagnosticServiceTimeoutMillis( mContext.getContentResolver())); mTimeoutsAdapter.getCallDiagnosticServiceTimeoutMillis(mContext, mFeatureFlags)); // Post the disconnection updates to the future for completion once the CDS returns // with it's overridden disconnect message. Loading src/com/android/server/telecom/CreateConnectionProcessor.java +1 −1 Original line number Diff line number Diff line Loading @@ -351,7 +351,7 @@ public class CreateConnectionProcessor implements CreateConnectionResponse { clearTimeout(); CreateConnectionTimeout timeout = new CreateConnectionTimeout( mContext, mPhoneAccountRegistrar, service, mCall, mTimeoutsAdapter); mContext, mPhoneAccountRegistrar, service, mCall, mFlags, mTimeoutsAdapter); if (timeout.isTimeoutNeededForCall(getConnectionServices(mAttemptRecords), attempt.connectionManagerPhoneAccount)) { mTimeout = timeout; Loading src/com/android/server/telecom/CreateConnectionTimeout.java +8 −6 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.telecom.PhoneAccountHandle; import android.telephony.TelephonyManager; import com.android.internal.annotations.VisibleForTesting; import com.android.server.telecom.flags.FeatureFlags; import java.util.Collection; import java.util.Objects; Loading @@ -43,15 +44,18 @@ public final class CreateConnectionTimeout extends Runnable { private boolean mIsRegistered; private boolean mIsCallTimedOut; private final Timeouts.Adapter mTimeoutsAdapter; private final FeatureFlags mFlags; @VisibleForTesting public CreateConnectionTimeout(Context context, PhoneAccountRegistrar phoneAccountRegistrar, ConnectionServiceWrapper service, Call call, Timeouts.Adapter timeoutsAdapter) { ConnectionServiceWrapper service, Call call, FeatureFlags featureFlags, Timeouts.Adapter timeoutsAdapter) { super("CCT", null /*lock*/); mContext = context; mPhoneAccountRegistrar = phoneAccountRegistrar; mConnectionService = service; mCall = call; mFlags = featureFlags; mTimeoutsAdapter = timeoutsAdapter; } Loading Loading @@ -158,15 +162,13 @@ public final class CreateConnectionTimeout extends Runnable { TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (telephonyManager.isRadioOn()) { return mTimeoutsAdapter.getEmergencyCallTimeoutMillis( mContext.getContentResolver()); return mTimeoutsAdapter.getEmergencyCallTimeoutMillis(mContext, mFlags); } else { return mTimeoutsAdapter.getEmergencyCallTimeoutRadioOffMillis( mContext.getContentResolver()); return mTimeoutsAdapter.getEmergencyCallTimeoutRadioOffMillis(mContext, mFlags); } } catch (UnsupportedOperationException uoe) { Log.e(this, uoe, "getTimeoutLengthMillis - telephony is not supported"); return mTimeoutsAdapter.getEmergencyCallTimeoutMillis(mContext.getContentResolver()); return mTimeoutsAdapter.getEmergencyCallTimeoutMillis(mContext, mFlags); } } } Loading
src/com/android/server/telecom/CallRecordingTonePlayer.java +2 −3 Original line number Diff line number Diff line Loading @@ -128,12 +128,11 @@ public class CallRecordingTonePlayer extends CallsManagerListenerBase { public CallRecordingTonePlayer(Context context, AudioManager audioManager, Timeouts.Adapter timeouts, TelecomSystem.SyncRoot lock, FeatureFlags featureFlags) { mFeatureFlags = featureFlags; mContext = context; mAudioManager = audioManager; mLock = lock; mRepeatInterval = timeouts.getCallRecordingToneRepeatIntervalMillis( context.getContentResolver()); mFeatureFlags = featureFlags; mRepeatInterval = timeouts.getCallRecordingToneRepeatIntervalMillis(context, featureFlags); } @Override Loading
src/com/android/server/telecom/CallScreeningServiceHelper.java +6 −2 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ import android.text.TextUtils; import com.android.internal.telecom.ICallScreeningAdapter; import com.android.internal.telecom.ICallScreeningService; import com.android.server.telecom.flags.FeatureFlags; import java.util.List; import java.util.concurrent.CompletableFuture; Loading Loading @@ -74,10 +75,12 @@ public class CallScreeningServiceHelper { private final Session mLoggingSession; private CompletableFuture mFuture; private String mPackageName; private final FeatureFlags mFeatureFlags; public CallScreeningServiceHelper(Context context, TelecomSystem.SyncRoot telecomLock, String packageName, ParcelableCallUtils.Converter converter, UserHandle userHandle, Call call, AppLabelProxy appLabelProxy) { UserHandle userHandle, Call call, AppLabelProxy appLabelProxy, FeatureFlags featureFlags) { mContext = context; mTelecomLock = telecomLock; mParcelableCallUtilsConverter = converter; Loading @@ -86,6 +89,7 @@ public class CallScreeningServiceHelper { mPackageName = packageName; mAppLabelProxy = appLabelProxy; mLoggingSession = Log.createSubsession(); mFeatureFlags = featureFlags; } /** Loading Loading @@ -184,7 +188,7 @@ public class CallScreeningServiceHelper { Log.endSession(); } }, Timeouts.getCallScreeningTimeoutMillis(mContext.getContentResolver())); Timeouts.getCallScreeningTimeoutMillis(mContext, mFeatureFlags)); return mFuture; } Loading
src/com/android/server/telecom/CallsManager.java +9 −8 Original line number Diff line number Diff line Loading @@ -716,7 +716,7 @@ public class CallsManager extends Call.ListenerBase } mDtmfLocalTonePlayer = new DtmfLocalTonePlayer(new DtmfLocalTonePlayer.ToneGeneratorProxy()); new DtmfLocalTonePlayer(new DtmfLocalTonePlayer.ToneGeneratorProxy(), featureFlags); // TODO: add another flag check when // bluetoothDeviceManager.getBluetoothHeadset().isScoManagedByAudio() // available and return true Loading Loading @@ -790,7 +790,7 @@ public class CallsManager extends Call.ListenerBase mConnectionSvrFocusMgr = connectionServiceFocusManagerFactory.create(mRequester); mHeadsetMediaButton = headsetMediaButtonFactory.create(context, this, mLock); mTtyManager = new TtyManager(context, mWiredHeadsetManager); mTtyManager = new TtyManager(context, mWiredHeadsetManager, featureFlags); mProximitySensorManager = proximitySensorManagerFactory.create(context, this); mPhoneStateBroadcaster = new PhoneStateBroadcaster(this); mCallLogManager = new CallLogManager(context, phoneAccountRegistrar, mMissedCallNotifier, Loading Loading @@ -1297,7 +1297,7 @@ public class CallsManager extends Call.ListenerBase } }; mHandler.postDelayed(mStopTone.prepare(), Timeouts.getDelayBetweenDtmfTonesMillis(mContext.getContentResolver())); Timeouts.getDelayBetweenDtmfTonesMillis(mContext, mFeatureFlags)); } else if (nextChar == 0 || nextChar == TelecomManager.DTMF_CHARACTER_WAIT || nextChar == TelecomManager.DTMF_CHARACTER_PAUSE) { // Stop the tone if a tone is playing, removing any other stopTone callbacks since Loading Loading @@ -2236,7 +2236,7 @@ public class CallsManager extends Call.ListenerBase } Context userContext = mContext.createContextAsUser(getCurrentUserHandle(), 0); return PhoneAccountSuggestionHelper.bindAndGetSuggestions(userContext, finalCall.getHandle(), potentialPhoneAccounts); finalCall.getHandle(), potentialPhoneAccounts, mFeatureFlags); }, new LoggedHandlerExecutor(outgoingCallHandler, "CM.cOCSS", mLock)); Loading Loading @@ -2790,7 +2790,7 @@ public class CallsManager extends Call.ListenerBase public CharSequence getAppLabel(String packageName, UserHandle userHandle) { return Util.getAppLabel(mContext, userHandle, packageName, mFeatureFlags); } }).process(); }, mFeatureFlags).process(); future.thenApply( v -> { Log.i(this, "Outgoing caller ID complete"); return null; Loading Loading @@ -4041,8 +4041,9 @@ public class CallsManager extends Call.ListenerBase } private boolean isRttSettingOn(PhoneAccountHandle handle) { int userId = UserUtil.getUserIdFromContext(mContext, mFeatureFlags); boolean isRttModeSettingOn = Settings.Secure.getIntForUser(mContext.getContentResolver(), Settings.Secure.RTT_CALLING_MODE, 0, mContext.getUserId()) != 0; Settings.Secure.RTT_CALLING_MODE, 0, userId) != 0; // If the carrier config says that we should ignore the RTT mode setting from the user, // assume that it's off (i.e. only make an RTT call if it's requested through the extra). boolean shouldIgnoreRttModeSetting = getCarrierConfigForPhoneAccount(handle) Loading Loading @@ -4372,8 +4373,8 @@ public class CallsManager extends Call.ListenerBase // Setup the future with a timeout so that the CDS is time boxed. CompletableFuture<Boolean> future = call.initializeDiagnosticCompleteFuture( mTimeoutsAdapter.getCallDiagnosticServiceTimeoutMillis( mContext.getContentResolver())); mTimeoutsAdapter.getCallDiagnosticServiceTimeoutMillis(mContext, mFeatureFlags)); // Post the disconnection updates to the future for completion once the CDS returns // with it's overridden disconnect message. Loading
src/com/android/server/telecom/CreateConnectionProcessor.java +1 −1 Original line number Diff line number Diff line Loading @@ -351,7 +351,7 @@ public class CreateConnectionProcessor implements CreateConnectionResponse { clearTimeout(); CreateConnectionTimeout timeout = new CreateConnectionTimeout( mContext, mPhoneAccountRegistrar, service, mCall, mTimeoutsAdapter); mContext, mPhoneAccountRegistrar, service, mCall, mFlags, mTimeoutsAdapter); if (timeout.isTimeoutNeededForCall(getConnectionServices(mAttemptRecords), attempt.connectionManagerPhoneAccount)) { mTimeout = timeout; Loading
src/com/android/server/telecom/CreateConnectionTimeout.java +8 −6 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.telecom.PhoneAccountHandle; import android.telephony.TelephonyManager; import com.android.internal.annotations.VisibleForTesting; import com.android.server.telecom.flags.FeatureFlags; import java.util.Collection; import java.util.Objects; Loading @@ -43,15 +44,18 @@ public final class CreateConnectionTimeout extends Runnable { private boolean mIsRegistered; private boolean mIsCallTimedOut; private final Timeouts.Adapter mTimeoutsAdapter; private final FeatureFlags mFlags; @VisibleForTesting public CreateConnectionTimeout(Context context, PhoneAccountRegistrar phoneAccountRegistrar, ConnectionServiceWrapper service, Call call, Timeouts.Adapter timeoutsAdapter) { ConnectionServiceWrapper service, Call call, FeatureFlags featureFlags, Timeouts.Adapter timeoutsAdapter) { super("CCT", null /*lock*/); mContext = context; mPhoneAccountRegistrar = phoneAccountRegistrar; mConnectionService = service; mCall = call; mFlags = featureFlags; mTimeoutsAdapter = timeoutsAdapter; } Loading Loading @@ -158,15 +162,13 @@ public final class CreateConnectionTimeout extends Runnable { TelephonyManager telephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if (telephonyManager.isRadioOn()) { return mTimeoutsAdapter.getEmergencyCallTimeoutMillis( mContext.getContentResolver()); return mTimeoutsAdapter.getEmergencyCallTimeoutMillis(mContext, mFlags); } else { return mTimeoutsAdapter.getEmergencyCallTimeoutRadioOffMillis( mContext.getContentResolver()); return mTimeoutsAdapter.getEmergencyCallTimeoutRadioOffMillis(mContext, mFlags); } } catch (UnsupportedOperationException uoe) { Log.e(this, uoe, "getTimeoutLengthMillis - telephony is not supported"); return mTimeoutsAdapter.getEmergencyCallTimeoutMillis(mContext.getContentResolver()); return mTimeoutsAdapter.getEmergencyCallTimeoutMillis(mContext, mFlags); } } }