diff options
author | Jeff Sharkey <jsharkey@android.com> | 2012-05-02 16:00:52 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2012-05-02 16:01:14 -0700 |
commit | 2d6c580262ba1c19fc4f20c3566889e332fbdcb6 (patch) | |
tree | 220fcec398598b718aeaa1f1c7ee895f2992da7d /core/tests | |
parent | f2dc6fc442385e08745762fcc2468ad89e2c78dc (diff) | |
download | frameworks_base-2d6c580262ba1c19fc4f20c3566889e332fbdcb6.zip frameworks_base-2d6c580262ba1c19fc4f20c3566889e332fbdcb6.tar.gz frameworks_base-2d6c580262ba1c19fc4f20c3566889e332fbdcb6.tar.bz2 |
Support full 32 bits for socket tags.
Bug: 5321184
Change-Id: Iadb3a4ad541ef012cea35b70ad440eca4c879f42
Diffstat (limited to 'core/tests')
-rw-r--r-- | core/tests/coretests/src/com/android/internal/net/NetworkStatsFactoryTest.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/tests/coretests/src/com/android/internal/net/NetworkStatsFactoryTest.java b/core/tests/coretests/src/com/android/internal/net/NetworkStatsFactoryTest.java index 58269a8..b994483 100644 --- a/core/tests/coretests/src/com/android/internal/net/NetworkStatsFactoryTest.java +++ b/core/tests/coretests/src/com/android/internal/net/NetworkStatsFactoryTest.java @@ -25,6 +25,7 @@ import static com.android.server.NetworkManagementSocketTagger.kernelToTag; import android.content.res.Resources; import android.net.NetworkStats; +import android.net.TrafficStats; import android.test.AndroidTestCase; import com.android.frameworks.coretests.R; @@ -138,6 +139,12 @@ public class NetworkStatsFactoryTest extends AndroidTestCase { assertEquals(2147483647, kernelToTag("0x7fffffff00000000")); assertEquals(0, kernelToTag("0x0000000000000000")); assertEquals(2147483136, kernelToTag("0x7FFFFE0000000000")); + + assertEquals(0, kernelToTag("0x0")); + assertEquals(0, kernelToTag("0xf00d")); + assertEquals(1, kernelToTag("0x100000000")); + assertEquals(14438007, kernelToTag("0xdc4e7700000000")); + assertEquals(TrafficStats.TAG_SYSTEM_DOWNLOAD, kernelToTag("0xffffff0100000000")); } public void testNetworkStatsWithSet() throws Exception { |