From a6b2a7a59ab79b2d91412c1095d1c49b8dc9d507 Mon Sep 17 00:00:00 2001 From: Jungshik Jang Date: Wed, 16 Jul 2014 18:04:49 +0900 Subject: [PATCH] Add two apis for one touch record. This change introduces new two apis for one touch record. 1. setRecordRequestListener It's used to get notified when a recorder device initiates "one touch record". As return of callback, client should generate "record source" and return it. 2. startRecord It's used to initiate "one touch record" from Tv. Along with this, add HdmiRecordSources which is a helper class assisting buidling byte array form from the given record source information. Bug: 16160962 Change-Id: I403d37b752c9b7f799c6d8188a071ef420fe8ac2 --- Android.mk | 1 + .../hardware/hdmi/HdmiRecordSources.java | 743 ++++++++++++++++++ .../android/hardware/hdmi/HdmiTvClient.java | 67 +- .../hardware/hdmi/IHdmiControlService.aidl | 3 + .../hdmi/IHdmiRecordRequestListener.aidl | 27 + .../com/android/server/hdmi/Constants.java | 5 + .../server/hdmi/HdmiControlService.java | 11 + .../server/hdmi/OneTouchRecordAction.java | 27 +- 8 files changed, 879 insertions(+), 5 deletions(-) create mode 100644 core/java/android/hardware/hdmi/HdmiRecordSources.java create mode 100644 core/java/android/hardware/hdmi/IHdmiRecordRequestListener.aidl diff --git a/Android.mk b/Android.mk index 3b01f70497724..0d02be77c8075 100644 --- a/Android.mk +++ b/Android.mk @@ -155,6 +155,7 @@ LOCAL_SRC_FILES += \ core/java/android/hardware/hdmi/IHdmiDeviceEventListener.aidl \ core/java/android/hardware/hdmi/IHdmiHotplugEventListener.aidl \ core/java/android/hardware/hdmi/IHdmiInputChangeListener.aidl \ + core/java/android/hardware/hdmi/IHdmiRecordRequestListener.aidl \ core/java/android/hardware/hdmi/IHdmiSystemAudioModeChangeListener.aidl \ core/java/android/hardware/hdmi/IHdmiVendorCommandListener.aidl \ core/java/android/hardware/input/IInputManager.aidl \ diff --git a/core/java/android/hardware/hdmi/HdmiRecordSources.java b/core/java/android/hardware/hdmi/HdmiRecordSources.java new file mode 100644 index 0000000000000..5a02c34ae59a1 --- /dev/null +++ b/core/java/android/hardware/hdmi/HdmiRecordSources.java @@ -0,0 +1,743 @@ +/* + * 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.hardware.hdmi; + +import android.annotation.Nullable; +import android.annotation.SystemApi; +import android.util.Log; + +/** + * Container for record source used for one touch record. + * Use one of helper method by source type. + *