diff options
author | Tyler Gunn <tgunn@google.com> | 2017-03-02 09:28:37 -0800 |
---|---|---|
committer | Tyler Gunn <tgunn@google.com> | 2017-03-06 11:04:55 -0800 |
commit | 159f35c8e4a2d5902cbbeb8d3b9a80bddf247de3 (patch) | |
tree | 731dd41713b9f160f0faabcf657158ea78e13e76 /telecomm/java/android/telecom/VideoCallImpl.java | |
parent | b8648ae07a5464b8495c47a2d42d093629af03b0 (diff) |
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
Diffstat (limited to 'telecomm/java/android/telecom/VideoCallImpl.java')
-rw-r--r-- | telecomm/java/android/telecom/VideoCallImpl.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/telecomm/java/android/telecom/VideoCallImpl.java b/telecomm/java/android/telecom/VideoCallImpl.java index d8ede5c21316..429a434992c5 100644 --- a/telecomm/java/android/telecom/VideoCallImpl.java +++ b/telecomm/java/android/telecom/VideoCallImpl.java @@ -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) { } } |