Exploit databaseDownload repository ZIP
GH-13794a28e99af8452ce8e4224a1bc216
trinadh465/frameworks_base_aosp10_r33_cve-2022-20138
Sources for CVE-2022-20138
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files51
trinadh465/frameworks_base_aosp10_r33_cve-2022-20138Revision 144017c26d03
- ↑..Parent directory
- ActiveSourceHandler.java
- ArcInitiationActionFromAvr.java
- ArcTerminationActionFromAvr.java
- Constants.java
- DelayedMessageBuffer.java
- DetectTvSystemAudioModeSupportAction.java
- DeviceDiscoveryAction.java
- DevicePowerStatusAction.java
- DeviceSelectAction.java
- HdmiAnnotations.java
- HdmiCecController.java
- HdmiCecFeatureAction.java
- HdmiCecKeycode.java
- HdmiCecLocalDevice.java
- HdmiCecLocalDeviceAudioSystem.java
- HdmiCecLocalDevicePlayback.java
- HdmiCecLocalDeviceSource.java
- HdmiCecLocalDeviceTv.java
- HdmiCecMessage.java
- HdmiCecMessageBuilder.java
- HdmiCecMessageCache.java
- HdmiCecMessageValidator.java
- HdmiCecStandbyModeHandler.java
- HdmiConfig.java
- HdmiControlService.java
- HdmiLogger.java
- HdmiMhlControllerStub.java
- HdmiMhlLocalDeviceStub.java
- HdmiUtils.java
- HotplugDetectionAction.java
- NewDeviceAction.java
- OneTouchPlayAction.java
- OneTouchRecordAction.java
- PowerStatusMonitorAction.java
- RequestArcAction.java
- RequestArcInitiationAction.java
- RequestArcTerminationAction.java
- RoutingControlAction.java
- SelectRequestBuffer.java
- SendKeyAction.java
- SetArcTransmissionStateAction.java
- SystemAudioAction.java
- SystemAudioActionFromAvr.java
- SystemAudioActionFromTv.java
- SystemAudioAutoInitiationAction.java
- SystemAudioInitiationActionFromAvr.java
- SystemAudioStatusAction.java
- TimerRecordingAction.java
- UnmodifiableSparseArray.java
- UnmodifiableSparseIntArray.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
services/core/java/com/android/server/hdmi/ActiveSourceHandler.java
Java · 4,094 bytes/*
* 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.server.hdmi;
import android.annotation.Nullable;
import android.hardware.hdmi.IHdmiControlCallback;
import android.hardware.hdmi.HdmiDeviceInfo;
import android.hardware.hdmi.HdmiControlManager;
import android.os.RemoteException;
import android.util.Slog;
import com.android.server.hdmi.HdmiCecLocalDevice.ActiveSource;
/**
* Handles CEC command <Active Source>.
* <p>
* Used by feature actions that need to handle the command in their flow. Only for TV
* local device.
*/
final class ActiveSourceHandler {
private static final String TAG = "ActiveSourceHandler";
private final HdmiCecLocalDeviceTv mSource;
private final HdmiControlService mService;
@Nullable
private final IHdmiControlCallback mCallback;
static ActiveSourceHandler create(HdmiCecLocalDeviceTv source, IHdmiControlCallback callback) {
if (source == null) {
Slog.e(TAG, "Wrong arguments");
return null;
}
return new ActiveSourceHandler(source, callback);
}
private ActiveSourceHandler(HdmiCecLocalDeviceTv source, IHdmiControlCallback callback) {
mSource = source;
mService = mSource.getService();
mCallback = callback;
}
/**
* Handles the incoming active source command.
*
* @param newActive new active source information
* @param deviceType device type of the new active source
*/
void process(ActiveSource newActive, int deviceType) {
// Seq #17
HdmiCecLocalDeviceTv tv = mSource;
HdmiDeviceInfo device = mService.getDeviceInfo(newActive.logicalAddress);
if (device == null) {
tv.startNewDeviceAction(newActive, deviceType);
}
if (!tv.isProhibitMode()) {
ActiveSource old = ActiveSource.of(tv.getActiveSource());
tv.updateActiveSource(newActive);
boolean notifyInputChange = (mCallback == null);
if (!old.equals(newActive)) {
tv.setPrevPortId(tv.getActivePortId());
}
tv.updateActiveInput(newActive.physicalAddress, notifyInputChange);
invokeCallback(HdmiControlManager.RESULT_SUCCESS);
} else {
// TV is in a mode that should keep its current source/input from
// being changed for its operation. Reclaim the active source
// or switch the port back to the one used for the current mode.
ActiveSource current = tv.getActiveSource();
if (current.logicalAddress == getSourceAddress()) {
HdmiCecMessage activeSourceCommand = HdmiCecMessageBuilder.buildActiveSource(
current.logicalAddress, current.physicalAddress);
mService.sendCecCommand(activeSourceCommand);
tv.updateActiveSource(current);
invokeCallback(HdmiControlManager.RESULT_SUCCESS);
} else {
tv.startRoutingControl(newActive.physicalAddress, current.physicalAddress, true,
mCallback);
}
}
}
private final int getSourceAddress() {
return mSource.getDeviceInfo().getLogicalAddress();
}
private void invokeCallback(int result) {
if (mCallback == null) {
return;
}
try {
mCallback.onComplete(result);
} catch (RemoteException e) {
Slog.e(TAG, "Callback failed:" + e);
}
}
}