Loading src/com/android/server/telecom/CallsManager.java +1 −28 Original line number Diff line number Diff line Loading @@ -447,12 +447,7 @@ public final class CallsManager extends Call.ListenerBase { call.setExtras(extras); // Do not add the call if it is a potential MMI code. // We also want to skip adding the call if there is a broadcast receiver which could // intercept the outgoing call and cancel it. We do this to ensure that we do not show the // InCall UI for the cancelled call. If the call is not intercepted, it will be added in // {@link CallsManager#onSuccessfulOutgoingCall}. if (isPotentialMMICode(handle) || isPotentialInCallMMICode || (!isEmergencyCall && canOutgoingCallBroadcastsBeIntercepted())) { if (isPotentialMMICode(handle) || isPotentialInCallMMICode) { call.addListener(this); } else { addCall(call); Loading Loading @@ -1202,28 +1197,6 @@ public final class CallsManager extends Call.ListenerBase { return true; } /** * Determines if the {@link Intent#ACTION_NEW_OUTGOING_CALL} intent can be received by another * package with priority 0, potentially providing the ability to cancel the intent before it * is received. * * @return {@code true} if the intent can be intercepted by another */ private boolean canOutgoingCallBroadcastsBeIntercepted() { PackageManager packageManager = mContext.getPackageManager(); Intent intent = new Intent(Intent.ACTION_NEW_OUTGOING_CALL); List<ResolveInfo> receivers = packageManager.queryBroadcastReceivers(intent, 0); for (ResolveInfo info : receivers) { // Check for an interceptor with priority 0; this would potentially receive the // broadcast before Telecom and cancel it. if (info.priority == 0) { return true; } } return false; } /** * Dumps the state of the {@link CallsManager}. * Loading Loading
src/com/android/server/telecom/CallsManager.java +1 −28 Original line number Diff line number Diff line Loading @@ -447,12 +447,7 @@ public final class CallsManager extends Call.ListenerBase { call.setExtras(extras); // Do not add the call if it is a potential MMI code. // We also want to skip adding the call if there is a broadcast receiver which could // intercept the outgoing call and cancel it. We do this to ensure that we do not show the // InCall UI for the cancelled call. If the call is not intercepted, it will be added in // {@link CallsManager#onSuccessfulOutgoingCall}. if (isPotentialMMICode(handle) || isPotentialInCallMMICode || (!isEmergencyCall && canOutgoingCallBroadcastsBeIntercepted())) { if (isPotentialMMICode(handle) || isPotentialInCallMMICode) { call.addListener(this); } else { addCall(call); Loading Loading @@ -1202,28 +1197,6 @@ public final class CallsManager extends Call.ListenerBase { return true; } /** * Determines if the {@link Intent#ACTION_NEW_OUTGOING_CALL} intent can be received by another * package with priority 0, potentially providing the ability to cancel the intent before it * is received. * * @return {@code true} if the intent can be intercepted by another */ private boolean canOutgoingCallBroadcastsBeIntercepted() { PackageManager packageManager = mContext.getPackageManager(); Intent intent = new Intent(Intent.ACTION_NEW_OUTGOING_CALL); List<ResolveInfo> receivers = packageManager.queryBroadcastReceivers(intent, 0); for (ResolveInfo info : receivers) { // Check for an interceptor with priority 0; this would potentially receive the // broadcast before Telecom and cancel it. if (info.priority == 0) { return true; } } return false; } /** * Dumps the state of the {@link CallsManager}. * Loading