Merge "Add log for debugging flaky test" am: 5a9aacd125 am: 452bdba48d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2194344 Change-Id: Iab038547bf7204d1ac1f3b5f4636006883c91976 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -756,6 +756,8 @@ public class Vpn {
|
|||||||
int errorCode, @NonNull final String packageName, @Nullable final String sessionKey,
|
int errorCode, @NonNull final String packageName, @Nullable final String sessionKey,
|
||||||
@NonNull final VpnProfileState profileState, @Nullable final Network underlyingNetwork,
|
@NonNull final VpnProfileState profileState, @Nullable final Network underlyingNetwork,
|
||||||
@Nullable final NetworkCapabilities nc, @Nullable final LinkProperties lp) {
|
@Nullable final NetworkCapabilities nc, @Nullable final LinkProperties lp) {
|
||||||
|
// Add log for debugging flaky test. b/242833779
|
||||||
|
Log.d(TAG, "buildVpnManagerEventIntent: sessionKey = " + sessionKey);
|
||||||
final Intent intent = new Intent(VpnManager.ACTION_VPN_MANAGER_EVENT);
|
final Intent intent = new Intent(VpnManager.ACTION_VPN_MANAGER_EVENT);
|
||||||
intent.setPackage(packageName);
|
intent.setPackage(packageName);
|
||||||
intent.addCategory(category);
|
intent.addCategory(category);
|
||||||
@@ -2756,6 +2758,8 @@ public class Vpn {
|
|||||||
mIpSecManager = (IpSecManager) mContext.getSystemService(Context.IPSEC_SERVICE);
|
mIpSecManager = (IpSecManager) mContext.getSystemService(Context.IPSEC_SERVICE);
|
||||||
mNetworkCallback = new VpnIkev2Utils.Ikev2VpnNetworkCallback(TAG, this, mExecutor);
|
mNetworkCallback = new VpnIkev2Utils.Ikev2VpnNetworkCallback(TAG, this, mExecutor);
|
||||||
mSessionKey = UUID.randomUUID().toString();
|
mSessionKey = UUID.randomUUID().toString();
|
||||||
|
// Add log for debugging flaky test. b/242833779
|
||||||
|
Log.d(TAG, "Generate session key = " + mSessionKey);
|
||||||
|
|
||||||
// Set the policy so that cancelled tasks will be removed from the work queue
|
// Set the policy so that cancelled tasks will be removed from the work queue
|
||||||
mExecutor.setRemoveOnCancelPolicy(true);
|
mExecutor.setRemoveOnCancelPolicy(true);
|
||||||
@@ -3948,7 +3952,13 @@ public class Vpn {
|
|||||||
@GuardedBy("this")
|
@GuardedBy("this")
|
||||||
@Nullable
|
@Nullable
|
||||||
private String getSessionKeyLocked() {
|
private String getSessionKeyLocked() {
|
||||||
return isIkev2VpnRunner() ? ((IkeV2VpnRunner) mVpnRunner).mSessionKey : null;
|
// Add log for debugging flaky test. b/242833779
|
||||||
|
final boolean isIkev2VpnRunner = isIkev2VpnRunner();
|
||||||
|
final String sessionKey =
|
||||||
|
isIkev2VpnRunner ? ((IkeV2VpnRunner) mVpnRunner).mSessionKey : null;
|
||||||
|
Log.d(TAG, "getSessionKeyLocked: isIkev2VpnRunner = " + isIkev2VpnRunner
|
||||||
|
+ ", sessionKey = " + sessionKey);
|
||||||
|
return sessionKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user