Loading packages/Vcn/service-b/src/com/android/server/vcn/Vcn.java +2 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,8 @@ public class Vcn extends Handler { this(vcnContext, subscriptionGroup, config, snapshot, vcnCallback, new Dependencies()); } // WARNING: This constructor executes on the binder thread. Thread safety MUST be ensured when // accessing data within this constructor and any methods called from here. @VisibleForTesting(visibility = Visibility.PRIVATE) public Vcn( @NonNull VcnContext vcnContext, Loading packages/Vcn/service-b/src/com/android/server/vcn/VcnNetworkProvider.java +5 −3 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ import android.net.vcn.VcnGatewayConnectionConfig; import android.os.Build; import android.os.Handler; import android.os.Looper; import android.util.ArraySet; import android.util.IndentingPrintWriter; import android.util.Slog; Loading @@ -46,6 +45,7 @@ import com.android.modules.utils.HandlerExecutor; import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executor; /** Loading @@ -56,12 +56,14 @@ import java.util.concurrent.Executor; * * @hide */ // TODO(b/388919146): Implement a more generic solution to prevent concurrent modifications on // mListeners and mRequests // TODO(b/374174952): Replace VANILLA_ICE_CREAM with BAKLAVA after Android B finalization @TargetApi(Build.VERSION_CODES.VANILLA_ICE_CREAM) public class VcnNetworkProvider extends NetworkProvider { private static final String TAG = VcnNetworkProvider.class.getSimpleName(); private final Set<NetworkRequestListener> mListeners = new ArraySet<>(); private final Set<NetworkRequestListener> mListeners = ConcurrentHashMap.newKeySet(); private final Context mContext; private final Handler mHandler; Loading @@ -72,7 +74,7 @@ public class VcnNetworkProvider extends NetworkProvider { * * <p>NetworkRequests are immutable once created, and therefore can be used as stable keys. */ private final Set<NetworkRequest> mRequests = new ArraySet<>(); private final Set<NetworkRequest> mRequests = ConcurrentHashMap.newKeySet(); public VcnNetworkProvider(@NonNull Context context, @NonNull Looper looper) { this(context, looper, new Dependencies()); Loading Loading
packages/Vcn/service-b/src/com/android/server/vcn/Vcn.java +2 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,8 @@ public class Vcn extends Handler { this(vcnContext, subscriptionGroup, config, snapshot, vcnCallback, new Dependencies()); } // WARNING: This constructor executes on the binder thread. Thread safety MUST be ensured when // accessing data within this constructor and any methods called from here. @VisibleForTesting(visibility = Visibility.PRIVATE) public Vcn( @NonNull VcnContext vcnContext, Loading
packages/Vcn/service-b/src/com/android/server/vcn/VcnNetworkProvider.java +5 −3 Original line number Diff line number Diff line Loading @@ -36,7 +36,6 @@ import android.net.vcn.VcnGatewayConnectionConfig; import android.os.Build; import android.os.Handler; import android.os.Looper; import android.util.ArraySet; import android.util.IndentingPrintWriter; import android.util.Slog; Loading @@ -46,6 +45,7 @@ import com.android.modules.utils.HandlerExecutor; import java.util.Objects; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.Executor; /** Loading @@ -56,12 +56,14 @@ import java.util.concurrent.Executor; * * @hide */ // TODO(b/388919146): Implement a more generic solution to prevent concurrent modifications on // mListeners and mRequests // TODO(b/374174952): Replace VANILLA_ICE_CREAM with BAKLAVA after Android B finalization @TargetApi(Build.VERSION_CODES.VANILLA_ICE_CREAM) public class VcnNetworkProvider extends NetworkProvider { private static final String TAG = VcnNetworkProvider.class.getSimpleName(); private final Set<NetworkRequestListener> mListeners = new ArraySet<>(); private final Set<NetworkRequestListener> mListeners = ConcurrentHashMap.newKeySet(); private final Context mContext; private final Handler mHandler; Loading @@ -72,7 +74,7 @@ public class VcnNetworkProvider extends NetworkProvider { * * <p>NetworkRequests are immutable once created, and therefore can be used as stable keys. */ private final Set<NetworkRequest> mRequests = new ArraySet<>(); private final Set<NetworkRequest> mRequests = ConcurrentHashMap.newKeySet(); public VcnNetworkProvider(@NonNull Context context, @NonNull Looper looper) { this(context, looper, new Dependencies()); Loading