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

Commit b43f879c authored by James Lin's avatar James Lin Committed by Gerrit Code Review
Browse files

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

parents 8df39f23 cf505200
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);
        }
    }