Loading src/com/android/server/telecom/CallScreeningServiceHelper.java +4 −2 Original line number Diff line number Diff line Loading @@ -117,10 +117,12 @@ public class CallScreeningServiceHelper { Log.continueSession(mLoggingSession, "CSSH.oSC"); try { try { // Note: for outgoing calls, never include the restricted extras. // Note: for outgoing calls, never include the restricted extras // and PhoneAccountHandle screeningService.screenCall(new CallScreeningAdapter(this), mParcelableCallUtilsConverter.toParcelableCallForScreening(mCall, false /* areRestrictedExtrasIncluded */)); false /* areRestrictedExtrasIncluded */, false /* includePhoneAccountHandle */)); } catch (RemoteException e) { Log.w(CallScreeningServiceHelper.this, "Cancelling call id due to remote exception"); Loading src/com/android/server/telecom/CallsManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -1037,18 +1037,18 @@ public class CallsManager extends Call.ListenerBase CallScreeningServiceFilter carrierCallScreeningServiceFilter = new CallScreeningServiceFilter(incomingCall, carrierPackageName, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, this, appLabelProxy, converter); appLabelProxy, converter, mFeatureFlags); CallScreeningServiceFilter callScreeningServiceFilter; if ((userChosenPackageName != null) && (!userChosenPackageName.equals(defaultDialerPackageName))) { callScreeningServiceFilter = new CallScreeningServiceFilter(incomingCall, userChosenPackageName, CallScreeningServiceFilter.PACKAGE_TYPE_USER_CHOSEN, mContext, this, appLabelProxy, converter); mContext, this, appLabelProxy, converter, mFeatureFlags); } else { callScreeningServiceFilter = new CallScreeningServiceFilter(incomingCall, defaultDialerPackageName, CallScreeningServiceFilter.PACKAGE_TYPE_DEFAULT_DIALER, mContext, this, appLabelProxy, converter); mContext, this, appLabelProxy, converter, mFeatureFlags); } graph.addFilter(voicemailFilter); graph.addFilter(dndCallFilter); Loading src/com/android/server/telecom/ParcelableCallUtils.java +9 −5 Original line number Diff line number Diff line Loading @@ -74,9 +74,9 @@ public class ParcelableCallUtils { } public ParcelableCall toParcelableCallForScreening(Call call, boolean areRestrictedExtrasIncluded) { boolean areRestrictedExtrasIncluded, boolean includePhoneAccountHandle) { return ParcelableCallUtils.toParcelableCallForScreening(call, areRestrictedExtrasIncluded); areRestrictedExtrasIncluded, includePhoneAccountHandle); } } Loading Loading @@ -315,11 +315,12 @@ public class ParcelableCallUtils { * {@link android.telecom.CallScreeningService}. We ONLY expose the following: * <ul> * <li>Call Id (not exposed to public, but needed to associated calls)</li> * <li>Call directoin</li> * <li>Call direction</li> * <li>Creation time</li> * <li>Connection time</li> * <li>Handle (phone number)</li> * <li>Handle (phone number) presentation</li> * <li>{@code PhoneAccountHandle}</li> * <li>Caller number verification status (verstat)</li> * </ul> * All other fields are nulled or set to 0 values. Loading @@ -330,10 +331,12 @@ public class ParcelableCallUtils { * @param areRestrictedExtrasIncluded {@code true} if the set of restricted extras defined in * {@link #RESTRICTED_CALL_SCREENING_EXTRA_KEYS} are to * be included in the parceled call, {@code false} otherwise. * @param includePhoneAccountHandle {@code true} if {@code PhoneAccountHandle} to be included * in the parceled call, {@code false} otherwise. * @return Minimal {@link ParcelableCall} to send to the call screening service. */ public static ParcelableCall toParcelableCallForScreening(Call call, boolean areRestrictedExtrasIncluded) { boolean areRestrictedExtrasIncluded, boolean includePhoneAccountHandle) { Uri handle = call.getHandlePresentation() == TelecomManager.PRESENTATION_ALLOWED ? call.getHandle() : null; int callDirection; Loading Loading @@ -366,7 +369,8 @@ public class ParcelableCallUtils { .setCallerDisplayName(null) .setCallerDisplayNamePresentation(0) .setGatewayInfo(null) .setAccountHandle(null) .setAccountHandle(includePhoneAccountHandle ? call.getDelegatePhoneAccountHandle() : null) .setIsVideoCallProviderChanged(false) .setVideoCallProvider(null) .setIsRttCallChanged(false) Loading src/com/android/server/telecom/callfiltering/CallScreeningServiceFilter.java +16 −2 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.telecom.TelecomManager; import com.android.internal.telecom.ICallScreeningAdapter; import com.android.internal.telecom.ICallScreeningService; import com.android.server.telecom.flags.FeatureFlags; import com.android.server.telecom.AppLabelProxy; import com.android.server.telecom.Call; import com.android.server.telecom.CallScreeningServiceHelper; Loading @@ -57,6 +58,7 @@ public class CallScreeningServiceFilter extends CallFilter { private final CallsManager mCallsManager; private CharSequence mAppName; private final ParcelableCallUtils.Converter mParcelableCallUtilsConverter; private final FeatureFlags mFeatureFlags; private class CallScreeningAdapter extends ICallScreeningAdapter.Stub { private CompletableFuture<CallFilteringResult> mResultFuture; Loading Loading @@ -223,7 +225,8 @@ public class CallScreeningServiceFilter extends CallFilter { try { callScreeningService.screenCall(new CallScreeningAdapter(mResultFuture), mParcelableCallUtilsConverter. toParcelableCallForScreening(mCall, isSystemDialer())); toParcelableCallForScreening(mCall, isSystemDialer(), hasReadPrivilegedPhoneStatePermission())); } catch (RemoteException e) { Log.e(this, e, "Failed to set the call screening adapter"); mResultFuture.complete(mPriorStageResult); Loading Loading @@ -261,7 +264,8 @@ public class CallScreeningServiceFilter extends CallFilter { Context context, CallsManager callsManager, AppLabelProxy appLabelProxy, ParcelableCallUtils.Converter parcelableCallUtilsConverter) { ParcelableCallUtils.Converter parcelableCallUtilsConverter, FeatureFlags featureFlags) { super(); mCall = call; mPackageName = packageName; Loading @@ -272,6 +276,7 @@ public class CallScreeningServiceFilter extends CallFilter { mAppName = appLabelProxy.getAppLabel(mPackageName, mCall.getAssociatedUser()); mParcelableCallUtilsConverter = parcelableCallUtilsConverter; mFeatureFlags = featureFlags; } @Override Loading Loading @@ -315,6 +320,15 @@ public class CallScreeningServiceFilter extends CallFilter { return permission == PackageManager.PERMISSION_GRANTED; } private boolean hasReadPrivilegedPhoneStatePermission() { if (!mFeatureFlags.resolveHiddenDependenciesTwo()) { return false; } return mPackageManager != null && mPackageManager.checkPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE, mPackageName) == PackageManager.PERMISSION_GRANTED; } private void bindCallScreeningService( CompletableFuture<CallFilteringResult> resultFuture) { CallScreeningServiceConnection connection = new CallScreeningServiceConnection( Loading tests/src/com/android/server/telecom/tests/CallScreeningServiceFilterTest.java +13 −12 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import androidx.test.filters.SmallTest; import com.android.internal.telecom.ICallScreeningAdapter; import com.android.internal.telecom.ICallScreeningService; import com.android.server.telecom.flags.FeatureFlagsImpl; import com.android.server.telecom.AppLabelProxy; import com.android.server.telecom.Call; import com.android.server.telecom.CallsManager; Loading Loading @@ -152,7 +153,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { public void testNoPackageName() throws Exception { CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, null, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); assertEquals(PASS_RESULT, filter.startFilterLookup(inputResult).toCompletableFuture().get( CallScreeningServiceFilter.CALL_SCREENING_FILTER_TIMEOUT, Loading @@ -166,7 +167,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { anyInt(), eq(PA_HANDLE.getUserHandle()))).thenReturn(false); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); assertEquals(PASS_RESULT, filter.startFilterLookup(inputResult).toCompletableFuture().get( CallScreeningServiceFilter.CALL_SCREENING_FILTER_TIMEOUT, Loading @@ -180,7 +181,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { .thenReturn(Collections.emptyList()); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); assertEquals(PASS_RESULT, filter.startFilterLookup(inputResult).toCompletableFuture().get( CallScreeningServiceFilter.CALL_SCREENING_FILTER_TIMEOUT, Loading @@ -193,7 +194,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { mResolveInfo.serviceInfo = null; CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); assertEquals(PASS_RESULT, filter.startFilterLookup(inputResult).toCompletableFuture().get( CallScreeningServiceFilter.CALL_SCREENING_FILTER_TIMEOUT, Loading @@ -212,7 +213,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { inputResult.contactExists = true; CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_USER_CHOSEN, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); filter.startFilterLookup(inputResult); } Loading @@ -224,7 +225,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { inputResult.contactExists = true; CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); filter.startFilterLookup(inputResult); ServiceConnection connection = verifyBindingIntent(); connection.onServiceDisconnected(COMPONENT_NAME); Loading @@ -238,7 +239,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { .unbindService(nullable(ServiceConnection.class)); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletableFuture<CallFilteringResult> result = filter.startFilterLookup(inputResult) .toCompletableFuture(); Loading @@ -253,7 +254,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { // Use an empty package name here, which fails in the bindCallScreeningService. CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, "", CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletableFuture<CallFilteringResult> result = filter.startFilterLookup(inputResult) .toCompletableFuture(); Loading @@ -266,7 +267,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { public void testAllowCall() throws Exception { CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletionStage<CallFilteringResult> resultFuture = filter.startFilterLookup(inputResult); ServiceConnection serviceConnection = verifyBindingIntent(); Loading Loading @@ -302,7 +303,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { .build(); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletionStage<CallFilteringResult> resultFuture = filter.startFilterLookup(inputResult); ServiceConnection serviceConnection = verifyBindingIntent(); Loading Loading @@ -339,7 +340,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { .build(); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletionStage<CallFilteringResult> resultFuture = filter.startFilterLookup(inputResult); ServiceConnection serviceConnection = verifyBindingIntent(); Loading Loading @@ -374,7 +375,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { .build(); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_DEFAULT_DIALER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletionStage<CallFilteringResult> resultFuture = filter.startFilterLookup(inputResult); ServiceConnection serviceConnection = verifyBindingIntent(); Loading Loading
src/com/android/server/telecom/CallScreeningServiceHelper.java +4 −2 Original line number Diff line number Diff line Loading @@ -117,10 +117,12 @@ public class CallScreeningServiceHelper { Log.continueSession(mLoggingSession, "CSSH.oSC"); try { try { // Note: for outgoing calls, never include the restricted extras. // Note: for outgoing calls, never include the restricted extras // and PhoneAccountHandle screeningService.screenCall(new CallScreeningAdapter(this), mParcelableCallUtilsConverter.toParcelableCallForScreening(mCall, false /* areRestrictedExtrasIncluded */)); false /* areRestrictedExtrasIncluded */, false /* includePhoneAccountHandle */)); } catch (RemoteException e) { Log.w(CallScreeningServiceHelper.this, "Cancelling call id due to remote exception"); Loading
src/com/android/server/telecom/CallsManager.java +3 −3 Original line number Diff line number Diff line Loading @@ -1037,18 +1037,18 @@ public class CallsManager extends Call.ListenerBase CallScreeningServiceFilter carrierCallScreeningServiceFilter = new CallScreeningServiceFilter(incomingCall, carrierPackageName, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, this, appLabelProxy, converter); appLabelProxy, converter, mFeatureFlags); CallScreeningServiceFilter callScreeningServiceFilter; if ((userChosenPackageName != null) && (!userChosenPackageName.equals(defaultDialerPackageName))) { callScreeningServiceFilter = new CallScreeningServiceFilter(incomingCall, userChosenPackageName, CallScreeningServiceFilter.PACKAGE_TYPE_USER_CHOSEN, mContext, this, appLabelProxy, converter); mContext, this, appLabelProxy, converter, mFeatureFlags); } else { callScreeningServiceFilter = new CallScreeningServiceFilter(incomingCall, defaultDialerPackageName, CallScreeningServiceFilter.PACKAGE_TYPE_DEFAULT_DIALER, mContext, this, appLabelProxy, converter); mContext, this, appLabelProxy, converter, mFeatureFlags); } graph.addFilter(voicemailFilter); graph.addFilter(dndCallFilter); Loading
src/com/android/server/telecom/ParcelableCallUtils.java +9 −5 Original line number Diff line number Diff line Loading @@ -74,9 +74,9 @@ public class ParcelableCallUtils { } public ParcelableCall toParcelableCallForScreening(Call call, boolean areRestrictedExtrasIncluded) { boolean areRestrictedExtrasIncluded, boolean includePhoneAccountHandle) { return ParcelableCallUtils.toParcelableCallForScreening(call, areRestrictedExtrasIncluded); areRestrictedExtrasIncluded, includePhoneAccountHandle); } } Loading Loading @@ -315,11 +315,12 @@ public class ParcelableCallUtils { * {@link android.telecom.CallScreeningService}. We ONLY expose the following: * <ul> * <li>Call Id (not exposed to public, but needed to associated calls)</li> * <li>Call directoin</li> * <li>Call direction</li> * <li>Creation time</li> * <li>Connection time</li> * <li>Handle (phone number)</li> * <li>Handle (phone number) presentation</li> * <li>{@code PhoneAccountHandle}</li> * <li>Caller number verification status (verstat)</li> * </ul> * All other fields are nulled or set to 0 values. Loading @@ -330,10 +331,12 @@ public class ParcelableCallUtils { * @param areRestrictedExtrasIncluded {@code true} if the set of restricted extras defined in * {@link #RESTRICTED_CALL_SCREENING_EXTRA_KEYS} are to * be included in the parceled call, {@code false} otherwise. * @param includePhoneAccountHandle {@code true} if {@code PhoneAccountHandle} to be included * in the parceled call, {@code false} otherwise. * @return Minimal {@link ParcelableCall} to send to the call screening service. */ public static ParcelableCall toParcelableCallForScreening(Call call, boolean areRestrictedExtrasIncluded) { boolean areRestrictedExtrasIncluded, boolean includePhoneAccountHandle) { Uri handle = call.getHandlePresentation() == TelecomManager.PRESENTATION_ALLOWED ? call.getHandle() : null; int callDirection; Loading Loading @@ -366,7 +369,8 @@ public class ParcelableCallUtils { .setCallerDisplayName(null) .setCallerDisplayNamePresentation(0) .setGatewayInfo(null) .setAccountHandle(null) .setAccountHandle(includePhoneAccountHandle ? call.getDelegatePhoneAccountHandle() : null) .setIsVideoCallProviderChanged(false) .setVideoCallProvider(null) .setIsRttCallChanged(false) Loading
src/com/android/server/telecom/callfiltering/CallScreeningServiceFilter.java +16 −2 Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ import android.telecom.TelecomManager; import com.android.internal.telecom.ICallScreeningAdapter; import com.android.internal.telecom.ICallScreeningService; import com.android.server.telecom.flags.FeatureFlags; import com.android.server.telecom.AppLabelProxy; import com.android.server.telecom.Call; import com.android.server.telecom.CallScreeningServiceHelper; Loading @@ -57,6 +58,7 @@ public class CallScreeningServiceFilter extends CallFilter { private final CallsManager mCallsManager; private CharSequence mAppName; private final ParcelableCallUtils.Converter mParcelableCallUtilsConverter; private final FeatureFlags mFeatureFlags; private class CallScreeningAdapter extends ICallScreeningAdapter.Stub { private CompletableFuture<CallFilteringResult> mResultFuture; Loading Loading @@ -223,7 +225,8 @@ public class CallScreeningServiceFilter extends CallFilter { try { callScreeningService.screenCall(new CallScreeningAdapter(mResultFuture), mParcelableCallUtilsConverter. toParcelableCallForScreening(mCall, isSystemDialer())); toParcelableCallForScreening(mCall, isSystemDialer(), hasReadPrivilegedPhoneStatePermission())); } catch (RemoteException e) { Log.e(this, e, "Failed to set the call screening adapter"); mResultFuture.complete(mPriorStageResult); Loading Loading @@ -261,7 +264,8 @@ public class CallScreeningServiceFilter extends CallFilter { Context context, CallsManager callsManager, AppLabelProxy appLabelProxy, ParcelableCallUtils.Converter parcelableCallUtilsConverter) { ParcelableCallUtils.Converter parcelableCallUtilsConverter, FeatureFlags featureFlags) { super(); mCall = call; mPackageName = packageName; Loading @@ -272,6 +276,7 @@ public class CallScreeningServiceFilter extends CallFilter { mAppName = appLabelProxy.getAppLabel(mPackageName, mCall.getAssociatedUser()); mParcelableCallUtilsConverter = parcelableCallUtilsConverter; mFeatureFlags = featureFlags; } @Override Loading Loading @@ -315,6 +320,15 @@ public class CallScreeningServiceFilter extends CallFilter { return permission == PackageManager.PERMISSION_GRANTED; } private boolean hasReadPrivilegedPhoneStatePermission() { if (!mFeatureFlags.resolveHiddenDependenciesTwo()) { return false; } return mPackageManager != null && mPackageManager.checkPermission(Manifest.permission.READ_PRIVILEGED_PHONE_STATE, mPackageName) == PackageManager.PERMISSION_GRANTED; } private void bindCallScreeningService( CompletableFuture<CallFilteringResult> resultFuture) { CallScreeningServiceConnection connection = new CallScreeningServiceConnection( Loading
tests/src/com/android/server/telecom/tests/CallScreeningServiceFilterTest.java +13 −12 Original line number Diff line number Diff line Loading @@ -49,6 +49,7 @@ import androidx.test.filters.SmallTest; import com.android.internal.telecom.ICallScreeningAdapter; import com.android.internal.telecom.ICallScreeningService; import com.android.server.telecom.flags.FeatureFlagsImpl; import com.android.server.telecom.AppLabelProxy; import com.android.server.telecom.Call; import com.android.server.telecom.CallsManager; Loading Loading @@ -152,7 +153,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { public void testNoPackageName() throws Exception { CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, null, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); assertEquals(PASS_RESULT, filter.startFilterLookup(inputResult).toCompletableFuture().get( CallScreeningServiceFilter.CALL_SCREENING_FILTER_TIMEOUT, Loading @@ -166,7 +167,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { anyInt(), eq(PA_HANDLE.getUserHandle()))).thenReturn(false); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); assertEquals(PASS_RESULT, filter.startFilterLookup(inputResult).toCompletableFuture().get( CallScreeningServiceFilter.CALL_SCREENING_FILTER_TIMEOUT, Loading @@ -180,7 +181,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { .thenReturn(Collections.emptyList()); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); assertEquals(PASS_RESULT, filter.startFilterLookup(inputResult).toCompletableFuture().get( CallScreeningServiceFilter.CALL_SCREENING_FILTER_TIMEOUT, Loading @@ -193,7 +194,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { mResolveInfo.serviceInfo = null; CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); assertEquals(PASS_RESULT, filter.startFilterLookup(inputResult).toCompletableFuture().get( CallScreeningServiceFilter.CALL_SCREENING_FILTER_TIMEOUT, Loading @@ -212,7 +213,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { inputResult.contactExists = true; CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_USER_CHOSEN, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); filter.startFilterLookup(inputResult); } Loading @@ -224,7 +225,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { inputResult.contactExists = true; CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); filter.startFilterLookup(inputResult); ServiceConnection connection = verifyBindingIntent(); connection.onServiceDisconnected(COMPONENT_NAME); Loading @@ -238,7 +239,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { .unbindService(nullable(ServiceConnection.class)); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletableFuture<CallFilteringResult> result = filter.startFilterLookup(inputResult) .toCompletableFuture(); Loading @@ -253,7 +254,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { // Use an empty package name here, which fails in the bindCallScreeningService. CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, "", CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletableFuture<CallFilteringResult> result = filter.startFilterLookup(inputResult) .toCompletableFuture(); Loading @@ -266,7 +267,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { public void testAllowCall() throws Exception { CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletionStage<CallFilteringResult> resultFuture = filter.startFilterLookup(inputResult); ServiceConnection serviceConnection = verifyBindingIntent(); Loading Loading @@ -302,7 +303,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { .build(); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletionStage<CallFilteringResult> resultFuture = filter.startFilterLookup(inputResult); ServiceConnection serviceConnection = verifyBindingIntent(); Loading Loading @@ -339,7 +340,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { .build(); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_CARRIER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletionStage<CallFilteringResult> resultFuture = filter.startFilterLookup(inputResult); ServiceConnection serviceConnection = verifyBindingIntent(); Loading Loading @@ -374,7 +375,7 @@ public class CallScreeningServiceFilterTest extends TelecomTestCase { .build(); CallScreeningServiceFilter filter = new CallScreeningServiceFilter(mCall, PKG_NAME, CallScreeningServiceFilter.PACKAGE_TYPE_DEFAULT_DIALER, mContext, mCallsManager, mAppLabelProxy, mParcelableCallUtilsConverter); mAppLabelProxy, mParcelableCallUtilsConverter, new FeatureFlagsImpl()); CompletionStage<CallFilteringResult> resultFuture = filter.startFilterLookup(inputResult); ServiceConnection serviceConnection = verifyBindingIntent(); Loading