Merge changes from topic "aidl_trace" am: e75a6f8696 am: 7a54741e61
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2254718 Change-Id: I876702d1964ac6e065e4f829a5c06a4ea32a4b84 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -522,9 +522,6 @@ interface IActivityManager {
|
|||||||
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
|
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
|
||||||
boolean stopBinderTrackingAndDump(in ParcelFileDescriptor fd);
|
boolean stopBinderTrackingAndDump(in ParcelFileDescriptor fd);
|
||||||
|
|
||||||
/** Enables server-side binder tracing for the calling uid. */
|
|
||||||
void enableBinderTracing();
|
|
||||||
|
|
||||||
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
|
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
|
||||||
void suppressResizeConfigChanges(boolean suppress);
|
void suppressResizeConfigChanges(boolean suppress);
|
||||||
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
|
@UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ import android.annotation.SystemApi;
|
|||||||
import android.app.AppOpsManager;
|
import android.app.AppOpsManager;
|
||||||
import android.compat.annotation.UnsupportedAppUsage;
|
import android.compat.annotation.UnsupportedAppUsage;
|
||||||
import android.util.ExceptionUtils;
|
import android.util.ExceptionUtils;
|
||||||
import android.util.IntArray;
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.Slog;
|
import android.util.Slog;
|
||||||
|
|
||||||
@@ -144,9 +143,6 @@ public class Binder implements IBinder {
|
|||||||
*/
|
*/
|
||||||
private static volatile boolean sStackTrackingEnabled = false;
|
private static volatile boolean sStackTrackingEnabled = false;
|
||||||
|
|
||||||
private static final Object sTracingUidsWriteLock = new Object();
|
|
||||||
private static volatile IntArray sTracingUidsImmutable = new IntArray();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable Binder IPC stack tracking. If enabled, every binder transaction will be logged to
|
* Enable Binder IPC stack tracking. If enabled, every binder transaction will be logged to
|
||||||
* {@link TransactionTracker}.
|
* {@link TransactionTracker}.
|
||||||
@@ -166,17 +162,6 @@ public class Binder implements IBinder {
|
|||||||
sStackTrackingEnabled = false;
|
sStackTrackingEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
public static void enableTracingForUid(int uid) {
|
|
||||||
synchronized (sTracingUidsWriteLock) {
|
|
||||||
final IntArray copy = sTracingUidsImmutable.clone();
|
|
||||||
copy.add(uid);
|
|
||||||
sTracingUidsImmutable = copy;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if binder transaction stack tracking is enabled.
|
* Check if binder transaction stack tracking is enabled.
|
||||||
*
|
*
|
||||||
@@ -186,13 +171,6 @@ public class Binder implements IBinder {
|
|||||||
return sStackTrackingEnabled;
|
return sStackTrackingEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @hide
|
|
||||||
*/
|
|
||||||
public static boolean isTracingEnabled(int callingUid) {
|
|
||||||
return sTracingUidsImmutable.indexOf(callingUid) != -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the binder transaction tracker for this process.
|
* Get the binder transaction tracker for this process.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
package com.android.systemui;
|
package com.android.systemui;
|
||||||
|
|
||||||
import android.app.ActivityManager;
|
|
||||||
import android.app.ActivityThread;
|
import android.app.ActivityThread;
|
||||||
import android.app.Application;
|
import android.app.Application;
|
||||||
import android.app.Notification;
|
import android.app.Notification;
|
||||||
@@ -29,7 +28,6 @@ import android.content.res.Configuration;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.os.Process;
|
import android.os.Process;
|
||||||
import android.os.RemoteException;
|
|
||||||
import android.os.SystemProperties;
|
import android.os.SystemProperties;
|
||||||
import android.os.Trace;
|
import android.os.Trace;
|
||||||
import android.os.UserHandle;
|
import android.os.UserHandle;
|
||||||
@@ -128,13 +126,6 @@ public class SystemUIApplication extends Application implements
|
|||||||
ThreadedRenderer.EGL_CONTEXT_PRIORITY_HIGH_IMG);
|
ThreadedRenderer.EGL_CONTEXT_PRIORITY_HIGH_IMG);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable binder tracing on system server for calls originating from SysUI
|
|
||||||
try {
|
|
||||||
ActivityManager.getService().enableBinderTracing();
|
|
||||||
} catch (RemoteException e) {
|
|
||||||
Log.e(TAG, "Unable to enable binder tracing", e);
|
|
||||||
}
|
|
||||||
|
|
||||||
registerReceiver(new BroadcastReceiver() {
|
registerReceiver(new BroadcastReceiver() {
|
||||||
@Override
|
@Override
|
||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
|
|||||||
@@ -16382,11 +16382,6 @@ public class ActivityManagerService extends IActivityManager.Stub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void enableBinderTracing() {
|
|
||||||
Binder.enableTracingForUid(Binder.getCallingUid());
|
|
||||||
}
|
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public final class LocalService extends ActivityManagerInternal
|
public final class LocalService extends ActivityManagerInternal
|
||||||
implements ActivityManagerLocal {
|
implements ActivityManagerLocal {
|
||||||
|
|||||||
Reference in New Issue
Block a user