Loading Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -330,6 +330,7 @@ LOCAL_SRC_FILES += \ telecomm/java/com/android/internal/telecomm/ICallServiceAdapter.aidl \ telecomm/java/com/android/internal/telecomm/ICallServiceLookupResponse.aidl \ telecomm/java/com/android/internal/telecomm/ICallServiceProvider.aidl \ telecomm/java/com/android/internal/telecomm/ICallVideoProvider.aidl \ telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl \ telecomm/java/com/android/internal/telecomm/IInCallService.aidl \ telecomm/java/com/android/internal/telecomm/ITelecommService.aidl \ Loading telecomm/java/android/telecomm/CallVideoProvider.java 0 → 100644 +69 −0 Original line number Diff line number Diff line /* * 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.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; import com.android.internal.telecomm.ICallVideoProvider; /** @hide */ public abstract class CallVideoProvider { private static final int MSG_SET_CAMERA = 1; /** * Default handler used to consolidate binder method calls onto a single thread. */ private final class CallVideoProviderHandler extends Handler { @Override public void handleMessage(Message msg) { switch (msg.what) { case MSG_SET_CAMERA: setCamera((String) msg.obj); default: break; } } } /** * Default ICallVideoProvider implementation. */ private final class CallVideoProviderBinder extends ICallVideoProvider.Stub { public void setCamera(String cameraId) { mMessageHandler.obtainMessage(MSG_SET_CAMERA, cameraId).sendToTarget(); } } private final CallVideoProviderHandler mMessageHandler = new CallVideoProviderHandler(); private final CallVideoProviderBinder mBinder; protected CallVideoProvider() { mBinder = new CallVideoProviderBinder(); } /** * Sets the camera to be used for video recording in a video call. * * @param cameraId The id of the camera. */ public abstract void setCamera(String cameraId); } telecomm/java/com/android/internal/telecomm/ICallVideoProvider.aidl 0 → 100644 +26 −0 Original line number Diff line number Diff line /* * 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 com.android.internal.telecomm; /** * Internal remote interface for a call video provider. * @see android.telecomm.CallVideoProvider * @hide */ oneway interface ICallVideoProvider { void setCamera(String cameraId); } No newline at end of file Loading
Android.mk +1 −0 Original line number Diff line number Diff line Loading @@ -330,6 +330,7 @@ LOCAL_SRC_FILES += \ telecomm/java/com/android/internal/telecomm/ICallServiceAdapter.aidl \ telecomm/java/com/android/internal/telecomm/ICallServiceLookupResponse.aidl \ telecomm/java/com/android/internal/telecomm/ICallServiceProvider.aidl \ telecomm/java/com/android/internal/telecomm/ICallVideoProvider.aidl \ telecomm/java/com/android/internal/telecomm/IInCallAdapter.aidl \ telecomm/java/com/android/internal/telecomm/IInCallService.aidl \ telecomm/java/com/android/internal/telecomm/ITelecommService.aidl \ Loading
telecomm/java/android/telecomm/CallVideoProvider.java 0 → 100644 +69 −0 Original line number Diff line number Diff line /* * 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.app.Service; import android.content.Intent; import android.os.Bundle; import android.os.Handler; import android.os.IBinder; import android.os.Message; import com.android.internal.telecomm.ICallVideoProvider; /** @hide */ public abstract class CallVideoProvider { private static final int MSG_SET_CAMERA = 1; /** * Default handler used to consolidate binder method calls onto a single thread. */ private final class CallVideoProviderHandler extends Handler { @Override public void handleMessage(Message msg) { switch (msg.what) { case MSG_SET_CAMERA: setCamera((String) msg.obj); default: break; } } } /** * Default ICallVideoProvider implementation. */ private final class CallVideoProviderBinder extends ICallVideoProvider.Stub { public void setCamera(String cameraId) { mMessageHandler.obtainMessage(MSG_SET_CAMERA, cameraId).sendToTarget(); } } private final CallVideoProviderHandler mMessageHandler = new CallVideoProviderHandler(); private final CallVideoProviderBinder mBinder; protected CallVideoProvider() { mBinder = new CallVideoProviderBinder(); } /** * Sets the camera to be used for video recording in a video call. * * @param cameraId The id of the camera. */ public abstract void setCamera(String cameraId); }
telecomm/java/com/android/internal/telecomm/ICallVideoProvider.aidl 0 → 100644 +26 −0 Original line number Diff line number Diff line /* * 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 com.android.internal.telecomm; /** * Internal remote interface for a call video provider. * @see android.telecomm.CallVideoProvider * @hide */ oneway interface ICallVideoProvider { void setCamera(String cameraId); } No newline at end of file