Loading src/com/android/server/telecom/Call.java +9 −4 Original line number Diff line number Diff line Loading @@ -2151,10 +2151,15 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, isWorkCall = UserUtil.isManagedProfile(mContext, userHandle, mFlags); } if (!mFlags.telecomResolveHiddenDependencies()) { isCallRecordingToneSupported = (phoneAccount.hasCapabilities( PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION) && phoneAccount.getExtras() != null PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION) && phoneAccount.getExtras() != null && phoneAccount.getExtras().getBoolean( PhoneAccount.EXTRA_PLAY_CALL_RECORDING_TONE, false)); } else { isCallRecordingToneSupported = false; } isSimCall = phoneAccount.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION); } mIsWorkCall = isWorkCall; Loading src/com/android/server/telecom/CallsManager.java +11 −3 Original line number Diff line number Diff line Loading @@ -444,6 +444,7 @@ public class CallsManager extends Call.ListenerBase private final InCallController mInCallController; private final CallDiagnosticServiceController mCallDiagnosticServiceController; private final CallAudioManager mCallAudioManager; /** @deprecated not used any more */ private final CallRecordingTonePlayer mCallRecordingTonePlayer; private RespondViaSmsManager mRespondViaSmsManager; private final Ringer mRinger; Loading Loading @@ -696,8 +697,13 @@ public class CallsManager extends Call.ListenerBase new Ringer.VibrationEffectProxy(), mInCallController, mContext.getSystemService(NotificationManager.class), accessibilityManagerAdapter, featureFlags); if (featureFlags.telecomResolveHiddenDependencies()) { // This is now deprecated mCallRecordingTonePlayer = null; } else { mCallRecordingTonePlayer = new CallRecordingTonePlayer(mContext, audioManager, mTimeoutsAdapter, mLock); } mCallAudioManager = new CallAudioManager(callAudioRouteAdapter, this, callAudioModeStateMachineFactory.create(systemStateHelper, (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE), Loading Loading @@ -742,7 +748,9 @@ public class CallsManager extends Call.ListenerBase mListeners.add(mCallEndpointController); mListeners.add(mCallDiagnosticServiceController); mListeners.add(mCallAudioManager); if (!featureFlags.telecomResolveHiddenDependencies()) { mListeners.add(mCallRecordingTonePlayer); } mListeners.add(missedCallNotifier); mListeners.add(mDisconnectedCallNotifier); mListeners.add(mHeadsetMediaButton); Loading tests/src/com/android/server/telecom/tests/CallRecordingTonePlayerTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import android.media.MediaPlayer; import android.media.MediaRecorder; import android.os.Handler; import android.os.Looper; import android.platform.test.annotations.RequiresFlagsDisabled; import android.telecom.PhoneAccountHandle; import androidx.test.filters.MediumTest; Loading @@ -52,6 +53,7 @@ import com.android.server.telecom.CallRecordingTonePlayer; import com.android.server.telecom.CallState; import com.android.server.telecom.TelecomSystem; import com.android.server.telecom.Timeouts; import com.android.server.telecom.flags.Flags; import org.junit.After; import org.junit.Before; Loading @@ -71,6 +73,7 @@ import java.util.List; * Unit tests for the {@link com.android.server.telecom.CallRecordingTonePlayer} class. */ @RunWith(JUnit4.class) @RequiresFlagsDisabled(Flags.FLAG_TELECOM_RESOLVE_HIDDEN_DEPENDENCIES) public class CallRecordingTonePlayerTest extends TelecomTestCase { private static final String PHONE_ACCOUNT_PACKAGE = "com.android.telecom.test"; Loading Loading
src/com/android/server/telecom/Call.java +9 −4 Original line number Diff line number Diff line Loading @@ -2151,10 +2151,15 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable, isWorkCall = UserUtil.isManagedProfile(mContext, userHandle, mFlags); } if (!mFlags.telecomResolveHiddenDependencies()) { isCallRecordingToneSupported = (phoneAccount.hasCapabilities( PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION) && phoneAccount.getExtras() != null PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION) && phoneAccount.getExtras() != null && phoneAccount.getExtras().getBoolean( PhoneAccount.EXTRA_PLAY_CALL_RECORDING_TONE, false)); } else { isCallRecordingToneSupported = false; } isSimCall = phoneAccount.hasCapabilities(PhoneAccount.CAPABILITY_SIM_SUBSCRIPTION); } mIsWorkCall = isWorkCall; Loading
src/com/android/server/telecom/CallsManager.java +11 −3 Original line number Diff line number Diff line Loading @@ -444,6 +444,7 @@ public class CallsManager extends Call.ListenerBase private final InCallController mInCallController; private final CallDiagnosticServiceController mCallDiagnosticServiceController; private final CallAudioManager mCallAudioManager; /** @deprecated not used any more */ private final CallRecordingTonePlayer mCallRecordingTonePlayer; private RespondViaSmsManager mRespondViaSmsManager; private final Ringer mRinger; Loading Loading @@ -696,8 +697,13 @@ public class CallsManager extends Call.ListenerBase new Ringer.VibrationEffectProxy(), mInCallController, mContext.getSystemService(NotificationManager.class), accessibilityManagerAdapter, featureFlags); if (featureFlags.telecomResolveHiddenDependencies()) { // This is now deprecated mCallRecordingTonePlayer = null; } else { mCallRecordingTonePlayer = new CallRecordingTonePlayer(mContext, audioManager, mTimeoutsAdapter, mLock); } mCallAudioManager = new CallAudioManager(callAudioRouteAdapter, this, callAudioModeStateMachineFactory.create(systemStateHelper, (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE), Loading Loading @@ -742,7 +748,9 @@ public class CallsManager extends Call.ListenerBase mListeners.add(mCallEndpointController); mListeners.add(mCallDiagnosticServiceController); mListeners.add(mCallAudioManager); if (!featureFlags.telecomResolveHiddenDependencies()) { mListeners.add(mCallRecordingTonePlayer); } mListeners.add(missedCallNotifier); mListeners.add(mDisconnectedCallNotifier); mListeners.add(mHeadsetMediaButton); Loading
tests/src/com/android/server/telecom/tests/CallRecordingTonePlayerTest.java +3 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import android.media.MediaPlayer; import android.media.MediaRecorder; import android.os.Handler; import android.os.Looper; import android.platform.test.annotations.RequiresFlagsDisabled; import android.telecom.PhoneAccountHandle; import androidx.test.filters.MediumTest; Loading @@ -52,6 +53,7 @@ import com.android.server.telecom.CallRecordingTonePlayer; import com.android.server.telecom.CallState; import com.android.server.telecom.TelecomSystem; import com.android.server.telecom.Timeouts; import com.android.server.telecom.flags.Flags; import org.junit.After; import org.junit.Before; Loading @@ -71,6 +73,7 @@ import java.util.List; * Unit tests for the {@link com.android.server.telecom.CallRecordingTonePlayer} class. */ @RunWith(JUnit4.class) @RequiresFlagsDisabled(Flags.FLAG_TELECOM_RESOLVE_HIDDEN_DEPENDENCIES) public class CallRecordingTonePlayerTest extends TelecomTestCase { private static final String PHONE_ACCOUNT_PACKAGE = "com.android.telecom.test"; Loading