Exploit databaseDownload repository ZIP
GH-cd474985a1d611a2a689e02bc95daae0
satheesh575555/frameworks_base_aosp10_r33_cve-2022-20142
Sources for CVE-2022-20142
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files47
satheesh575555/frameworks_base_aosp10_r33_cve-2022-20142Revision 0b10dce4665c
- ↑..Parent directory
- AsyncRunner.java
- CachedFrameManager.java
- FieldPort.java
- Filter.java
- FilterContext.java
- FilterFactory.java
- FilterFunction.java
- FilterGraph.java
- FilterPort.java
- FilterSurfaceView.java
- FinalPort.java
- Frame.java
- FrameFormat.java
- FrameManager.java
- GLEnvironment.java
- GLFrame.java
- GenerateFieldPort.java
- GenerateFinalPort.java
- GenerateProgramPort.java
- GenerateProgramPorts.java
- GraphRunner.java
- InputPort.java
- KeyValueMap.java
- MutableFrameFormat.java
- NativeAllocatorTag.java
- NativeBuffer.java
- NativeFrame.java
- NativeProgram.java
- OneShotScheduler.java
- OutputPort.java
- Program.java
- ProgramPort.java
- ProgramVariable.java
- ProtocolException.java
- RandomScheduler.java
- RoundRobinScheduler.java
- Scheduler.java
- SerializedFrame.java
- ShaderProgram.java
- SimpleFrame.java
- SimpleFrameManager.java
- SimpleScheduler.java
- StopWatchMap.java
- StreamPort.java
- SyncRunner.java
- VertexFrame.java
- package-info.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
media/mca/filterfw/java/android/filterfw/core/GLEnvironment.java
Java · 5,775 bytes/*
* Copyright (C) 2011 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.filterfw.core;
import android.annotation.UnsupportedAppUsage;
import android.filterfw.core.NativeAllocatorTag;
import android.graphics.SurfaceTexture;
import android.os.Looper;
import android.util.Log;
import android.view.Surface;
import android.media.MediaRecorder;
/**
* @hide
*/
public class GLEnvironment {
private int glEnvId;
private boolean mManageContext = true;
public GLEnvironment() {
nativeAllocate();
}
private GLEnvironment(NativeAllocatorTag tag) {
}
public synchronized void tearDown() {
if (glEnvId != -1) {
nativeDeallocate();
glEnvId = -1;
}
}
@Override
protected void finalize() throws Throwable {
tearDown();
}
public void initWithNewContext() {
mManageContext = true;
if (!nativeInitWithNewContext()) {
throw new RuntimeException("Could not initialize GLEnvironment with new context!");
}
}
public void initWithCurrentContext() {
mManageContext = false;
if (!nativeInitWithCurrentContext()) {
throw new RuntimeException("Could not initialize GLEnvironment with current context!");
}
}
@UnsupportedAppUsage
public boolean isActive() {
return nativeIsActive();
}
public boolean isContextActive() {
return nativeIsContextActive();
}
public static boolean isAnyContextActive() {
return nativeIsAnyContextActive();
}
@UnsupportedAppUsage
public void activate() {
if (Looper.myLooper() != null && Looper.myLooper().equals(Looper.getMainLooper())) {
Log.e("FilterFramework", "Activating GL context in UI thread!");
}
if (mManageContext && !nativeActivate()) {
throw new RuntimeException("Could not activate GLEnvironment!");
}
}
@UnsupportedAppUsage
public void deactivate() {
if (mManageContext && !nativeDeactivate()) {
throw new RuntimeException("Could not deactivate GLEnvironment!");
}
}
@UnsupportedAppUsage
public void swapBuffers() {
if (!nativeSwapBuffers()) {
throw new RuntimeException("Error swapping EGL buffers!");
}
}
public int registerSurface(Surface surface) {
int result = nativeAddSurface(surface);
if (result < 0) {
throw new RuntimeException("Error registering surface " + surface + "!");
}
return result;
}
public int registerSurfaceTexture(SurfaceTexture surfaceTexture, int width, int height) {
Surface surface = new Surface(surfaceTexture);
int result = nativeAddSurfaceWidthHeight(surface, width, height);
surface.release();
if (result < 0) {
throw new RuntimeException("Error registering surfaceTexture " + surfaceTexture + "!");
}
return result;
}
@UnsupportedAppUsage
public int registerSurfaceFromMediaRecorder(MediaRecorder mediaRecorder) {
int result = nativeAddSurfaceFromMediaRecorder(mediaRecorder);
if (result < 0) {
throw new RuntimeException("Error registering surface from "
+ "MediaRecorder" + mediaRecorder + "!");
}
return result;
}
@UnsupportedAppUsage
public void activateSurfaceWithId(int surfaceId) {
if (!nativeActivateSurfaceId(surfaceId)) {
throw new RuntimeException("Could not activate surface " + surfaceId + "!");
}
}
@UnsupportedAppUsage
public void unregisterSurfaceId(int surfaceId) {
if (!nativeRemoveSurfaceId(surfaceId)) {
throw new RuntimeException("Could not unregister surface " + surfaceId + "!");
}
}
@UnsupportedAppUsage
public void setSurfaceTimestamp(long timestamp) {
if (!nativeSetSurfaceTimestamp(timestamp)) {
throw new RuntimeException("Could not set timestamp for current surface!");
}
}
static {
System.loadLibrary("filterfw");
}
private native boolean nativeInitWithNewContext();
private native boolean nativeInitWithCurrentContext();
private native boolean nativeIsActive();
private native boolean nativeIsContextActive();
private static native boolean nativeIsAnyContextActive();
private native boolean nativeActivate();
private native boolean nativeDeactivate();
private native boolean nativeSwapBuffers();
private native boolean nativeAllocate();
private native boolean nativeDeallocate();
private native int nativeAddSurface(Surface surface);
private native int nativeAddSurfaceWidthHeight(Surface surface, int width, int height);
private native int nativeAddSurfaceFromMediaRecorder(MediaRecorder mediaRecorder);
private native boolean nativeDisconnectSurfaceMediaSource(MediaRecorder mediaRecorder);
private native boolean nativeActivateSurfaceId(int surfaceId);
private native boolean nativeRemoveSurfaceId(int surfaceId);
private native boolean nativeSetSurfaceTimestamp(long timestamp);
}