diff options
author | Jinsuk Kim <jinsukkim@google.com> | 2014-06-06 15:52:07 +0900 |
---|---|---|
committer | Jinsuk Kim <jinsukkim@google.com> | 2014-06-09 07:55:47 +0900 |
commit | 3f48068d782b81dc1c8a0190b91fbb2862007244 (patch) | |
tree | e70558758a0a36bd19dd231ecffd426624f1120f /core/java/android | |
parent | faecafce62ca39a7693669f7c9eabf2d71c633cf (diff) | |
download | frameworks_base-3f48068d782b81dc1c8a0190b91fbb2862007244.zip frameworks_base-3f48068d782b81dc1c8a0190b91fbb2862007244.tar.gz frameworks_base-3f48068d782b81dc1c8a0190b91fbb2862007244.tar.bz2 |
Remove HdmiCecService
The service is replaced with HdmiControlService. Removing all the related
classes and the initialization of the service.
Change-Id: Ic7baaddffb9873613ddd1096e874f226da983939
Diffstat (limited to 'core/java/android')
-rw-r--r-- | core/java/android/app/ContextImpl.java | 8 | ||||
-rw-r--r-- | core/java/android/content/Context.java | 13 | ||||
-rw-r--r-- | core/java/android/hardware/hdmi/HdmiCecClient.java | 119 | ||||
-rw-r--r-- | core/java/android/hardware/hdmi/HdmiCecManager.java | 68 | ||||
-rw-r--r-- | core/java/android/hardware/hdmi/IHdmiCecListener.aidl | 29 | ||||
-rw-r--r-- | core/java/android/hardware/hdmi/IHdmiCecService.aidl | 40 |
6 files changed, 0 insertions, 277 deletions
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java index ac25a53..5bbc43c 100644 --- a/core/java/android/app/ContextImpl.java +++ b/core/java/android/app/ContextImpl.java @@ -57,9 +57,7 @@ import android.hardware.ConsumerIrManager; import android.hardware.ISerialManager; import android.hardware.SerialManager; import android.hardware.SystemSensorManager; -import android.hardware.hdmi.HdmiCecManager; import android.hardware.hdmi.HdmiControlManager; -import android.hardware.hdmi.IHdmiCecService; import android.hardware.hdmi.IHdmiControlService; import android.hardware.camera2.CameraManager; import android.hardware.display.DisplayManager; @@ -384,12 +382,6 @@ class ContextImpl extends Context { return new BluetoothManager(ctx); }}); - registerService(HDMI_CEC_SERVICE, new StaticServiceFetcher() { - public Object createStaticService() { - IBinder b = ServiceManager.getService(HDMI_CEC_SERVICE); - return new HdmiCecManager(IHdmiCecService.Stub.asInterface(b)); - }}); - registerService(HDMI_CONTROL_SERVICE, new StaticServiceFetcher() { public Object createStaticService() { IBinder b = ServiceManager.getService(HDMI_CONTROL_SERVICE); diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index 9baac32..571bb4d 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -2148,8 +2148,6 @@ public abstract class Context { * @see android.app.SearchManager * @see #SENSOR_SERVICE * @see android.hardware.SensorManager - * @see #HDMI_CEC_SERVICE - * @see android.hardware.hdmi.HdmiCecManager * @see #STORAGE_SERVICE * @see android.os.storage.StorageManager * @see #VIBRATOR_SERVICE @@ -2638,17 +2636,6 @@ public abstract class Context { /** * Use with {@link #getSystemService} to retrieve a - * {@link android.hardware.hdmi.HdmiCecManager} for controlling and managing - * HDMI-CEC protocol. - * - * @see #getSystemService - * @see android.hardware.hdmi.HdmiCecManager - */ - // TODO: Remove this once HdmiControlService is ready. - public static final String HDMI_CEC_SERVICE = "hdmi_cec"; - - /** - * Use with {@link #getSystemService} to retrieve a * {@link android.hardware.hdmi.HdmiControlManager} for controlling and managing * HDMI-CEC protocol. * diff --git a/core/java/android/hardware/hdmi/HdmiCecClient.java b/core/java/android/hardware/hdmi/HdmiCecClient.java deleted file mode 100644 index dcb3624..0000000 --- a/core/java/android/hardware/hdmi/HdmiCecClient.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * 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.os.IBinder; -import android.os.RemoteException; - -import android.util.Log; - -/** - * HdmiCecClient is used to control HDMI-CEC logical device instance in the system. - * It is connected to actual hardware part via HdmiCecService. It provides with methods - * to send CEC messages to other device on the bus, and listener that allows to receive - * incoming messages to the device. - */ -public final class HdmiCecClient { - private static final String TAG = "HdmiCecClient"; - - private final IHdmiCecService mService; - private final IBinder mBinder; - - /** - * Listener used by the client to get the incoming messages. - */ - public static abstract class Listener { - /** - * Called when CEC message arrives. Override this method to receive the incoming - * CEC messages from other device on the bus. - * - * @param message {@link HdmiCecMessage} object - */ - public void onMessageReceived(HdmiCecMessage message) { } - - /** - * Called when hotplug event occurs. Override this method to receive the events. - * - * @param connected true if the cable is connected; otherwise false. - */ - public void onCableStatusChanged(boolean connected) { } - } - - // Private constructor. - private HdmiCecClient(IHdmiCecService service, IBinder b) { - mService = service; - mBinder = b; - } - - // Factory method for HdmiCecClient. - // Declared package-private. Accessed by HdmiCecManager only. - static HdmiCecClient create(IHdmiCecService service, IBinder b) { - return new HdmiCecClient(service, b); - } - - /** - * Send <Active Source> message. - */ - public void sendActiveSource() { - Log.w(TAG, "In transition to HdmiControlManager. Will not work."); - } - - /** - * Send <Inactive Source> message. - */ - public void sendInactiveSource() { - Log.w(TAG, "In transition to HdmiControlManager. Will not work."); - } - - /** - * Send <Text View On> message. - */ - public void sendTextViewOn() { - Log.w(TAG, "In transition to HdmiControlManager. Will not work."); - } - - /** - * Send <Image View On> message. - */ - public void sendImageViewOn() { - Log.w(TAG, "In transition to HdmiControlManager. Will not work."); - } - - /** - * Send <Give Device Power Status> message. - * - * @param address logical address of the device to send the message to, such as - * {@link HdmiCec#ADDR_TV}. - */ - public void sendGiveDevicePowerStatus(int address) { - Log.w(TAG, "In transition to HdmiControlManager. Will not work."); - } - - /** - * Returns true if the TV or attached display is powered on. - * <p> - * The result of this method is only meaningful on playback devices (where the device - * type is {@link HdmiCec#DEVICE_PLAYBACK}). - * </p> - * - * @return true if TV is on; otherwise false. - */ - public boolean isTvOn() { - Log.w(TAG, "In transition to HdmiControlManager. Will not work."); - return true; - } -} diff --git a/core/java/android/hardware/hdmi/HdmiCecManager.java b/core/java/android/hardware/hdmi/HdmiCecManager.java deleted file mode 100644 index 03c46d8..0000000 --- a/core/java/android/hardware/hdmi/HdmiCecManager.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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.os.IBinder; -import android.os.RemoteException; - -/** - * The HdmiCecManager class is used to provide an HdmiCecClient instance, - * get various information on HDMI ports configuration. It is connected to actual hardware - * via HdmiCecService. - */ -public final class HdmiCecManager { - private final IHdmiCecService mService; - - /** - * @hide - hide this constructor because it has a parameter of type IHdmiCecService, - * which is a system private class. The right way to create an instance of this class - * is using the factory Context.getSystemService. - */ - public HdmiCecManager(IHdmiCecService service) { - mService = service; - } - - /** - * Provide the HdmiCecClient instance of the given type. It also registers the listener - * for client to get the events coming to the device. - * - * @param type type of the HDMI-CEC logical device - * @param listener listener to be called - * @return {@link HdmiCecClient} instance. {@code null} on failure. - */ - public HdmiCecClient getClient(int type, HdmiCecClient.Listener listener) { - return HdmiCecClient.create(mService, null); - } - - private IHdmiCecListener getListenerWrapper(final HdmiCecClient.Listener listener) { - // TODO: The message/events are not yet forwarded to client since it is not clearly - // defined as to how/who to handle them. Revisit it once the decision is - // made on what messages will have to reach the clients, what will be - // handled by service/manager. - return new IHdmiCecListener.Stub() { - @Override - public void onMessageReceived(HdmiCecMessage message) { - // Do nothing. - } - - @Override - public void onCableStatusChanged(boolean connected) { - // Do nothing. - } - }; - } -} diff --git a/core/java/android/hardware/hdmi/IHdmiCecListener.aidl b/core/java/android/hardware/hdmi/IHdmiCecListener.aidl deleted file mode 100644 index d281ce6..0000000 --- a/core/java/android/hardware/hdmi/IHdmiCecListener.aidl +++ /dev/null @@ -1,29 +0,0 @@ -/* - * 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.hardware.hdmi.HdmiCecMessage; - -/** - * Interface definition for HdmiCecService to do interprocess communcation. - * - * @hide - */ -oneway interface IHdmiCecListener { - void onMessageReceived(in HdmiCecMessage message); - void onCableStatusChanged(in boolean connected); -} diff --git a/core/java/android/hardware/hdmi/IHdmiCecService.aidl b/core/java/android/hardware/hdmi/IHdmiCecService.aidl deleted file mode 100644 index ecdd345..0000000 --- a/core/java/android/hardware/hdmi/IHdmiCecService.aidl +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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.hardware.hdmi.HdmiCecMessage; -import android.hardware.hdmi.IHdmiCecListener; -import android.os.IBinder; - -/** - * Binder interface that components running in the appplication process - * will use to enable HDMI-CEC protocol exchange with other devices. - * - * @hide - */ -interface IHdmiCecService { - IBinder allocateLogicalDevice(int type, IHdmiCecListener listener); - void removeServiceListener(IBinder b, IHdmiCecListener listener); - void sendActiveSource(IBinder b); - void sendInactiveSource(IBinder b); - void sendImageViewOn(IBinder b); - void sendTextViewOn(IBinder b); - void sendGiveDevicePowerStatus(IBinder b, int address); - boolean isTvOn(IBinder b); - void sendMessage(IBinder b, in HdmiCecMessage message); -} - |