use of android.hardware.hdmi.HdmiHotplugEvent in project platform_frameworks_base by android.
the class HdmiControlService method addHotplugEventListener.
private void addHotplugEventListener(final IHdmiHotplugEventListener listener) {
final HotplugEventListenerRecord record = new HotplugEventListenerRecord(listener);
try {
listener.asBinder().linkToDeath(record, 0);
} catch (RemoteException e) {
Slog.w(TAG, "Listener already died");
return;
}
synchronized (mLock) {
mHotplugEventListenerRecords.add(record);
}
// Inform the listener of the initial state of each HDMI port by generating
// hotplug events.
runOnServiceThread(new Runnable() {
@Override
public void run() {
synchronized (mLock) {
if (!mHotplugEventListenerRecords.contains(record))
return;
}
for (HdmiPortInfo port : mPortInfo) {
HdmiHotplugEvent event = new HdmiHotplugEvent(port.getId(), mCecController.isConnected(port.getId()));
synchronized (mLock) {
invokeHotplugEventListenerLocked(listener, event);
}
}
}
});
}
use of android.hardware.hdmi.HdmiHotplugEvent in project android_frameworks_base by DirtyUnicorns.
the class HdmiControlService method addHotplugEventListener.
private void addHotplugEventListener(final IHdmiHotplugEventListener listener) {
final HotplugEventListenerRecord record = new HotplugEventListenerRecord(listener);
try {
listener.asBinder().linkToDeath(record, 0);
} catch (RemoteException e) {
Slog.w(TAG, "Listener already died");
return;
}
synchronized (mLock) {
mHotplugEventListenerRecords.add(record);
}
// Inform the listener of the initial state of each HDMI port by generating
// hotplug events.
runOnServiceThread(new Runnable() {
@Override
public void run() {
synchronized (mLock) {
if (!mHotplugEventListenerRecords.contains(record))
return;
}
for (HdmiPortInfo port : mPortInfo) {
HdmiHotplugEvent event = new HdmiHotplugEvent(port.getId(), mCecController.isConnected(port.getId()));
synchronized (mLock) {
invokeHotplugEventListenerLocked(listener, event);
}
}
}
});
}
use of android.hardware.hdmi.HdmiHotplugEvent in project android_frameworks_base by crdroidandroid.
the class HdmiControlService method addHotplugEventListener.
private void addHotplugEventListener(final IHdmiHotplugEventListener listener) {
final HotplugEventListenerRecord record = new HotplugEventListenerRecord(listener);
try {
listener.asBinder().linkToDeath(record, 0);
} catch (RemoteException e) {
Slog.w(TAG, "Listener already died");
return;
}
synchronized (mLock) {
mHotplugEventListenerRecords.add(record);
}
// Inform the listener of the initial state of each HDMI port by generating
// hotplug events.
runOnServiceThread(new Runnable() {
@Override
public void run() {
synchronized (mLock) {
if (!mHotplugEventListenerRecords.contains(record))
return;
}
for (HdmiPortInfo port : mPortInfo) {
HdmiHotplugEvent event = new HdmiHotplugEvent(port.getId(), mCecController.isConnected(port.getId()));
synchronized (mLock) {
invokeHotplugEventListenerLocked(listener, event);
}
}
}
});
}
use of android.hardware.hdmi.HdmiHotplugEvent in project android_frameworks_base by AOSPA.
the class HdmiControlService method addHotplugEventListener.
private void addHotplugEventListener(final IHdmiHotplugEventListener listener) {
final HotplugEventListenerRecord record = new HotplugEventListenerRecord(listener);
try {
listener.asBinder().linkToDeath(record, 0);
} catch (RemoteException e) {
Slog.w(TAG, "Listener already died");
return;
}
synchronized (mLock) {
mHotplugEventListenerRecords.add(record);
}
// Inform the listener of the initial state of each HDMI port by generating
// hotplug events.
runOnServiceThread(new Runnable() {
@Override
public void run() {
synchronized (mLock) {
if (!mHotplugEventListenerRecords.contains(record))
return;
}
for (HdmiPortInfo port : mPortInfo) {
HdmiHotplugEvent event = new HdmiHotplugEvent(port.getId(), mCecController.isConnected(port.getId()));
synchronized (mLock) {
invokeHotplugEventListenerLocked(listener, event);
}
}
}
});
}
use of android.hardware.hdmi.HdmiHotplugEvent in project android_frameworks_base by ResurrectionRemix.
the class HdmiControlService method addHotplugEventListener.
private void addHotplugEventListener(final IHdmiHotplugEventListener listener) {
final HotplugEventListenerRecord record = new HotplugEventListenerRecord(listener);
try {
listener.asBinder().linkToDeath(record, 0);
} catch (RemoteException e) {
Slog.w(TAG, "Listener already died");
return;
}
synchronized (mLock) {
mHotplugEventListenerRecords.add(record);
}
// Inform the listener of the initial state of each HDMI port by generating
// hotplug events.
runOnServiceThread(new Runnable() {
@Override
public void run() {
synchronized (mLock) {
if (!mHotplugEventListenerRecords.contains(record))
return;
}
for (HdmiPortInfo port : mPortInfo) {
HdmiHotplugEvent event = new HdmiHotplugEvent(port.getId(), mCecController.isConnected(port.getId()));
synchronized (mLock) {
invokeHotplugEventListenerLocked(listener, event);
}
}
}
});
}
Aggregations