diff options
| author | 2017-08-16 16:20:18 +0000 | |
|---|---|---|
| committer | 2017-08-16 16:20:18 +0000 | |
| commit | fedd8565464826be4396e493a2a84b86fe7ff169 (patch) | |
| tree | 6d9644459901b082a60ced75ed3661f1ca6ae234 | |
| parent | 2ad60c88f12d8150758902f2ff4f10f64ab6c17b (diff) | |
| parent | 3e5ea23673ddc2f85c8253e1f67722e8c6557917 (diff) | |
Merge "Add user quota information into the IpSecService dump"
| -rw-r--r-- | services/core/java/com/android/server/IpSecService.java | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/IpSecService.java b/services/core/java/com/android/server/IpSecService.java index ab7daccb0691..305683139ffd 100644 --- a/services/core/java/com/android/server/IpSecService.java +++ b/services/core/java/com/android/server/IpSecService.java @@ -142,6 +142,17 @@ public class IpSecService extends IIpSecService.Stub { } mCurrent--; } + + @Override + public String toString() { + return new StringBuilder() + .append("{mCurrent=") + .append(mCurrent) + .append(", mMax=") + .append(mMax) + .append("}") + .toString(); + } } private static final class UserQuotaTracker { @@ -159,6 +170,19 @@ public class IpSecService extends IIpSecService.Stub { public final ResourceTracker socket = new ResourceTracker(MAX_NUM_ENCAP_SOCKETS); public final ResourceTracker transform = new ResourceTracker(MAX_NUM_TRANSFORMS); public final ResourceTracker spi = new ResourceTracker(MAX_NUM_SPIS); + + @Override + public String toString() { + return new StringBuilder() + .append("{socket=") + .append(socket) + .append(", transform=") + .append(transform) + .append(", spi=") + .append(spi) + .append("}") + .toString(); + } } private final SparseArray<UserRecord> mUserRecords = new SparseArray<>(); @@ -172,6 +196,11 @@ public class IpSecService extends IIpSecService.Stub { } return r; } + + @Override + public String toString() { + return mUserRecords.toString(); + } } private final UserQuotaTracker mUserQuotaTracker = new UserQuotaTracker(); @@ -909,6 +938,8 @@ public class IpSecService extends IIpSecService.Stub { pw.println("NetdNativeService Connection: " + (isNetdAlive() ? "alive" : "dead")); pw.println(); + pw.println("mUserQuotaTracker:"); + pw.println(mUserQuotaTracker); pw.println("mTransformRecords:"); pw.println(mTransformRecords); pw.println("mUdpSocketRecords:"); |