API review cleanups/changes.

- Change onCreateIncomingConnectionFailed/onCreateOutgoingConnectionFailed
to accept the connection mgr phone account as the first parameter.
- For the video APIs, pass the target SDK of the caller into along so
that the Telecom permission check can have fallback behavior for older API
versions.
- Add guidance for how UX should be shown in onShowIncomingCallUi API.
API guidance follows how the Dialer app shows its notification and full
screen UX.

Test: Manual, CTS.
Bug: 35767711
Bug: 35767096
Change-Id: Ib343f0eda1a4d067a38c553f33f140b4efcf3e48
This commit is contained in:
Tyler Gunn
2017-03-02 09:28:37 -08:00
parent b8648ae07a
commit 159f35c8e4
14 changed files with 121 additions and 37 deletions

View File

@ -1007,6 +1007,7 @@ public final class Call {
private int mState;
private List<String> mCannedTextResponses = null;
private String mCallingPackage;
private int mTargetSdkVersion;
private String mRemainingPostDialSequence;
private VideoCallImpl mVideoCallImpl;
private RttCall mRttCall;
@ -1540,22 +1541,25 @@ public final class Call {
}
/** {@hide} */
Call(Phone phone, String telecomCallId, InCallAdapter inCallAdapter, String callingPackage) {
Call(Phone phone, String telecomCallId, InCallAdapter inCallAdapter, String callingPackage,
int targetSdkVersion) {
mPhone = phone;
mTelecomCallId = telecomCallId;
mInCallAdapter = inCallAdapter;
mState = STATE_NEW;
mCallingPackage = callingPackage;
mTargetSdkVersion = targetSdkVersion;
}
/** {@hide} */
Call(Phone phone, String telecomCallId, InCallAdapter inCallAdapter, int state,
String callingPackage) {
String callingPackage, int targetSdkVersion) {
mPhone = phone;
mTelecomCallId = telecomCallId;
mInCallAdapter = inCallAdapter;
mState = state;
mCallingPackage = callingPackage;
mTargetSdkVersion = targetSdkVersion;
}
/** {@hide} */
@ -1581,7 +1585,8 @@ public final class Call {
cannedTextResponsesChanged = true;
}
VideoCallImpl newVideoCallImpl = parcelableCall.getVideoCallImpl(mCallingPackage);
VideoCallImpl newVideoCallImpl = parcelableCall.getVideoCallImpl(mCallingPackage,
mTargetSdkVersion);
boolean videoCallChanged = parcelableCall.isVideoCallProviderChanged() &&
!Objects.equals(mVideoCallImpl, newVideoCallImpl);
if (videoCallChanged) {