diff options
-rw-r--r-- | api/current.txt | 1 | ||||
-rw-r--r-- | api/test-current.txt | 4 | ||||
-rw-r--r-- | services/core/java/com/android/server/am/TEST_MAPPING | 6 | ||||
-rw-r--r-- | telecomm/java/android/telecom/Call.java | 4 | ||||
-rw-r--r-- | telecomm/java/android/telecom/CallScreeningService.java | 2 | ||||
-rw-r--r-- | telecomm/java/android/telecom/Phone.java | 41 | ||||
-rwxr-xr-x | telephony/java/android/telephony/CarrierConfigManager.java | 10 |
7 files changed, 54 insertions, 14 deletions
diff --git a/api/current.txt b/api/current.txt index 9218bacf1230..c396d74116b6 100644 --- a/api/current.txt +++ b/api/current.txt @@ -44074,6 +44074,7 @@ package android.telephony { field public static final String KEY_DATA_LIMIT_THRESHOLD_BYTES_LONG = "data_limit_threshold_bytes_long"; field public static final String KEY_DATA_WARNING_THRESHOLD_BYTES_LONG = "data_warning_threshold_bytes_long"; field public static final String KEY_DEFAULT_SIM_CALL_MANAGER_STRING = "default_sim_call_manager_string"; + field public static final String KEY_DEFAULT_VM_NUMBER_ROAMING_AND_IMS_UNREGISTERED_STRING = "default_vm_number_roaming_and_ims_unregistered_string"; field public static final String KEY_DEFAULT_VM_NUMBER_STRING = "default_vm_number_string"; field public static final String KEY_DIAL_STRING_REPLACE_STRING_ARRAY = "dial_string_replace_string_array"; field public static final String KEY_DISABLE_CDMA_ACTIVATION_CODE_BOOL = "disable_cdma_activation_code_bool"; diff --git a/api/test-current.txt b/api/test-current.txt index 23d7eca05d7b..1cf1cd3b4196 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -2738,6 +2738,10 @@ package android.telecom { method public void exitBackgroundAudioProcessing(boolean); } + public static class Call.Details { + method public String getTelecomCallId(); + } + public final class CallAudioState implements android.os.Parcelable { ctor public CallAudioState(boolean, int, int, @Nullable android.bluetooth.BluetoothDevice, @NonNull java.util.Collection<android.bluetooth.BluetoothDevice>); } diff --git a/services/core/java/com/android/server/am/TEST_MAPPING b/services/core/java/com/android/server/am/TEST_MAPPING index 884e7a564e56..e9151d499706 100644 --- a/services/core/java/com/android/server/am/TEST_MAPPING +++ b/services/core/java/com/android/server/am/TEST_MAPPING @@ -16,13 +16,7 @@ "exclude-annotation": "androidx.test.filters.FlakyTest" }, { - "exclude-filter": "android.app.cts.AlarmManagerTest#testSetRepeating" - }, - { "exclude-filter": "android.app.cts.SystemFeaturesTest#testLocationFeatures" - }, - { - "exclude-filter": "android.app.cts.SystemFeaturesTest#testSensorFeatures" } ] }, diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index 5e71416a0510..3f348a4bda8c 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -728,6 +728,7 @@ public final class Call { } /** {@hide} */ + @TestApi public String getTelecomCallId() { return mTelecomCallId; } @@ -2137,6 +2138,9 @@ public final class Call { } int state = parcelableCall.getState(); + if (mTargetSdkVersion < Phone.SDK_VERSION_R && state == Call.STATE_SIMULATED_RINGING) { + state = Call.STATE_RINGING; + } boolean stateChanged = mState != state; if (stateChanged) { mState = state; diff --git a/telecomm/java/android/telecom/CallScreeningService.java b/telecomm/java/android/telecom/CallScreeningService.java index 0d97567ed213..ef1c790dcc83 100644 --- a/telecomm/java/android/telecom/CallScreeningService.java +++ b/telecomm/java/android/telecom/CallScreeningService.java @@ -374,6 +374,8 @@ public abstract class CallScreeningService extends Service { new ComponentName(getPackageName(), getClass().getName())); } else if (response.getSilenceCall()) { mCallScreeningAdapter.silenceCall(callDetails.getTelecomCallId()); + } else if (response.getShouldScreenCallFurther()) { + mCallScreeningAdapter.screenCallFurther(callDetails.getTelecomCallId()); } else { mCallScreeningAdapter.allowCall(callDetails.getTelecomCallId()); } diff --git a/telecomm/java/android/telecom/Phone.java b/telecomm/java/android/telecom/Phone.java index 0cc052ef340d..2ecdb3035685 100644 --- a/telecomm/java/android/telecom/Phone.java +++ b/telecomm/java/android/telecom/Phone.java @@ -21,7 +21,6 @@ import android.annotation.UnsupportedAppUsage; import android.bluetooth.BluetoothDevice; import android.os.Build; import android.os.Bundle; -import android.os.RemoteException; import android.util.ArrayMap; import java.util.Collections; @@ -111,6 +110,10 @@ public final class Phone { public void onSilenceRinger(Phone phone) { } } + // TODO: replace all usages of this with the actual R constant from Build.VERSION_CODES + /** @hide */ + public static final int SDK_VERSION_R = 30; + // A Map allows us to track each Call by its Telecom-specified call ID private final Map<String, Call> mCallByTelecomCallId = new ArrayMap<>(); @@ -143,6 +146,12 @@ public final class Phone { } final void internalAddCall(ParcelableCall parcelableCall) { + if (mTargetSdkVersion < SDK_VERSION_R + && parcelableCall.getState() == Call.STATE_AUDIO_PROCESSING) { + Log.i(this, "Skipping adding audio processing call for sdk compatibility"); + return; + } + Call call = new Call(this, parcelableCall.getId(), mInCallAdapter, parcelableCall.getState(), mCallingPackage, mTargetSdkVersion); mCallByTelecomCallId.put(parcelableCall.getId(), call); @@ -150,7 +159,7 @@ public final class Phone { checkCallTree(parcelableCall); call.internalUpdate(parcelableCall, mCallByTelecomCallId); fireCallAdded(call); - } + } final void internalRemoveCall(Call call) { mCallByTelecomCallId.remove(call.internalGetCallId()); @@ -164,12 +173,28 @@ public final class Phone { } final void internalUpdateCall(ParcelableCall parcelableCall) { - Call call = mCallByTelecomCallId.get(parcelableCall.getId()); - if (call != null) { - checkCallTree(parcelableCall); - call.internalUpdate(parcelableCall, mCallByTelecomCallId); - } - } + if (mTargetSdkVersion < SDK_VERSION_R + && parcelableCall.getState() == Call.STATE_AUDIO_PROCESSING) { + Log.i(this, "removing audio processing call during update for sdk compatibility"); + Call call = mCallByTelecomCallId.get(parcelableCall.getId()); + if (call != null) { + internalRemoveCall(call); + } + return; + } + + Call call = mCallByTelecomCallId.get(parcelableCall.getId()); + if (call != null) { + checkCallTree(parcelableCall); + call.internalUpdate(parcelableCall, mCallByTelecomCallId); + } else { + // This call may have come out of audio processing. Try adding it if our target sdk + // version is low enough. + if (mTargetSdkVersion < SDK_VERSION_R) { + internalAddCall(parcelableCall); + } + } + } final void internalSetPostDialWait(String telecomId, String remaining) { Call call = mCallByTelecomCallId.get(telecomId); diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java index a17182718a13..85bb032292c9 100755 --- a/telephony/java/android/telephony/CarrierConfigManager.java +++ b/telephony/java/android/telephony/CarrierConfigManager.java @@ -526,6 +526,15 @@ public class CarrierConfigManager { "default_vm_number_roaming_string"; /** + * Where there is no preloaded voicemail number on a SIM card, specifies the carrier's default + * voicemail number while the device is both roaming and not registered for IMS. + * When empty string, no default voicemail number is specified for roaming network and + * unregistered state in IMS. + */ + public static final String KEY_DEFAULT_VM_NUMBER_ROAMING_AND_IMS_UNREGISTERED_STRING = + "default_vm_number_roaming_and_ims_unregistered_string"; + + /** * Flag that specifies to use the user's own phone number as the voicemail number when there is * no pre-loaded voicemail number on the SIM card. * <p> @@ -3155,6 +3164,7 @@ public class CarrierConfigManager { sDefaults.putBoolean(KEY_SUPPORT_DOWNGRADE_VT_TO_AUDIO_BOOL, true); sDefaults.putString(KEY_DEFAULT_VM_NUMBER_STRING, ""); sDefaults.putString(KEY_DEFAULT_VM_NUMBER_ROAMING_STRING, ""); + sDefaults.putString(KEY_DEFAULT_VM_NUMBER_ROAMING_AND_IMS_UNREGISTERED_STRING, ""); sDefaults.putBoolean(KEY_CONFIG_TELEPHONY_USE_OWN_NUMBER_FOR_VOICEMAIL_BOOL, false); sDefaults.putBoolean(KEY_IGNORE_DATA_ENABLED_CHANGED_FOR_VIDEO_CALLS, true); sDefaults.putBoolean(KEY_VILTE_DATA_IS_METERED_BOOL, true); |