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:
@@ -44,6 +44,7 @@ public class VideoCallImpl extends VideoCall {
|
||||
private int mVideoQuality = VideoProfile.QUALITY_UNKNOWN;
|
||||
private int mVideoState = VideoProfile.STATE_AUDIO_ONLY;
|
||||
private final String mCallingPackageName;
|
||||
private final int mTargetSdkVersion;
|
||||
|
||||
private IBinder.DeathRecipient mDeathRecipient = new IBinder.DeathRecipient() {
|
||||
@Override
|
||||
@@ -198,13 +199,15 @@ public class VideoCallImpl extends VideoCall {
|
||||
|
||||
private Handler mHandler;
|
||||
|
||||
VideoCallImpl(IVideoProvider videoProvider, String callingPackageName) throws RemoteException {
|
||||
VideoCallImpl(IVideoProvider videoProvider, String callingPackageName, int targetSdkVersion)
|
||||
throws RemoteException {
|
||||
mVideoProvider = videoProvider;
|
||||
mVideoProvider.asBinder().linkToDeath(mDeathRecipient, 0);
|
||||
|
||||
mBinder = new VideoCallListenerBinder();
|
||||
mVideoProvider.addVideoCallback(mBinder);
|
||||
mCallingPackageName = callingPackageName;
|
||||
mTargetSdkVersion = targetSdkVersion;
|
||||
}
|
||||
|
||||
public void destroy() {
|
||||
@@ -243,7 +246,7 @@ public class VideoCallImpl extends VideoCall {
|
||||
public void setCamera(String cameraId) {
|
||||
try {
|
||||
Log.w(this, "setCamera: cameraId=%s, calling=%s", cameraId, mCallingPackageName);
|
||||
mVideoProvider.setCamera(cameraId, mCallingPackageName);
|
||||
mVideoProvider.setCamera(cameraId, mCallingPackageName, mTargetSdkVersion);
|
||||
} catch (RemoteException e) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user