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

Commit 45bca29b authored by Joe Antonetti's avatar Joe Antonetti Committed by Android (Google) Code Review
Browse files

Merge changes I7e42ab88,I6f7bc4fc into main

* changes:
  [Handoff][5/N] Clear Calling Identity when Requesting Handoff
  [Handoff][4/N] Fix Broken Parcelling of RemoteTask
parents 6f6e7d24 0cf7921d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -180,9 +180,9 @@ public final class RemoteTask implements Parcelable {
    public void writeToParcel(@NonNull Parcel dest, int flags) {
        dest.writeInt(mId);
        dest.writeInt(mDeviceId);
        dest.writeString8(mLabel);
        dest.writeString(mLabel);
        dest.writeBoolean(mIsHandoffEnabled);
        dest.writeString8(mSourceDeviceName);
        dest.writeString(mSourceDeviceName);
        dest.writeInt(mLastUsedTimestampMillis);
        if (mIcon != null) {
            dest.writeInt(1);
+10 −4
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.companion.datatransfer.continuity.ITaskContinuityManager;
import android.companion.datatransfer.continuity.IRemoteTaskListener;
import android.companion.datatransfer.continuity.RemoteTask;
import android.content.Context;
import android.os.Binder;
import android.util.Slog;

import com.android.server.companion.datatransfer.continuity.handoff.InboundHandoffRequestController;
@@ -105,10 +106,15 @@ public final class TaskContinuityManagerService extends SystemService {
            int associationId,
            int remoteTaskId,
            @NonNull IHandoffRequestCallback callback) {
            final long ident = Binder.clearCallingIdentity();
            try {
                mOutboundHandoffRequestController.requestHandoff(
                    associationId,
                    remoteTaskId,
                    callback);
            } finally {
                Binder.restoreCallingIdentity(ident);
            }
        }
    }