Add SDK compatibility code for new call states

Add code that translates the new call states to old call states for
in-call UIs that don't yet support background call screening.

Test: CTS
Bug: 140317205
Change-Id: I104f5f7ab3e3dc075e1d9ed5c64fcd924f9a977b
This commit is contained in:
Hall Liu
2019-10-11 15:38:29 -07:00
parent 038d1b5b27
commit 31de23da21
4 changed files with 43 additions and 8 deletions

View File

@@ -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());
}