Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80bea9cd authored by Man Cao's avatar Man Cao
Browse files

resolved conflicts for merge of 8fb82074 to master

Change-Id: I27c7ddeead5a589ae8824f87bf6b42998dc081eb
parents 952abf42 8fb82074
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -103,7 +103,7 @@ public class Am extends BaseCommand {
                "usage: am [subcommand] [options]\n" +
                "usage: am start [-D] [-W] [-P <FILE>] [--start-profiler <FILE>]\n" +
                "               [--sampling INTERVAL] [-R COUNT] [-S] [--opengl-trace]\n" +
                "               [--user <USER_ID> | current] <INTENT>\n" +
                "               [--track-allocation] [--user <USER_ID> | current] <INTENT>\n" +
                "       am startservice [--user <USER_ID> | current] <INTENT>\n" +
                "       am stopservice [--user <USER_ID> | current] <INTENT>\n" +
                "       am force-stop [--user <USER_ID> | all | current] <PACKAGE>\n" +
@@ -159,6 +159,7 @@ public class Am extends BaseCommand {
                "        the top activity will be finished.\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" +
                "    --user <USER_ID> | current: Specify which user to run as; if not\n" +
                "        specified then run as the current user.\n" +
                "\n" +
@@ -694,6 +695,8 @@ public class Am extends BaseCommand {
                mStopOption = true;
            } else if (opt.equals("--opengl-trace")) {
                mStartFlags |= ActivityManager.START_FLAG_OPENGL_TRACES;
            } else if (opt.equals("--track-allocation")) {
                mStartFlags |= ActivityManager.START_FLAG_TRACK_ALLOCATION;
            } else if (opt.equals("--user")) {
                mUserId = parseUserArg(nextArgRequired());
            } else if (opt.equals("--receiver-permission")) {
+7 −0
Original line number Diff line number Diff line
@@ -209,6 +209,13 @@ public class ActivityManager {
     */
    public static final int START_FLAG_OPENGL_TRACES = 1<<2;

    /**
     * Flag for IActivityManaqer.startActivity: launch the app for
     * allocation tracking.
     * @hide
     */
    public static final int START_FLAG_TRACK_ALLOCATION = 1<<3;

    /**
     * Result for IActivityManaqer.broadcastIntent: success!
     * @hide
+10 −3
Original line number Diff line number Diff line
@@ -132,6 +132,7 @@ import libcore.net.event.NetworkEventDispatcher;
import dalvik.system.CloseGuard;
import dalvik.system.VMDebug;
import dalvik.system.VMRuntime;
import org.apache.harmony.dalvik.ddmc.DdmVmInternal;

final class RemoteServiceException extends AndroidRuntimeException {
    public RemoteServiceException(String msg) {
@@ -447,6 +448,7 @@ public final class ActivityThread {
        int debugMode;
        boolean enableBinderTracking;
        boolean enableOpenGlTrace;
        boolean trackAllocation;
        boolean restrictedBackupMode;
        boolean persistent;
        Configuration config;
@@ -772,9 +774,9 @@ public final class ActivityThread {
                IInstrumentationWatcher instrumentationWatcher,
                IUiAutomationConnection instrumentationUiConnection, int debugMode,
                boolean enableBinderTracking, boolean enableOpenGlTrace,
                boolean isRestrictedBackupMode, boolean persistent,
                Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
                Bundle coreSettings) {
                boolean trackAllocation, boolean isRestrictedBackupMode,
                boolean persistent, Configuration config, CompatibilityInfo compatInfo,
                Map<String, IBinder> services, Bundle coreSettings) {

            if (services != null) {
                // Setup the service cache in the ServiceManager
@@ -831,6 +833,7 @@ public final class ActivityThread {
            data.debugMode = debugMode;
            data.enableBinderTracking = enableBinderTracking;
            data.enableOpenGlTrace = enableOpenGlTrace;
            data.trackAllocation = trackAllocation;
            data.restrictedBackupMode = isRestrictedBackupMode;
            data.persistent = persistent;
            data.config = config;
@@ -4464,6 +4467,10 @@ public final class ActivityThread {
    }

    private void handleBindApplication(AppBindData data) {
        if (data.trackAllocation) {
            DdmVmInternal.enableRecentAllocations(true);
        }

        mBoundApplication = data;
        mConfiguration = new Configuration(data.config);
        mCompatConfiguration = new Configuration(data.config);
+12 −7
Original line number Diff line number Diff line
@@ -293,6 +293,7 @@ public abstract class ApplicationThreadNative extends Binder
            int testMode = data.readInt();
            boolean enableBinderTracking = data.readInt() != 0;
            boolean openGlTrace = data.readInt() != 0;
            boolean trackAllocation = data.readInt() != 0;
            boolean restrictedBackupMode = (data.readInt() != 0);
            boolean persistent = (data.readInt() != 0);
            Configuration config = Configuration.CREATOR.createFromParcel(data);
@@ -301,7 +302,8 @@ public abstract class ApplicationThreadNative extends Binder
            Bundle coreSettings = data.readBundle();
            bindApplication(packageName, info, providers, testName, profilerInfo, testArgs,
                    testWatcher, uiAutomationConnection, testMode, enableBinderTracking,
                    openGlTrace, restrictedBackupMode, persistent, config, compatInfo, services, coreSettings);
                    openGlTrace, trackAllocation, restrictedBackupMode, persistent, config,
                    compatInfo, services, coreSettings);
            return true;
        }

@@ -1010,12 +1012,14 @@ class ApplicationThreadProxy implements IApplicationThread {
        data.recycle();
    }

    @Override
    public final void bindApplication(String packageName, ApplicationInfo info,
            List<ProviderInfo> providers, ComponentName testName, ProfilerInfo profilerInfo,
            Bundle testArgs, IInstrumentationWatcher testWatcher,
            IUiAutomationConnection uiAutomationConnection, int debugMode,
                                      boolean enableBinderTracking, boolean openGlTrace, boolean restrictedBackupMode, boolean persistent,
                                      Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
            boolean enableBinderTracking, boolean openGlTrace, boolean trackAllocation,
            boolean restrictedBackupMode, boolean persistent, Configuration config,
            CompatibilityInfo compatInfo, Map<String, IBinder> services,
            Bundle coreSettings) throws RemoteException {
        Parcel data = Parcel.obtain();
        data.writeInterfaceToken(IApplicationThread.descriptor);
@@ -1040,6 +1044,7 @@ class ApplicationThreadProxy implements IApplicationThread {
        data.writeInt(debugMode);
        data.writeInt(enableBinderTracking ? 1 : 0);
        data.writeInt(openGlTrace ? 1 : 0);
        data.writeInt(trackAllocation ? 1 : 0);
        data.writeInt(restrictedBackupMode ? 1 : 0);
        data.writeInt(persistent ? 1 : 0);
        config.writeToParcel(data, 0);
+3 −3
Original line number Diff line number Diff line
@@ -96,9 +96,9 @@ public interface IApplicationThread extends IInterface {
            ComponentName testName, ProfilerInfo profilerInfo, Bundle testArguments,
            IInstrumentationWatcher testWatcher, IUiAutomationConnection uiAutomationConnection,
            int debugMode, boolean enableBinderTracking, boolean openGlTrace,
            boolean restrictedBackupMode, boolean persistent, Configuration config,
            CompatibilityInfo compatInfo, Map<String, IBinder> services, Bundle coreSettings)
            throws RemoteException;
            boolean trackAllocation, boolean restrictedBackupMode, boolean persistent,
            Configuration config, CompatibilityInfo compatInfo, Map<String, IBinder> services,
            Bundle coreSettings) throws RemoteException;
    void scheduleExit() throws RemoteException;
    void scheduleSuicide() throws RemoteException;
    void scheduleConfigurationChanged(Configuration config) throws RemoteException;
Loading