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

Commit 8f91d2b5 authored by Chris Tate's avatar Chris Tate Committed by The Android Open Source Project
Browse files

Automated import from //branches/master/...@141392,141392

parent 22f71142
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ public final class ActivityThread {
    private static final boolean DEBUG = false;
    private static final boolean localLOGV = DEBUG ? Config.LOGD : Config.LOGV;
    private static final boolean DEBUG_BROADCAST = false;
    private static final boolean DEBUG_RESULTS = false;
    private static final long MIN_TIME_BETWEEN_GCS = 5*1000;
    private static final Pattern PATTERN_SEMICOLON = Pattern.compile(";");
    private static final int SQLITE_MEM_RELEASED_EVENT_LOG_TAG = 75003;
@@ -2118,6 +2119,8 @@ public final class ActivityThread {
    public final void sendActivityResult(
            IBinder token, String id, int requestCode,
            int resultCode, Intent data) {
        if (DEBUG_RESULTS) Log.v(TAG, "sendActivityResult: id=" + id
                + " req=" + requestCode + " res=" + resultCode + " data=" + data);
        ArrayList<ResultInfo> list = new ArrayList<ResultInfo>();
        list.add(new ResultInfo(id, requestCode, resultCode, data));
        mAppThread.scheduleSendResult(token, list);
@@ -2993,6 +2996,8 @@ public final class ActivityThread {
                if (ri.mData != null) {
                    ri.mData.setExtrasClassLoader(r.activity.getClassLoader());
                }
                if (DEBUG_RESULTS) Log.v(TAG,
                        "Delivering result to activity " + r + " : " + ri);
                r.activity.dispatchActivityResult(ri.mResultWho,
                        ri.mRequestCode, ri.mResultCode, ri.mData);
            } catch (Exception e) {
@@ -3008,7 +3013,7 @@ public final class ActivityThread {

    private final void handleSendResult(ResultData res) {
        ActivityRecord r = mActivities.get(res.token);
        if (localLOGV) Log.v(TAG, "Handling send result to " + r);
        if (DEBUG_RESULTS) Log.v(TAG, "Handling send result to " + r);
        if (r != null) {
            final boolean resumed = !r.paused;
            if (!r.activity.mFinished && r.activity.mDecor != null
+5 −2
Original line number Diff line number Diff line
@@ -3427,7 +3427,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
     */
    private final boolean requestFinishActivityLocked(IBinder token, int resultCode,
            Intent resultData, String reason) {
        if (localLOGV) Log.v(
        if (DEBUG_RESULTS) Log.v(
            TAG, "Finishing activity: token=" + token
            + ", result=" + resultCode + ", data=" + resultData);

@@ -3490,7 +3490,9 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
        // send the result
        HistoryRecord resultTo = r.resultTo;
        if (resultTo != null) {
            if (DEBUG_RESULTS) Log.v(TAG, "Adding result to " + resultTo);
            if (DEBUG_RESULTS) Log.v(TAG, "Adding result to " + resultTo
                    + " who=" + r.resultWho + " req=" + r.requestCode
                    + " res=" + resultCode + " data=" + resultData);
            if (r.info.applicationInfo.uid > 0) {
                grantUriPermissionFromIntentLocked(r.info.applicationInfo.uid,
                        r.packageName, resultData, r);
@@ -3499,6 +3501,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
                                     resultData);
            r.resultTo = null;
        }
        else if (DEBUG_RESULTS) Log.v(TAG, "No result destination from " + r);

        // Make sure this HistoryRecord is not holding on to other resources,
        // because clients have remote IPC references to this object so we