1 package org.robolectric.shadows; 2 3 import android.net.TrafficStats; 4 import org.robolectric.annotation.Implementation; 5 import org.robolectric.annotation.Implements; 6 7 @Implements(TrafficStats.class) 8 public class ShadowTrafficStats { 9 10 @Implementation 11 public static void setThreadStatsTag(int tag) { 12 } 13 14 @Implementation 15 public static int getThreadStatsTag() { 16 return TrafficStats.UNSUPPORTED; 17 } 18 19 @Implementation 20 public static void clearThreadStatsTag() { 21 } 22 23 @Implementation 24 public static void tagSocket(java.net.Socket socket) throws java.net.SocketException { 25 } 26 27 @Implementation 28 public static void untagSocket(java.net.Socket socket) throws java.net.SocketException { 29 } 30 31 @Implementation 32 public static void incrementOperationCount(int operationCount) { 33 } 34 35 @Implementation 36 public static void incrementOperationCount(int tag, int operationCount) { 37 } 38 39 @Implementation 40 public static long getMobileTxPackets() { 41 return TrafficStats.UNSUPPORTED; 42 } 43 44 @Implementation 45 public static long getMobileRxPackets() { 46 return TrafficStats.UNSUPPORTED; 47 } 48 49 @Implementation 50 public static long getMobileTxBytes() { 51 return TrafficStats.UNSUPPORTED; 52 } 53 54 @Implementation 55 public static long getMobileRxBytes() { 56 return TrafficStats.UNSUPPORTED; 57 } 58 59 @Implementation 60 public static long getTotalTxPackets() { 61 return TrafficStats.UNSUPPORTED; 62 } 63 64 @Implementation 65 public static long getTotalRxPackets() { 66 return TrafficStats.UNSUPPORTED; 67 } 68 69 @Implementation 70 public static long getTotalTxBytes() { 71 return TrafficStats.UNSUPPORTED; 72 } 73 74 @Implementation 75 public static long getTotalRxBytes() { 76 return TrafficStats.UNSUPPORTED; 77 } 78 79 @Implementation 80 public static long getUidTxBytes(int i) { 81 return TrafficStats.UNSUPPORTED; 82 } 83 84 @Implementation 85 public static long getUidRxBytes(int i) { 86 return TrafficStats.UNSUPPORTED; 87 } 88 89 @Implementation 90 public static long getUidTxPackets(int i) { 91 return TrafficStats.UNSUPPORTED; 92 } 93 94 @Implementation 95 public static long getUidRxPackets(int i) { 96 return TrafficStats.UNSUPPORTED; 97 } 98 99 @Implementation 100 public static long getUidTcpTxBytes(int i) { 101 return TrafficStats.UNSUPPORTED; 102 } 103 104 @Implementation 105 public static long getUidTcpRxBytes(int i) { 106 return TrafficStats.UNSUPPORTED; 107 } 108 109 @Implementation 110 public static long getUidUdpTxBytes(int i) { 111 return TrafficStats.UNSUPPORTED; 112 } 113 114 @Implementation 115 public static long getUidUdpRxBytes(int i) { 116 return TrafficStats.UNSUPPORTED; 117 } 118 119 @Implementation 120 public static long getUidTcpTxSegments(int i) { 121 return TrafficStats.UNSUPPORTED; 122 } 123 124 @Implementation 125 public static long getUidTcpRxSegments(int i) { 126 return TrafficStats.UNSUPPORTED; 127 } 128 129 @Implementation 130 public static long getUidUdpTxPackets(int i) { 131 return TrafficStats.UNSUPPORTED; 132 } 133 134 @Implementation 135 public static long getUidUdpRxPackets(int i) { 136 return TrafficStats.UNSUPPORTED; 137 } 138 } 139 140