Loading src/com/android/server/telecom/callfiltering/IncomingCallFilterGraph.java +2 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,8 @@ public class IncomingCallFilterGraph { CompletableFuture.completedFuture(input); PostFilterTask postFilterTask = new PostFilterTask(filter); // TODO: improve these filter logging names to be more reflective of the filters that are // executing startFuture.thenComposeAsync(filter::startFilterLookup, new LoggedHandlerExecutor(mHandler, "ICFG.sF", null)) .thenApplyAsync(postFilterTask::whenDone, Loading src/com/android/server/telecom/callfiltering/NewCallScreeningServiceFilter.java +71 −51 Original line number Diff line number Diff line Loading @@ -66,12 +66,17 @@ public class NewCallScreeningServiceFilter extends CallFilter { @Override public void allowCall(String callId) { Long token = Binder.clearCallingIdentity(); Log.startSession("NCSSF.aC"); try { if (mCall == null || (!mCall.getId().equals(callId))) { Log.w(this, "allowCall, unknown call id: %s", callId); } mResultFuture.complete(mPriorStageResult); Binder.restoreCallingIdentity(token); } finally { unbindCallScreeningService(); Binder.restoreCallingIdentity(token); Log.endSession(); } } @Override Loading @@ -79,6 +84,8 @@ public class NewCallScreeningServiceFilter extends CallFilter { boolean shouldAddToCallLog, boolean shouldShowNotification, ComponentName componentName) { long token = Binder.clearCallingIdentity(); Log.startSession("NCSSF.dC"); try { if (mCall != null && mCall.getId().equals(callId)) { mResultFuture.complete(new CallFilteringResult.Builder() .setShouldAllowCall(false) Loading @@ -96,13 +103,18 @@ public class NewCallScreeningServiceFilter extends CallFilter { Log.w(this, "disallowCall, unknown call id: %s", callId); mResultFuture.complete(mPriorStageResult); } Binder.restoreCallingIdentity(token); } finally { unbindCallScreeningService(); Log.endSession(); Binder.restoreCallingIdentity(token); } } @Override public void silenceCall(String callId) { long token = Binder.clearCallingIdentity(); Log.startSession("NCSSF.sC"); try { if (mCall != null && mCall.getId().equals(callId)) { mResultFuture.complete(new CallFilteringResult.Builder() .setShouldAllowCall(true) Loading @@ -116,19 +128,24 @@ public class NewCallScreeningServiceFilter extends CallFilter { Log.w(this, "silenceCall, unknown call id: %s", callId); mResultFuture.complete(mPriorStageResult); } Binder.restoreCallingIdentity(token); } finally { unbindCallScreeningService(); Log.endSession(); Binder.restoreCallingIdentity(token); } } @Override public void screenCallFurther(String callId) { long token = Binder.clearCallingIdentity(); if (mPackagetype != PACKAGE_TYPE_DEFAULT_DIALER) { throw new SecurityException("Only the default/system dialer may request screen via" + "background call audio"); } // TODO: add permission check for the additional role-based permission long token = Binder.clearCallingIdentity(); Log.startSession("NCSSF.sCF"); try { if (mCall != null && mCall.getId().equals(callId)) { mResultFuture.complete(new CallFilteringResult.Builder() .setShouldAllowCall(true) Loading @@ -141,8 +158,11 @@ public class NewCallScreeningServiceFilter extends CallFilter { Log.w(this, "screenCallFurther, unknown call id: %s", callId); mResultFuture.complete(mPriorStageResult); } Binder.restoreCallingIdentity(token); } finally { unbindCallScreeningService(); Log.endSession(); Binder.restoreCallingIdentity(token); } } } Loading Loading
src/com/android/server/telecom/callfiltering/IncomingCallFilterGraph.java +2 −0 Original line number Diff line number Diff line Loading @@ -148,6 +148,8 @@ public class IncomingCallFilterGraph { CompletableFuture.completedFuture(input); PostFilterTask postFilterTask = new PostFilterTask(filter); // TODO: improve these filter logging names to be more reflective of the filters that are // executing startFuture.thenComposeAsync(filter::startFilterLookup, new LoggedHandlerExecutor(mHandler, "ICFG.sF", null)) .thenApplyAsync(postFilterTask::whenDone, Loading
src/com/android/server/telecom/callfiltering/NewCallScreeningServiceFilter.java +71 −51 Original line number Diff line number Diff line Loading @@ -66,12 +66,17 @@ public class NewCallScreeningServiceFilter extends CallFilter { @Override public void allowCall(String callId) { Long token = Binder.clearCallingIdentity(); Log.startSession("NCSSF.aC"); try { if (mCall == null || (!mCall.getId().equals(callId))) { Log.w(this, "allowCall, unknown call id: %s", callId); } mResultFuture.complete(mPriorStageResult); Binder.restoreCallingIdentity(token); } finally { unbindCallScreeningService(); Binder.restoreCallingIdentity(token); Log.endSession(); } } @Override Loading @@ -79,6 +84,8 @@ public class NewCallScreeningServiceFilter extends CallFilter { boolean shouldAddToCallLog, boolean shouldShowNotification, ComponentName componentName) { long token = Binder.clearCallingIdentity(); Log.startSession("NCSSF.dC"); try { if (mCall != null && mCall.getId().equals(callId)) { mResultFuture.complete(new CallFilteringResult.Builder() .setShouldAllowCall(false) Loading @@ -96,13 +103,18 @@ public class NewCallScreeningServiceFilter extends CallFilter { Log.w(this, "disallowCall, unknown call id: %s", callId); mResultFuture.complete(mPriorStageResult); } Binder.restoreCallingIdentity(token); } finally { unbindCallScreeningService(); Log.endSession(); Binder.restoreCallingIdentity(token); } } @Override public void silenceCall(String callId) { long token = Binder.clearCallingIdentity(); Log.startSession("NCSSF.sC"); try { if (mCall != null && mCall.getId().equals(callId)) { mResultFuture.complete(new CallFilteringResult.Builder() .setShouldAllowCall(true) Loading @@ -116,19 +128,24 @@ public class NewCallScreeningServiceFilter extends CallFilter { Log.w(this, "silenceCall, unknown call id: %s", callId); mResultFuture.complete(mPriorStageResult); } Binder.restoreCallingIdentity(token); } finally { unbindCallScreeningService(); Log.endSession(); Binder.restoreCallingIdentity(token); } } @Override public void screenCallFurther(String callId) { long token = Binder.clearCallingIdentity(); if (mPackagetype != PACKAGE_TYPE_DEFAULT_DIALER) { throw new SecurityException("Only the default/system dialer may request screen via" + "background call audio"); } // TODO: add permission check for the additional role-based permission long token = Binder.clearCallingIdentity(); Log.startSession("NCSSF.sCF"); try { if (mCall != null && mCall.getId().equals(callId)) { mResultFuture.complete(new CallFilteringResult.Builder() .setShouldAllowCall(true) Loading @@ -141,8 +158,11 @@ public class NewCallScreeningServiceFilter extends CallFilter { Log.w(this, "screenCallFurther, unknown call id: %s", callId); mResultFuture.complete(mPriorStageResult); } Binder.restoreCallingIdentity(token); } finally { unbindCallScreeningService(); Log.endSession(); Binder.restoreCallingIdentity(token); } } } Loading