Add wrapper to provide method calls for binder to InCallUI.
Bug: 15893156 Change-Id: I6b12c0e8c915e184bb469b5934865242f9fde00d
This commit is contained in:
@@ -27677,6 +27677,11 @@ package android.telecomm {
|
||||
enum_constant public static final android.telecomm.CallState RINGING;
|
||||
}
|
||||
|
||||
public class CallVideoProviderWrapper implements android.os.IBinder.DeathRecipient {
|
||||
method public void binderDied();
|
||||
method public void setCamera(java.lang.String) throws android.os.RemoteException;
|
||||
}
|
||||
|
||||
public abstract class Connection {
|
||||
ctor protected Connection();
|
||||
method public final android.telecomm.CallAudioState getCallAudioState();
|
||||
|
||||
46
telecomm/java/android/telecomm/CallVideoProviderWrapper.java
Normal file
46
telecomm/java/android/telecomm/CallVideoProviderWrapper.java
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2014 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License
|
||||
*/
|
||||
|
||||
package android.telecomm;
|
||||
|
||||
import android.os.IBinder;
|
||||
import android.os.RemoteException;
|
||||
|
||||
import com.android.internal.telecomm.ICallVideoProvider;
|
||||
|
||||
|
||||
public class CallVideoProviderWrapper implements IBinder.DeathRecipient {
|
||||
private final ICallVideoProvider mCallVideoProvider;
|
||||
|
||||
CallVideoProviderWrapper(ICallVideoProvider callVideoProvider) throws RemoteException {
|
||||
mCallVideoProvider = callVideoProvider;
|
||||
mCallVideoProvider.asBinder().linkToDeath(this, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void binderDied() {
|
||||
mCallVideoProvider.asBinder().unlinkToDeath(this, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the camera to be used for video recording in a video call, using the binder.
|
||||
*
|
||||
* @param cameraId The id of the camera.
|
||||
*/
|
||||
public void setCamera(String cameraId) throws RemoteException {
|
||||
mCallVideoProvider.setCamera(cameraId);
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user