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

Commit 9e009e34 authored by James Lin's avatar James Lin Committed by Automerger Merge Worker
Browse files

Merge "Fix the resource in the PublishController have not been released." am:...

Merge "Fix the resource in the PublishController have not been released." am: b43f879c am: ef093533

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/net/ims/+/1703945

Change-Id: I6550842f9f8a1b144d4b33204e359d94f0c0df54
parents 32f25274 ef093533
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -406,7 +406,9 @@ public class UceController {
        mPublishController.onDestroy();
        mSubscribeController.onDestroy();
        mOptionsController.onDestroy();
        mLooper.quit();

        // Execute all the existing requests before quitting the looper.
        mLooper.quitSafely();
    }

    /**
+11 −0
Original line number Diff line number Diff line
@@ -20,9 +20,11 @@ import android.annotation.Nullable;
import android.telephony.ims.RcsUceAdapter;
import android.telephony.ims.aidl.IPublishResponseCallback;
import android.telephony.ims.stub.RcsCapabilityExchangeImplBase;
import android.util.Log;

import com.android.ims.rcs.uce.presence.publish.PublishController.PublishControllerCallback;
import com.android.ims.rcs.uce.util.NetworkSipCode;
import com.android.ims.rcs.uce.util.UceUtils;

import java.time.Instant;
import java.util.Optional;
@@ -32,6 +34,8 @@ import java.util.Optional;
 */
public class PublishRequestResponse {

    private static final String LOG_TAG = UceUtils.getLogPrefix() + "PublishRequestResp";

    private final long mTaskId;
    private final String mPidfXml;
    private volatile boolean mNeedRetry;
@@ -165,6 +169,8 @@ public class PublishRequestResponse {
        PublishControllerCallback ctrlCallback = mPublishCtrlCallback;
        if (ctrlCallback != null) {
            ctrlCallback.onRequestCommandError(this);
        } else {
            Log.d(LOG_TAG, "onCommandError: already destroyed. error code=" + errorCode);
        }
    }

@@ -177,6 +183,8 @@ public class PublishRequestResponse {
        PublishControllerCallback ctrlCallback = mPublishCtrlCallback;
        if (ctrlCallback != null) {
            ctrlCallback.onRequestNetworkResp(this);
        } else {
            Log.d(LOG_TAG, "onNetworkResponse: already destroyed. sip code=" + sipCode);
        }
    }

@@ -192,6 +200,9 @@ public class PublishRequestResponse {
        PublishControllerCallback ctrlCallback = mPublishCtrlCallback;
        if (ctrlCallback != null) {
            ctrlCallback.onRequestNetworkResp(this);
        } else {
            Log.d(LOG_TAG, "onNetworkResponse: already destroyed. sipCode=" + sipCode +
                    ", reasonHeader=" + reasonHeaderCause);
        }
    }