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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user