Loading cmds/am/src/com/android/commands/am/Am.java +1 −4 Original line number Original line Diff line number Diff line Loading @@ -120,7 +120,7 @@ public class Am extends BaseCommand { out.println( out.println( "usage: am [subcommand] [options]\n" + "usage: am [subcommand] [options]\n" + "usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]\n" + "usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]\n" + " [--sampling INTERVAL] [-R COUNT] [-S] [--opengl-trace]\n" + " [--sampling INTERVAL] [-R COUNT] [-S]\n" + " [--track-allocation] [--user <USER_ID> | current] <INTENT>\n" + " [--track-allocation] [--user <USER_ID> | current] <INTENT>\n" + " am startservice [--user <USER_ID> | current] <INTENT>\n" + " am startservice [--user <USER_ID> | current] <INTENT>\n" + " am stopservice [--user <USER_ID> | current] <INTENT>\n" + " am stopservice [--user <USER_ID> | current] <INTENT>\n" + Loading Loading @@ -182,7 +182,6 @@ public class Am extends BaseCommand { " -R: repeat the activity launch <COUNT> times. Prior to each repeat,\n" + " -R: repeat the activity launch <COUNT> times. Prior to each repeat,\n" + " the top activity will be finished.\n" + " the top activity will be finished.\n" + " -S: force stop the target app before starting the activity\n" + " -S: force stop the target app before starting the activity\n" + " --opengl-trace: enable tracing of OpenGL functions\n" + " --track-allocation: enable tracking of object allocations\n" + " --track-allocation: enable tracking of object allocations\n" + " --user <USER_ID> | current: Specify which user to run as; if not\n" + " --user <USER_ID> | current: Specify which user to run as; if not\n" + " specified then run as the current user.\n" + " specified then run as the current user.\n" + Loading Loading @@ -739,8 +738,6 @@ public class Am extends BaseCommand { mRepeat = Integer.parseInt(nextArgRequired()); mRepeat = Integer.parseInt(nextArgRequired()); } else if (opt.equals("-S")) { } else if (opt.equals("-S")) { mStopOption = true; mStopOption = true; } else if (opt.equals("--opengl-trace")) { mStartFlags |= ActivityManager.START_FLAG_OPENGL_TRACES; } else if (opt.equals("--track-allocation")) { } else if (opt.equals("--track-allocation")) { mStartFlags |= ActivityManager.START_FLAG_TRACK_ALLOCATION; mStartFlags |= ActivityManager.START_FLAG_TRACK_ALLOCATION; } else if (opt.equals("--user")) { } else if (opt.equals("--user")) { Loading core/java/android/app/ActivityManager.java +1 −8 Original line number Original line Diff line number Diff line Loading @@ -202,19 +202,12 @@ public class ActivityManager { */ */ public static final int START_FLAG_DEBUG = 1<<1; public static final int START_FLAG_DEBUG = 1<<1; /** * Flag for IActivityManaqer.startActivity: launch the app for * OpenGL tracing. * @hide */ public static final int START_FLAG_OPENGL_TRACES = 1<<2; /** /** * Flag for IActivityManaqer.startActivity: launch the app for * Flag for IActivityManaqer.startActivity: launch the app for * allocation tracking. * allocation tracking. * @hide * @hide */ */ public static final int START_FLAG_TRACK_ALLOCATION = 1<<3; public static final int START_FLAG_TRACK_ALLOCATION = 1<<2; /** /** * Result for IActivityManaqer.broadcastIntent: success! * Result for IActivityManaqer.broadcastIntent: success! Loading core/java/android/app/ActivityThread.java +3 −11 Original line number Original line Diff line number Diff line Loading @@ -469,7 +469,6 @@ public final class ActivityThread { IUiAutomationConnection instrumentationUiAutomationConnection; IUiAutomationConnection instrumentationUiAutomationConnection; int debugMode; int debugMode; boolean enableBinderTracking; boolean enableBinderTracking; boolean enableOpenGlTrace; boolean trackAllocation; boolean trackAllocation; boolean restrictedBackupMode; boolean restrictedBackupMode; boolean persistent; boolean persistent; Loading Loading @@ -805,10 +804,9 @@ public final class ActivityThread { ProfilerInfo profilerInfo, Bundle instrumentationArgs, ProfilerInfo profilerInfo, Bundle instrumentationArgs, IInstrumentationWatcher instrumentationWatcher, IInstrumentationWatcher instrumentationWatcher, IUiAutomationConnection instrumentationUiConnection, int debugMode, IUiAutomationConnection instrumentationUiConnection, int debugMode, boolean enableBinderTracking, boolean enableOpenGlTrace, boolean enableBinderTracking, boolean trackAllocation, boolean trackAllocation, boolean isRestrictedBackupMode, boolean isRestrictedBackupMode, boolean persistent, Configuration config, boolean persistent, Configuration config, CompatibilityInfo compatInfo, CompatibilityInfo compatInfo, Map<String, IBinder> services, Bundle coreSettings) { Map<String, IBinder> services, Bundle coreSettings) { if (services != null) { if (services != null) { // Setup the service cache in the ServiceManager // Setup the service cache in the ServiceManager Loading Loading @@ -864,7 +862,6 @@ public final class ActivityThread { data.instrumentationUiAutomationConnection = instrumentationUiConnection; data.instrumentationUiAutomationConnection = instrumentationUiConnection; data.debugMode = debugMode; data.debugMode = debugMode; data.enableBinderTracking = enableBinderTracking; data.enableBinderTracking = enableBinderTracking; data.enableOpenGlTrace = enableOpenGlTrace; data.trackAllocation = trackAllocation; data.trackAllocation = trackAllocation; data.restrictedBackupMode = isRestrictedBackupMode; data.restrictedBackupMode = isRestrictedBackupMode; data.persistent = persistent; data.persistent = persistent; Loading Loading @@ -4776,11 +4773,6 @@ public final class ActivityThread { } } } } // Enable OpenGL tracing if required if (data.enableOpenGlTrace) { GLUtils.setTracingLevel(1); } // Allow application-generated systrace messages if we're debuggable. // Allow application-generated systrace messages if we're debuggable. boolean isAppDebuggable = (data.appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0; boolean isAppDebuggable = (data.appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0; Trace.setAppTracingAllowed(isAppDebuggable); Trace.setAppTracingAllowed(isAppDebuggable); Loading core/java/android/app/ApplicationThreadNative.java +5 −8 Original line number Original line Diff line number Diff line Loading @@ -294,7 +294,6 @@ public abstract class ApplicationThreadNative extends Binder IUiAutomationConnection.Stub.asInterface(binder); IUiAutomationConnection.Stub.asInterface(binder); int testMode = data.readInt(); int testMode = data.readInt(); boolean enableBinderTracking = data.readInt() != 0; boolean enableBinderTracking = data.readInt() != 0; boolean openGlTrace = data.readInt() != 0; boolean trackAllocation = data.readInt() != 0; boolean trackAllocation = data.readInt() != 0; boolean restrictedBackupMode = (data.readInt() != 0); boolean restrictedBackupMode = (data.readInt() != 0); boolean persistent = (data.readInt() != 0); boolean persistent = (data.readInt() != 0); Loading @@ -304,8 +303,8 @@ public abstract class ApplicationThreadNative extends Binder Bundle coreSettings = data.readBundle(); Bundle coreSettings = data.readBundle(); bindApplication(packageName, info, providers, testName, profilerInfo, testArgs, bindApplication(packageName, info, providers, testName, profilerInfo, testArgs, testWatcher, uiAutomationConnection, testMode, enableBinderTracking, testWatcher, uiAutomationConnection, testMode, enableBinderTracking, openGlTrace, trackAllocation, restrictedBackupMode, persistent, config, trackAllocation, restrictedBackupMode, persistent, config, compatInfo, services, compatInfo, services, coreSettings); coreSettings); return true; return true; } } Loading Loading @@ -1020,10 +1019,9 @@ class ApplicationThreadProxy implements IApplicationThread { List<ProviderInfo> providers, ComponentName testName, ProfilerInfo profilerInfo, List<ProviderInfo> providers, ComponentName testName, ProfilerInfo profilerInfo, Bundle testArgs, IInstrumentationWatcher testWatcher, Bundle testArgs, IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection, int debugMode, IUiAutomationConnection uiAutomationConnection, int debugMode, boolean enableBinderTracking, boolean openGlTrace, boolean trackAllocation, boolean enableBinderTracking, boolean trackAllocation, boolean restrictedBackupMode, boolean restrictedBackupMode, boolean persistent, Configuration config, boolean persistent, Configuration config, CompatibilityInfo compatInfo, CompatibilityInfo compatInfo, Map<String, IBinder> services, Map<String, IBinder> services, Bundle coreSettings) throws RemoteException { Bundle coreSettings) throws RemoteException { Parcel data = Parcel.obtain(); Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeString(packageName); data.writeString(packageName); Loading @@ -1046,7 +1044,6 @@ class ApplicationThreadProxy implements IApplicationThread { data.writeStrongInterface(uiAutomationConnection); data.writeStrongInterface(uiAutomationConnection); data.writeInt(debugMode); data.writeInt(debugMode); data.writeInt(enableBinderTracking ? 1 : 0); data.writeInt(enableBinderTracking ? 1 : 0); data.writeInt(openGlTrace ? 1 : 0); data.writeInt(trackAllocation ? 1 : 0); data.writeInt(trackAllocation ? 1 : 0); data.writeInt(restrictedBackupMode ? 1 : 0); data.writeInt(restrictedBackupMode ? 1 : 0); data.writeInt(persistent ? 1 : 0); data.writeInt(persistent ? 1 : 0); Loading core/java/android/app/IApplicationThread.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -96,10 +96,10 @@ public interface IApplicationThread extends IInterface { void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers, void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers, ComponentName testName, ProfilerInfo profilerInfo, Bundle testArguments, ComponentName testName, ProfilerInfo profilerInfo, Bundle testArguments, IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection, IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection, int debugMode, boolean enableBinderTracking, boolean openGlTrace, int debugMode, boolean enableBinderTracking, boolean trackAllocation, boolean trackAllocation, boolean restrictedBackupMode, boolean persistent, boolean restrictedBackupMode, boolean persistent, Configuration config, Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services, CompatibilityInfo compatInfo, Map<String, IBinder> services, Bundle coreSettings) Bundle coreSettings) throws RemoteException; throws RemoteException; void scheduleExit() throws RemoteException; void scheduleExit() throws RemoteException; void scheduleSuicide() throws RemoteException; void scheduleSuicide() throws RemoteException; void scheduleConfigurationChanged(Configuration config) throws RemoteException; void scheduleConfigurationChanged(Configuration config) throws RemoteException; Loading Loading
cmds/am/src/com/android/commands/am/Am.java +1 −4 Original line number Original line Diff line number Diff line Loading @@ -120,7 +120,7 @@ public class Am extends BaseCommand { out.println( out.println( "usage: am [subcommand] [options]\n" + "usage: am [subcommand] [options]\n" + "usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]\n" + "usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]\n" + " [--sampling INTERVAL] [-R COUNT] [-S] [--opengl-trace]\n" + " [--sampling INTERVAL] [-R COUNT] [-S]\n" + " [--track-allocation] [--user <USER_ID> | current] <INTENT>\n" + " [--track-allocation] [--user <USER_ID> | current] <INTENT>\n" + " am startservice [--user <USER_ID> | current] <INTENT>\n" + " am startservice [--user <USER_ID> | current] <INTENT>\n" + " am stopservice [--user <USER_ID> | current] <INTENT>\n" + " am stopservice [--user <USER_ID> | current] <INTENT>\n" + Loading Loading @@ -182,7 +182,6 @@ public class Am extends BaseCommand { " -R: repeat the activity launch <COUNT> times. Prior to each repeat,\n" + " -R: repeat the activity launch <COUNT> times. Prior to each repeat,\n" + " the top activity will be finished.\n" + " the top activity will be finished.\n" + " -S: force stop the target app before starting the activity\n" + " -S: force stop the target app before starting the activity\n" + " --opengl-trace: enable tracing of OpenGL functions\n" + " --track-allocation: enable tracking of object allocations\n" + " --track-allocation: enable tracking of object allocations\n" + " --user <USER_ID> | current: Specify which user to run as; if not\n" + " --user <USER_ID> | current: Specify which user to run as; if not\n" + " specified then run as the current user.\n" + " specified then run as the current user.\n" + Loading Loading @@ -739,8 +738,6 @@ public class Am extends BaseCommand { mRepeat = Integer.parseInt(nextArgRequired()); mRepeat = Integer.parseInt(nextArgRequired()); } else if (opt.equals("-S")) { } else if (opt.equals("-S")) { mStopOption = true; mStopOption = true; } else if (opt.equals("--opengl-trace")) { mStartFlags |= ActivityManager.START_FLAG_OPENGL_TRACES; } else if (opt.equals("--track-allocation")) { } else if (opt.equals("--track-allocation")) { mStartFlags |= ActivityManager.START_FLAG_TRACK_ALLOCATION; mStartFlags |= ActivityManager.START_FLAG_TRACK_ALLOCATION; } else if (opt.equals("--user")) { } else if (opt.equals("--user")) { Loading
core/java/android/app/ActivityManager.java +1 −8 Original line number Original line Diff line number Diff line Loading @@ -202,19 +202,12 @@ public class ActivityManager { */ */ public static final int START_FLAG_DEBUG = 1<<1; public static final int START_FLAG_DEBUG = 1<<1; /** * Flag for IActivityManaqer.startActivity: launch the app for * OpenGL tracing. * @hide */ public static final int START_FLAG_OPENGL_TRACES = 1<<2; /** /** * Flag for IActivityManaqer.startActivity: launch the app for * Flag for IActivityManaqer.startActivity: launch the app for * allocation tracking. * allocation tracking. * @hide * @hide */ */ public static final int START_FLAG_TRACK_ALLOCATION = 1<<3; public static final int START_FLAG_TRACK_ALLOCATION = 1<<2; /** /** * Result for IActivityManaqer.broadcastIntent: success! * Result for IActivityManaqer.broadcastIntent: success! Loading
core/java/android/app/ActivityThread.java +3 −11 Original line number Original line Diff line number Diff line Loading @@ -469,7 +469,6 @@ public final class ActivityThread { IUiAutomationConnection instrumentationUiAutomationConnection; IUiAutomationConnection instrumentationUiAutomationConnection; int debugMode; int debugMode; boolean enableBinderTracking; boolean enableBinderTracking; boolean enableOpenGlTrace; boolean trackAllocation; boolean trackAllocation; boolean restrictedBackupMode; boolean restrictedBackupMode; boolean persistent; boolean persistent; Loading Loading @@ -805,10 +804,9 @@ public final class ActivityThread { ProfilerInfo profilerInfo, Bundle instrumentationArgs, ProfilerInfo profilerInfo, Bundle instrumentationArgs, IInstrumentationWatcher instrumentationWatcher, IInstrumentationWatcher instrumentationWatcher, IUiAutomationConnection instrumentationUiConnection, int debugMode, IUiAutomationConnection instrumentationUiConnection, int debugMode, boolean enableBinderTracking, boolean enableOpenGlTrace, boolean enableBinderTracking, boolean trackAllocation, boolean trackAllocation, boolean isRestrictedBackupMode, boolean isRestrictedBackupMode, boolean persistent, Configuration config, boolean persistent, Configuration config, CompatibilityInfo compatInfo, CompatibilityInfo compatInfo, Map<String, IBinder> services, Bundle coreSettings) { Map<String, IBinder> services, Bundle coreSettings) { if (services != null) { if (services != null) { // Setup the service cache in the ServiceManager // Setup the service cache in the ServiceManager Loading Loading @@ -864,7 +862,6 @@ public final class ActivityThread { data.instrumentationUiAutomationConnection = instrumentationUiConnection; data.instrumentationUiAutomationConnection = instrumentationUiConnection; data.debugMode = debugMode; data.debugMode = debugMode; data.enableBinderTracking = enableBinderTracking; data.enableBinderTracking = enableBinderTracking; data.enableOpenGlTrace = enableOpenGlTrace; data.trackAllocation = trackAllocation; data.trackAllocation = trackAllocation; data.restrictedBackupMode = isRestrictedBackupMode; data.restrictedBackupMode = isRestrictedBackupMode; data.persistent = persistent; data.persistent = persistent; Loading Loading @@ -4776,11 +4773,6 @@ public final class ActivityThread { } } } } // Enable OpenGL tracing if required if (data.enableOpenGlTrace) { GLUtils.setTracingLevel(1); } // Allow application-generated systrace messages if we're debuggable. // Allow application-generated systrace messages if we're debuggable. boolean isAppDebuggable = (data.appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0; boolean isAppDebuggable = (data.appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0; Trace.setAppTracingAllowed(isAppDebuggable); Trace.setAppTracingAllowed(isAppDebuggable); Loading
core/java/android/app/ApplicationThreadNative.java +5 −8 Original line number Original line Diff line number Diff line Loading @@ -294,7 +294,6 @@ public abstract class ApplicationThreadNative extends Binder IUiAutomationConnection.Stub.asInterface(binder); IUiAutomationConnection.Stub.asInterface(binder); int testMode = data.readInt(); int testMode = data.readInt(); boolean enableBinderTracking = data.readInt() != 0; boolean enableBinderTracking = data.readInt() != 0; boolean openGlTrace = data.readInt() != 0; boolean trackAllocation = data.readInt() != 0; boolean trackAllocation = data.readInt() != 0; boolean restrictedBackupMode = (data.readInt() != 0); boolean restrictedBackupMode = (data.readInt() != 0); boolean persistent = (data.readInt() != 0); boolean persistent = (data.readInt() != 0); Loading @@ -304,8 +303,8 @@ public abstract class ApplicationThreadNative extends Binder Bundle coreSettings = data.readBundle(); Bundle coreSettings = data.readBundle(); bindApplication(packageName, info, providers, testName, profilerInfo, testArgs, bindApplication(packageName, info, providers, testName, profilerInfo, testArgs, testWatcher, uiAutomationConnection, testMode, enableBinderTracking, testWatcher, uiAutomationConnection, testMode, enableBinderTracking, openGlTrace, trackAllocation, restrictedBackupMode, persistent, config, trackAllocation, restrictedBackupMode, persistent, config, compatInfo, services, compatInfo, services, coreSettings); coreSettings); return true; return true; } } Loading Loading @@ -1020,10 +1019,9 @@ class ApplicationThreadProxy implements IApplicationThread { List<ProviderInfo> providers, ComponentName testName, ProfilerInfo profilerInfo, List<ProviderInfo> providers, ComponentName testName, ProfilerInfo profilerInfo, Bundle testArgs, IInstrumentationWatcher testWatcher, Bundle testArgs, IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection, int debugMode, IUiAutomationConnection uiAutomationConnection, int debugMode, boolean enableBinderTracking, boolean openGlTrace, boolean trackAllocation, boolean enableBinderTracking, boolean trackAllocation, boolean restrictedBackupMode, boolean restrictedBackupMode, boolean persistent, Configuration config, boolean persistent, Configuration config, CompatibilityInfo compatInfo, CompatibilityInfo compatInfo, Map<String, IBinder> services, Map<String, IBinder> services, Bundle coreSettings) throws RemoteException { Bundle coreSettings) throws RemoteException { Parcel data = Parcel.obtain(); Parcel data = Parcel.obtain(); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeInterfaceToken(IApplicationThread.descriptor); data.writeString(packageName); data.writeString(packageName); Loading @@ -1046,7 +1044,6 @@ class ApplicationThreadProxy implements IApplicationThread { data.writeStrongInterface(uiAutomationConnection); data.writeStrongInterface(uiAutomationConnection); data.writeInt(debugMode); data.writeInt(debugMode); data.writeInt(enableBinderTracking ? 1 : 0); data.writeInt(enableBinderTracking ? 1 : 0); data.writeInt(openGlTrace ? 1 : 0); data.writeInt(trackAllocation ? 1 : 0); data.writeInt(trackAllocation ? 1 : 0); data.writeInt(restrictedBackupMode ? 1 : 0); data.writeInt(restrictedBackupMode ? 1 : 0); data.writeInt(persistent ? 1 : 0); data.writeInt(persistent ? 1 : 0); Loading
core/java/android/app/IApplicationThread.java +4 −4 Original line number Original line Diff line number Diff line Loading @@ -96,10 +96,10 @@ public interface IApplicationThread extends IInterface { void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers, void bindApplication(String packageName, ApplicationInfo info, List<ProviderInfo> providers, ComponentName testName, ProfilerInfo profilerInfo, Bundle testArguments, ComponentName testName, ProfilerInfo profilerInfo, Bundle testArguments, IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection, IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection, int debugMode, boolean enableBinderTracking, boolean openGlTrace, int debugMode, boolean enableBinderTracking, boolean trackAllocation, boolean trackAllocation, boolean restrictedBackupMode, boolean persistent, boolean restrictedBackupMode, boolean persistent, Configuration config, Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services, CompatibilityInfo compatInfo, Map<String, IBinder> services, Bundle coreSettings) Bundle coreSettings) throws RemoteException; throws RemoteException; void scheduleExit() throws RemoteException; void scheduleExit() throws RemoteException; void scheduleSuicide() throws RemoteException; void scheduleSuicide() throws RemoteException; void scheduleConfigurationChanged(Configuration config) throws RemoteException; void scheduleConfigurationChanged(Configuration config) throws RemoteException; Loading