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

Commit db26ec74 authored by Haofan Wang's avatar Haofan Wang Committed by Android (Google) Code Review
Browse files

Merge "[PATCH] Fix TRM deadlock scenario in reclaim" into main

parents aa748f38 b32d880e
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -26,6 +26,11 @@ import java.util.Set;
 * @hide
 */
public class CasResource {
    /**
     * Handle of the current resource. Should not be changed and should be aligned with the driver
     * level implementation.
     */
    final int mHandle;

    private final int mSystemId;

@@ -39,11 +44,16 @@ public class CasResource {
    private Map<Integer, Integer> mOwnerClientIdsToSessionNum = new HashMap<>();

    CasResource(Builder builder) {
        this.mHandle = builder.mHandle;
        this.mSystemId = builder.mSystemId;
        this.mMaxSessionNum = builder.mMaxSessionNum;
        this.mAvailableSessionNum = builder.mMaxSessionNum;
    }

    public int getHandle() {
        return mHandle;
    }

    public int getSystemId() {
        return mSystemId;
    }
@@ -136,10 +146,12 @@ public class CasResource {
     */
    public static class Builder {

        private final int mHandle;
        private int mSystemId;
        protected int mMaxSessionNum;

        Builder(int systemId) {
        Builder(int handle, int systemId) {
            this.mHandle = handle;
            this.mSystemId = systemId;
        }

+2 −2
Original line number Diff line number Diff line
@@ -42,8 +42,8 @@ public final class CiCamResource extends CasResource {
     * Builder class for {@link CiCamResource}.
     */
    public static class Builder extends CasResource.Builder {
        Builder(int systemId) {
            super(systemId);
        Builder(int handle, int systemId) {
            super(handle, systemId);
        }

        /**
+525 −387

File changed.

Preview size limit exceeded, changes collapsed.

+331 −440

File changed.

Preview size limit exceeded, changes collapsed.