Loading core/java/android/net/vcn/VcnCellUnderlyingNetworkTemplate.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,9 +40,9 @@ import android.telephony.SubscriptionInfo; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.util.ArraySet; import android.util.IndentingPrintWriter; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.Preconditions; import com.android.server.vcn.util.PersistableBundleUtils; Loading core/java/android/net/vcn/VcnManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -28,13 +28,13 @@ import android.content.Context; import android.content.pm.PackageManager; import android.net.LinkProperties; import android.net.NetworkCapabilities; import android.os.Binder; import android.os.ParcelUuid; import android.os.RemoteException; import android.os.ServiceSpecificException; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.annotations.VisibleForTesting.Visibility; import com.android.net.module.util.BinderUtils; import java.io.IOException; import java.lang.annotation.Retention; Loading Loading @@ -711,7 +711,7 @@ public class VcnManager { @Override public void onPolicyChanged() { Binder.withCleanCallingIdentity( BinderUtils.withCleanCallingIdentity( () -> mExecutor.execute(() -> mListener.onPolicyChanged())); } } Loading @@ -734,7 +734,7 @@ public class VcnManager { @Override public void onVcnStatusChanged(@VcnStatusCode int statusCode) { Binder.withCleanCallingIdentity( BinderUtils.withCleanCallingIdentity( () -> mExecutor.execute(() -> mCallback.onStatusChanged(statusCode))); } Loading @@ -747,7 +747,7 @@ public class VcnManager { @Nullable String exceptionMessage) { final Throwable cause = createThrowableByClassName(exceptionClass, exceptionMessage); Binder.withCleanCallingIdentity( BinderUtils.withCleanCallingIdentity( () -> mExecutor.execute( () -> Loading core/java/android/net/vcn/VcnUnderlyingNetworkTemplate.java +1 −1 Original line number Diff line number Diff line Loading @@ -21,10 +21,10 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.os.PersistableBundle; import android.util.IndentingPrintWriter; import android.util.SparseArray; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.Preconditions; import java.lang.annotation.Retention; Loading core/java/android/net/vcn/VcnWifiUnderlyingNetworkTemplate.java +1 −1 Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ import android.net.NetworkCapabilities; import android.net.vcn.VcnUnderlyingNetworkTemplate.MatchCriteria; import android.os.PersistableBundle; import android.util.ArraySet; import android.util.IndentingPrintWriter; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.IndentingPrintWriter; import com.android.server.vcn.util.PersistableBundleUtils; import java.util.ArrayList; Loading services/core/java/com/android/server/VcnManagementService.java +12 −11 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.util.ArrayMap; import android.util.ArraySet; import android.util.IndentingPrintWriter; import android.util.LocalLog; import android.util.Log; import android.util.Slog; Loading @@ -82,7 +83,7 @@ import android.util.Slog; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.annotations.VisibleForTesting.Visibility; import com.android.internal.util.IndentingPrintWriter; import com.android.net.module.util.BinderUtils; import com.android.net.module.util.LocationPermissionChecker; import com.android.net.module.util.PermissionUtils; import com.android.server.vcn.TelephonySubscriptionTracker; Loading Loading @@ -448,7 +449,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { final UserHandle userHandle = UserHandle.getUserHandleForUid(uid); final UserManager userManager = mContext.getSystemService(UserManager.class); Binder.withCleanCallingIdentity( BinderUtils.withCleanCallingIdentity( () -> { if (!Objects.equals(userManager.getMainUser(), userHandle)) { throw new SecurityException( Loading @@ -468,7 +469,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { // TODO (b/172619301): Check based on events propagated from CarrierPrivilegesTracker final SubscriptionManager subMgr = mContext.getSystemService(SubscriptionManager.class); final List<SubscriptionInfo> subscriptionInfos = new ArrayList<>(); Binder.withCleanCallingIdentity( BinderUtils.withCleanCallingIdentity( () -> { List<SubscriptionInfo> subsInGroup = subMgr.getSubscriptionsInGroup(subscriptionGroup); Loading Loading @@ -700,7 +701,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { @GuardedBy("mLock") private void notifyAllPolicyListenersLocked() { for (final PolicyListenerBinderDeath policyListener : mRegisteredPolicyListeners.values()) { Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { try { policyListener.mListener.onPolicyChanged(); } catch (RemoteException e) { Loading @@ -715,7 +716,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { @NonNull ParcelUuid subGroup, @VcnStatusCode int statusCode) { for (final VcnStatusCallbackInfo cbInfo : mRegisteredStatusCallbacks.values()) { if (isCallbackPermissioned(cbInfo, subGroup)) { Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { try { cbInfo.mCallback.onVcnStatusChanged(statusCode); } catch (RemoteException e) { Loading Loading @@ -795,7 +796,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { enforceManageTestNetworksForTestMode(config); enforceCallingUserAndCarrierPrivilege(subscriptionGroup, opPkgName); Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { synchronized (mLock) { mConfigs.put(subscriptionGroup, config); startOrUpdateVcnLocked(subscriptionGroup, config); Loading Loading @@ -853,7 +854,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { .checkPackage(mDeps.getBinderCallingUid(), opPkgName); enforceCarrierPrivilegeOrProvisioningPackage(subscriptionGroup, opPkgName); Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { synchronized (mLock) { stopAndClearVcnConfigInternalLocked(subscriptionGroup); writeConfigsToDiskLocked(); Loading Loading @@ -991,7 +992,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { android.Manifest.permission.NETWORK_FACTORY, android.Manifest.permission.MANAGE_TEST_NETWORKS); Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { PolicyListenerBinderDeath listenerBinderDeath = new PolicyListenerBinderDeath(listener); synchronized (mLock) { Loading @@ -1018,7 +1019,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { android.Manifest.permission.NETWORK_FACTORY, android.Manifest.permission.MANAGE_TEST_NETWORKS); Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { synchronized (mLock) { PolicyListenerBinderDeath listenerBinderDeath = mRegisteredPolicyListeners.remove(listener.asBinder()); Loading Loading @@ -1082,7 +1083,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { + " MANAGE_TEST_NETWORKS"); } return Binder.withCleanCallingIdentity(() -> { return BinderUtils.withCleanCallingIdentity(() -> { // Defensive copy in case this call is in-process and the given NetworkCapabilities // mutates final NetworkCapabilities ncCopy = new NetworkCapabilities(networkCapabilities); Loading Loading @@ -1521,7 +1522,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { // Notify all registered StatusCallbacks for this subGroup for (VcnStatusCallbackInfo cbInfo : mRegisteredStatusCallbacks.values()) { if (isCallbackPermissioned(cbInfo, mSubGroup)) { Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { try { cbInfo.mCallback.onGatewayConnectionError( gatewayConnectionName, Loading Loading
core/java/android/net/vcn/VcnCellUnderlyingNetworkTemplate.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,9 +40,9 @@ import android.telephony.SubscriptionInfo; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.util.ArraySet; import android.util.IndentingPrintWriter; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.Preconditions; import com.android.server.vcn.util.PersistableBundleUtils; Loading
core/java/android/net/vcn/VcnManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -28,13 +28,13 @@ import android.content.Context; import android.content.pm.PackageManager; import android.net.LinkProperties; import android.net.NetworkCapabilities; import android.os.Binder; import android.os.ParcelUuid; import android.os.RemoteException; import android.os.ServiceSpecificException; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.annotations.VisibleForTesting.Visibility; import com.android.net.module.util.BinderUtils; import java.io.IOException; import java.lang.annotation.Retention; Loading Loading @@ -711,7 +711,7 @@ public class VcnManager { @Override public void onPolicyChanged() { Binder.withCleanCallingIdentity( BinderUtils.withCleanCallingIdentity( () -> mExecutor.execute(() -> mListener.onPolicyChanged())); } } Loading @@ -734,7 +734,7 @@ public class VcnManager { @Override public void onVcnStatusChanged(@VcnStatusCode int statusCode) { Binder.withCleanCallingIdentity( BinderUtils.withCleanCallingIdentity( () -> mExecutor.execute(() -> mCallback.onStatusChanged(statusCode))); } Loading @@ -747,7 +747,7 @@ public class VcnManager { @Nullable String exceptionMessage) { final Throwable cause = createThrowableByClassName(exceptionClass, exceptionMessage); Binder.withCleanCallingIdentity( BinderUtils.withCleanCallingIdentity( () -> mExecutor.execute( () -> Loading
core/java/android/net/vcn/VcnUnderlyingNetworkTemplate.java +1 −1 Original line number Diff line number Diff line Loading @@ -21,10 +21,10 @@ import android.annotation.IntDef; import android.annotation.NonNull; import android.annotation.Nullable; import android.os.PersistableBundle; import android.util.IndentingPrintWriter; import android.util.SparseArray; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.Preconditions; import java.lang.annotation.Retention; Loading
core/java/android/net/vcn/VcnWifiUnderlyingNetworkTemplate.java +1 −1 Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ import android.net.NetworkCapabilities; import android.net.vcn.VcnUnderlyingNetworkTemplate.MatchCriteria; import android.os.PersistableBundle; import android.util.ArraySet; import android.util.IndentingPrintWriter; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.IndentingPrintWriter; import com.android.server.vcn.util.PersistableBundleUtils; import java.util.ArrayList; Loading
services/core/java/com/android/server/VcnManagementService.java +12 −11 Original line number Diff line number Diff line Loading @@ -75,6 +75,7 @@ import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.util.ArrayMap; import android.util.ArraySet; import android.util.IndentingPrintWriter; import android.util.LocalLog; import android.util.Log; import android.util.Slog; Loading @@ -82,7 +83,7 @@ import android.util.Slog; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.annotations.VisibleForTesting.Visibility; import com.android.internal.util.IndentingPrintWriter; import com.android.net.module.util.BinderUtils; import com.android.net.module.util.LocationPermissionChecker; import com.android.net.module.util.PermissionUtils; import com.android.server.vcn.TelephonySubscriptionTracker; Loading Loading @@ -448,7 +449,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { final UserHandle userHandle = UserHandle.getUserHandleForUid(uid); final UserManager userManager = mContext.getSystemService(UserManager.class); Binder.withCleanCallingIdentity( BinderUtils.withCleanCallingIdentity( () -> { if (!Objects.equals(userManager.getMainUser(), userHandle)) { throw new SecurityException( Loading @@ -468,7 +469,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { // TODO (b/172619301): Check based on events propagated from CarrierPrivilegesTracker final SubscriptionManager subMgr = mContext.getSystemService(SubscriptionManager.class); final List<SubscriptionInfo> subscriptionInfos = new ArrayList<>(); Binder.withCleanCallingIdentity( BinderUtils.withCleanCallingIdentity( () -> { List<SubscriptionInfo> subsInGroup = subMgr.getSubscriptionsInGroup(subscriptionGroup); Loading Loading @@ -700,7 +701,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { @GuardedBy("mLock") private void notifyAllPolicyListenersLocked() { for (final PolicyListenerBinderDeath policyListener : mRegisteredPolicyListeners.values()) { Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { try { policyListener.mListener.onPolicyChanged(); } catch (RemoteException e) { Loading @@ -715,7 +716,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { @NonNull ParcelUuid subGroup, @VcnStatusCode int statusCode) { for (final VcnStatusCallbackInfo cbInfo : mRegisteredStatusCallbacks.values()) { if (isCallbackPermissioned(cbInfo, subGroup)) { Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { try { cbInfo.mCallback.onVcnStatusChanged(statusCode); } catch (RemoteException e) { Loading Loading @@ -795,7 +796,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { enforceManageTestNetworksForTestMode(config); enforceCallingUserAndCarrierPrivilege(subscriptionGroup, opPkgName); Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { synchronized (mLock) { mConfigs.put(subscriptionGroup, config); startOrUpdateVcnLocked(subscriptionGroup, config); Loading Loading @@ -853,7 +854,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { .checkPackage(mDeps.getBinderCallingUid(), opPkgName); enforceCarrierPrivilegeOrProvisioningPackage(subscriptionGroup, opPkgName); Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { synchronized (mLock) { stopAndClearVcnConfigInternalLocked(subscriptionGroup); writeConfigsToDiskLocked(); Loading Loading @@ -991,7 +992,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { android.Manifest.permission.NETWORK_FACTORY, android.Manifest.permission.MANAGE_TEST_NETWORKS); Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { PolicyListenerBinderDeath listenerBinderDeath = new PolicyListenerBinderDeath(listener); synchronized (mLock) { Loading @@ -1018,7 +1019,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { android.Manifest.permission.NETWORK_FACTORY, android.Manifest.permission.MANAGE_TEST_NETWORKS); Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { synchronized (mLock) { PolicyListenerBinderDeath listenerBinderDeath = mRegisteredPolicyListeners.remove(listener.asBinder()); Loading Loading @@ -1082,7 +1083,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { + " MANAGE_TEST_NETWORKS"); } return Binder.withCleanCallingIdentity(() -> { return BinderUtils.withCleanCallingIdentity(() -> { // Defensive copy in case this call is in-process and the given NetworkCapabilities // mutates final NetworkCapabilities ncCopy = new NetworkCapabilities(networkCapabilities); Loading Loading @@ -1521,7 +1522,7 @@ public class VcnManagementService extends IVcnManagementService.Stub { // Notify all registered StatusCallbacks for this subGroup for (VcnStatusCallbackInfo cbInfo : mRegisteredStatusCallbacks.values()) { if (isCallbackPermissioned(cbInfo, mSubGroup)) { Binder.withCleanCallingIdentity(() -> { BinderUtils.withCleanCallingIdentity(() -> { try { cbInfo.mCallback.onGatewayConnectionError( gatewayConnectionName, Loading