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 files151
trinadh465/frameworks_base_aosp10_r33_cve-2022-20138Revision 144017c26d03
- ↑..Parent directory
- animation/
- utils/
- AccessibilityController.java
- ActivityDisplay.java
- ActivityMetricsLaunchObserver.java
- ActivityMetricsLaunchObserverRegistry.java
- ActivityMetricsLogger.java
- ActivityRecord.java
- ActivityResult.java
- ActivityServiceConnectionsHolder.java
- ActivityStack.java
- ActivityStackSupervisor.java
- ActivityStartController.java
- ActivityStartInterceptor.java
- ActivityStarter.java
- ActivityTaskManagerDebugConfig.java
- ActivityTaskManagerInternal.java
- ActivityTaskManagerService.java
- AlertWindowNotification.java
- AnimatingAppWindowTokenRegistry.java
- AnimationAdapter.java
- AppTaskImpl.java
- AppTransition.java
- AppTransitionController.java
- AppWarnings.java
- AppWindowThumbnail.java
- AppWindowToken.java
- AssistDataReceiverProxy.java
- BarController.java
- BlackFrame.java
- BoundsAnimationController.java
- BoundsAnimationTarget.java
- CircularDisplayMask.java
- ClientLifecycleManager.java
- CompatModePackages.java
- ConfigurationContainer.java
- ConfigurationContainerListener.java
- DeprecatedTargetSdkVersionDialog.java
- Dimmer.java
- DisplayContent.java
- DisplayFrames.java
- DisplayPolicy.java
- DisplayRotation.java
- DisplayWindowSettings.java
- DockedStackDividerController.java
- DragAndDropPermissionsHandler.java
- DragDropController.java
- DragInputEventReceiver.java
- DragResizeMode.java
- DragState.java
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
services/core/java/com/android/server/wm/ActivityServiceConnectionsHolder.java
Java · 4,319 bytes/*
* Copyright (C) 2018 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.wm;
import static com.android.server.wm.ActivityStack.ActivityState.PAUSING;
import static com.android.server.wm.ActivityStack.ActivityState.RESUMED;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Iterator;
import java.util.function.Consumer;
/**
* Class for tracking the connections to services on the AM side that activities on the
* WM side (in the future) bind with for things like oom score adjustment. Would normally be one
* instance of this per activity for tracking all services connected to that activity. AM will
* sometimes query this to bump the OOM score for the processes with services connected to visible
* activities.
*/
public class ActivityServiceConnectionsHolder<T> {
private final ActivityTaskManagerService mService;
/** The activity the owns this service connection object. */
private final ActivityRecord mActivity;
/**
* The service connection object bounded with the owning activity. They represent
* ConnectionRecord on the AM side, however we don't need to know their object representation
* on the WM side since we don't perform operations on the object. Mainly here for communication
* and booking with the AM side.
*/
private HashSet<T> mConnections;
ActivityServiceConnectionsHolder(ActivityTaskManagerService service, ActivityRecord activity) {
mService = service;
mActivity = activity;
}
/** Adds a connection record that the activity has bound to a specific service. */
public void addConnection(T c) {
synchronized (mService.mGlobalLock) {
if (mConnections == null) {
mConnections = new HashSet<>();
}
mConnections.add(c);
}
}
/** Removed a connection record between the activity and a specific service. */
public void removeConnection(T c) {
synchronized (mService.mGlobalLock) {
if (mConnections == null) {
return;
}
mConnections.remove(c);
}
}
public boolean isActivityVisible() {
synchronized (mService.mGlobalLock) {
return mActivity.visible || mActivity.isState(RESUMED, PAUSING);
}
}
public int getActivityPid() {
synchronized (mService.mGlobalLock) {
return mActivity.hasProcess() ? mActivity.app.getPid() : -1;
}
}
public void forEachConnection(Consumer<T> consumer) {
synchronized (mService.mGlobalLock) {
if (mConnections == null || mConnections.isEmpty()) {
return;
}
final Iterator<T> it = mConnections.iterator();
while (it.hasNext()) {
T c = it.next();
consumer.accept(c);
}
}
}
/** Removes the connection between the activity and all services that were connected to it. */
void disconnectActivityFromServices() {
if (mConnections == null || mConnections.isEmpty()) {
return;
}
// Capture and null out mConnections, to guarantee that we process
// disconnect of these specific connections exactly once even if
// we're racing with rapid activity lifecycle churn and this
// method is invoked more than once on this object.
final Object disc = mConnections;
mConnections = null;
mService.mH.post(() -> mService.mAmInternal.disconnectActivityFromServices(this, disc));
}
public void dump(PrintWriter pw, String prefix) {
synchronized (mService.mGlobalLock) {
pw.println(prefix + "activity=" + mActivity);
}
}
}