From fc649f74bf3e7857c01a8451d6693c4dfd4ed93f Mon Sep 17 00:00:00 2001 From: paulhu Date: Tue, 26 Oct 2021 09:00:50 +0000 Subject: [PATCH] Replace @hide APIs in IpSecService - Replace Slog with Log - Replace Binder.withCleanCallingIdentity with BinderUtils.withCleanCallingIdentity Bug: 204153604 Test: atest FrameworksNetTests CtsNetTestCases Change-Id: I63083b3a4e50afe5154b4e8585d0eee46da819c6 --- services/core/java/com/android/server/IpSecService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/services/core/java/com/android/server/IpSecService.java b/services/core/java/com/android/server/IpSecService.java index d6ee95131ea93..aeb814327e663 100644 --- a/services/core/java/com/android/server/IpSecService.java +++ b/services/core/java/com/android/server/IpSecService.java @@ -58,13 +58,13 @@ import android.system.OsConstants; import android.text.TextUtils; import android.util.Log; import android.util.Range; -import android.util.Slog; import android.util.SparseArray; import android.util.SparseBooleanArray; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.Preconditions; +import com.android.net.module.util.BinderUtils; import com.android.net.module.util.NetdUtils; import com.android.net.module.util.PermissionUtils; @@ -1056,9 +1056,9 @@ public class IpSecService extends IIpSecService.Stub { public void systemReady() { if (isNetdAlive()) { - Slog.d(TAG, "IpSecService is ready"); + Log.d(TAG, "IpSecService is ready"); } else { - Slog.wtf(TAG, "IpSecService not ready: failed to connect to NetD Native Service!"); + Log.wtf(TAG, "IpSecService not ready: failed to connect to NetD Native Service!"); } } @@ -1332,7 +1332,7 @@ public class IpSecService extends IIpSecService.Stub { final INetd netd = mSrvConfig.getNetdInstance(); netd.ipSecAddTunnelInterface(intfName, localAddr, remoteAddr, ikey, okey, resourceId); - Binder.withCleanCallingIdentity(() -> { + BinderUtils.withCleanCallingIdentity(() -> { NetdUtils.setInterfaceUp(netd, intfName); });