Home
last modified time | relevance | path

Searched refs:NetworkTemplate (Results 1 – 25 of 102) sorted by relevance

12345

/packages/modules/Connectivity/tests/common/java/android/net/netstats/
DNetworkTemplateTest.kt24 import android.net.NetworkTemplate in <lambda>()
25 import android.net.NetworkTemplate.MATCH_BLUETOOTH in <lambda>()
26 import android.net.NetworkTemplate.MATCH_CARRIER in <lambda>()
27 import android.net.NetworkTemplate.MATCH_ETHERNET in <lambda>()
28 import android.net.NetworkTemplate.MATCH_MOBILE in <lambda>()
29 import android.net.NetworkTemplate.MATCH_PROXY in <lambda>()
30 import android.net.NetworkTemplate.MATCH_WIFI in <lambda>()
31 import android.net.NetworkTemplate.NETWORK_TYPE_ALL in <lambda>()
32 import android.net.NetworkTemplate.OEM_MANAGED_ALL in <lambda>()
61 NetworkTemplate.Builder(it).build() in <lambda>()
[all …]
/packages/modules/Connectivity/framework-t/src/android/net/
DNetworkTemplate.java78 public final class NetworkTemplate implements Parcelable { class
79 private static final String TAG = NetworkTemplate.class.getSimpleName();
214 public static NetworkTemplate buildTemplateMobileAll(@NonNull String subscriberId) { in buildTemplateMobileAll()
215 return new NetworkTemplate.Builder(MATCH_MOBILE).setMeteredness(METERED_YES) in buildTemplateMobileAll()
228 public static NetworkTemplate buildTemplateMobileWildcard() { in buildTemplateMobileWildcard()
229 return new NetworkTemplate.Builder(MATCH_MOBILE).setMeteredness(METERED_YES).build(); in buildTemplateMobileWildcard()
242 public static NetworkTemplate buildTemplateWifiWildcard() { in buildTemplateWifiWildcard()
243 return new NetworkTemplate.Builder(MATCH_WIFI).build(); in buildTemplateWifiWildcard()
253 public static NetworkTemplate buildTemplateWifi() { in buildTemplateWifi()
267 public static NetworkTemplate buildTemplateEthernet() { in buildTemplateEthernet()
[all …]
DINetworkStatsSession.aidl21 import android.net.NetworkTemplate;
27 NetworkStats getDeviceSummaryForNetwork(in NetworkTemplate template, long start, long end); in getDeviceSummaryForNetwork()
31 NetworkStats getSummaryForNetwork(in NetworkTemplate template, long start, long end); in getSummaryForNetwork()
34 NetworkStatsHistory getHistoryForNetwork(in NetworkTemplate template, int fields); in getHistoryForNetwork()
39 …NetworkStatsHistory getHistoryIntervalForNetwork(in NetworkTemplate template, int fields, long sta… in getHistoryIntervalForNetwork()
53 …NetworkStats getSummaryForAllUid(in NetworkTemplate template, long start, long end, boolean includ… in getSummaryForAllUid()
56 NetworkStats getTaggedSummaryForAllUid(in NetworkTemplate template, long start, long end); in getTaggedSummaryForAllUid()
60 …NetworkStatsHistory getHistoryForUid(in NetworkTemplate template, int uid, int set, int tag, int f… in getHistoryForUid()
62 …NetworkStatsHistory getHistoryIntervalForUid(in NetworkTemplate template, int uid, int set, int ta… in getHistoryIntervalForUid()
DDataUsageRequest.java20 import android.net.NetworkTemplate;
48 public final NetworkTemplate template;
55 public DataUsageRequest(int requestId, NetworkTemplate template, long thresholdInBytes) { in DataUsageRequest()
78NetworkTemplate template = in.readParcelable(null, android.net.NetworkTemplate.class);
/packages/modules/Connectivity/tests/unit/java/android/net/
DNetworkTemplateTest.kt35 import android.net.NetworkTemplate.MATCH_CARRIER
36 import android.net.NetworkTemplate.MATCH_MOBILE
37 import android.net.NetworkTemplate.MATCH_TEST
38 import android.net.NetworkTemplate.MATCH_WIFI
39 import android.net.NetworkTemplate.NETWORK_TYPE_ALL
40 import android.net.NetworkTemplate.OEM_MANAGED_ALL
41 import android.net.NetworkTemplate.OEM_MANAGED_NO
42 import android.net.NetworkTemplate.OEM_MANAGED_YES
43 import android.net.NetworkTemplate.buildTemplateMobileAll
44 import android.net.NetworkTemplate.buildTemplateMobileWildcard
[all …]
DNetworkIdentityTest.kt140 NetworkTemplate.OEM_MANAGED_PRIVATE, in <lambda>()
183 listOf(Integer.MIN_VALUE, NetworkTemplate.NETWORK_TYPE_ALL, in <lambda>()
211 listOf(Integer.MIN_VALUE, NetworkTemplate.OEM_MANAGED_ALL, NetworkTemplate.OEM_MANAGED_YES, in <lambda>()
223 listOf(NetworkTemplate.OEM_MANAGED_NO, NetworkTemplate.OEM_MANAGED_PAID, in <lambda>()
224 NetworkTemplate.OEM_MANAGED_PRIVATE, NetworkTemplate.OEM_MANAGED_PAID or in <lambda>()
225 NetworkTemplate.OEM_MANAGED_PRIVATE) in <lambda>()
/packages/apps/Settings/src/com/android/settings/datausage/lib/
DDataUsageLib.kt21 import android.net.NetworkTemplate
36 fun getMobileTemplate(context: Context, subId: Int): NetworkTemplate { in getMobileTemplate()
57 ): NetworkTemplate { in getNormalizedMobileTemplate()
69 template: NetworkTemplate, in normalizeMobileTemplate()
71 ): NetworkTemplate { in normalizeMobileTemplate()
82 NetworkTemplate.Builder(template.matchRule) in normalizeMobileTemplate()
90 fun getMobileTemplateForSubId(telephonyManager: TelephonyManager, subId: Int): NetworkTemplate { in getMobileTemplateForSubId()
94 null -> NetworkTemplate.Builder(NetworkTemplate.MATCH_MOBILE) in getMobileTemplateForSubId()
95 else -> NetworkTemplate.Builder(NetworkTemplate.MATCH_CARRIER) in getMobileTemplateForSubId()
DNetworkTemplates.kt20 import android.net.NetworkTemplate
31 fun getDefaultTemplate(context: Context): NetworkTemplate in getDefaultTemplate()
37 fun NetworkTemplate.getTitleResId(): Int = in getDefaultTemplate() method
39 NetworkTemplate.MATCH_MOBILE, in getDefaultTemplate()
40 NetworkTemplate.MATCH_CARRIER -> R.string.cellular_data_usage in getDefaultTemplate()
42 NetworkTemplate.MATCH_WIFI -> R.string.wifi_data_usage in getDefaultTemplate()
43 NetworkTemplate.MATCH_ETHERNET -> R.string.ethernet_data_usage in getDefaultTemplate()
51 override fun getDefaultTemplate(context: Context): NetworkTemplate = in getDefaultTemplate()
/packages/services/Car/tests/NetworkPreferenceApp/src/com/google/android/car/networking/preferenceupdater/components/
DMetricDisplay.java30 import android.net.NetworkTemplate;
55 NetworkTemplate.MATCH_WIFI,
56 NetworkTemplate.MATCH_MOBILE,
57 NetworkTemplate.MATCH_ETHERNET,
58 NetworkTemplate.MATCH_BLUETOOTH,
150 NetworkTemplate template = new NetworkTemplate.Builder(matchRule) in trafficFor()
190 sendMessage(NetworkTemplate.OEM_MANAGED_PAID, in updateStats()
191 combinedTrafficFor(NetworkTemplate.OEM_MANAGED_PAID)); in updateStats()
192 sendMessage(NetworkTemplate.OEM_MANAGED_PRIVATE, in updateStats()
193 combinedTrafficFor(NetworkTemplate.OEM_MANAGED_PRIVATE)); in updateStats()
[all …]
/packages/modules/Connectivity/tests/unit/java/android/app/usage/
DNetworkStatsManagerTest.java29 import static android.net.NetworkTemplate.MATCH_MOBILE;
30 import static android.net.NetworkTemplate.MATCH_WIFI;
50 import android.net.NetworkTemplate;
121 when(mStatsSession.getHistoryIntervalForUid(any(NetworkTemplate.class), in testQueryDetails()
125 NetworkTemplate template = inv.getArgument(0); in testQueryDetails()
131 when(mStatsSession.getHistoryIntervalForUid(any(NetworkTemplate.class), in testQueryDetails()
135 NetworkTemplate template = inv.getArgument(0); in testQueryDetails()
180 NetworkTemplate expectedTemplate) throws RemoteException { in runQueryDetailsAndCheckTemplate()
189 when(mStatsSession.getHistoryIntervalForUid(any(NetworkTemplate.class), in runQueryDetailsAndCheckTemplate()
213 new NetworkTemplate.Builder(MATCH_MOBILE).setMeteredness(METERED_YES).build()); in testNetworkTemplateWhenRunningQueryDetails_NoSubscriberId()
[all …]
/packages/modules/Connectivity/framework-t/src/android/app/usage/
DNetworkStatsManager.java23 import static android.net.NetworkTemplate.MATCH_MOBILE;
24 import static android.net.NetworkTemplate.MATCH_WIFI;
43 import android.net.NetworkTemplate;
248 public Bucket querySummaryForDevice(@NonNull NetworkTemplate template, in querySummaryForDevice()
299 NetworkTemplate template; in querySummaryForDevice()
344 NetworkTemplate template; in querySummaryForUser()
393 NetworkTemplate template; in querySummary()
424 public NetworkStats querySummary(@NonNull NetworkTemplate template, long startTime, in querySummary()
458 public NetworkStats queryTaggedSummary(@NonNull NetworkTemplate template, long startTime, in queryTaggedSummary()
494 public NetworkStats queryDetailsForDevice(@NonNull NetworkTemplate template, in queryDetailsForDevice()
[all …]
/packages/apps/Settings/tests/robotests/src/com/android/settings/datausage/
DDataUsagePreferenceTest.java28 import android.net.NetworkTemplate;
60 doReturn(0L).when(mController).getHistoricalUsageLevel(any(NetworkTemplate.class)); in setTemplate_noDataUsage_shouldDisablePreference()
62 mPreference.setTemplate(new NetworkTemplate.Builder(NetworkTemplate.MATCH_MOBILE) in setTemplate_noDataUsage_shouldDisablePreference()
72 doReturn(200L).when(mController).getHistoricalUsageLevel(any(NetworkTemplate.class)); in setTemplate_hasDataUsage_shouldNotDisablePreference()
74 mPreference.setTemplate(new NetworkTemplate.Builder(NetworkTemplate.MATCH_MOBILE) in setTemplate_hasDataUsage_shouldNotDisablePreference()
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/network/policy/
DNetworkPolicyRepositoryTest.kt22 import android.net.NetworkTemplate
62 val Template1: NetworkTemplate =
63 NetworkTemplate.Builder(NetworkTemplate.MATCH_MOBILE).build()
64 val Template2: NetworkTemplate = NetworkTemplate.Builder(NetworkTemplate.MATCH_WIFI).build()
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/datausage/
DDataUsageListTest.kt21 import android.net.NetworkTemplate
85 DataUsageList.EXTRA_NETWORK_TEMPLATE to mock<NetworkTemplate>(), in launchFragment_isGuestUser_finish()
102 DataUsageList.EXTRA_NETWORK_TEMPLATE to mock<NetworkTemplate>(), in launchFragment_withArguments_getTemplateFromArgument()
121 putExtra(Settings.EXTRA_NETWORK_TEMPLATE, mock<NetworkTemplate>()) in launchFragment_withIntent_getTemplateFromIntent()
136 val template = NetworkTemplate.Builder(NetworkTemplate.MATCH_WIFI).build() in warning_wifiAndHasSim_displayNonCarrierWarning()
154 val template = NetworkTemplate.Builder(NetworkTemplate.MATCH_WIFI).build() in warning_wifiAndNoSim_noWarning()
171 val template = NetworkTemplate.Builder(NetworkTemplate.MATCH_MOBILE).build() in warning_mobile_operatorWarning()
/packages/apps/Car/Settings/src/com/android/car/settings/datausage/
DDataUsageUtils.java21 import android.net.NetworkTemplate;
53 public static NetworkTemplate getMobileNetworkTemplate(TelephonyManager telephonyManager, in getMobileNetworkTemplate()
56 NetworkTemplate.Builder builder = in getMobileNetworkTemplate()
57 new NetworkTemplate.Builder(NetworkTemplate.MATCH_MOBILE) in getMobileNetworkTemplate()
65 private static NetworkTemplate normalizeMobileTemplate( in normalizeMobileTemplate()
66 @NonNull NetworkTemplate template, @Nullable String[] mergedSet) { in normalizeMobileTemplate()
74 return new NetworkTemplate.Builder(template.getMatchRule()) in normalizeMobileTemplate()
DDataWarningAndLimitBasePreferenceController.java21 import android.net.NetworkTemplate;
40 private NetworkTemplate mNetworkTemplate;
58 public NetworkTemplate getNetworkTemplate() { in getNetworkTemplate()
63 public void setNetworkTemplate(NetworkTemplate networkTemplate) { in setNetworkTemplate()
/packages/apps/Settings/tests/spa_unit/src/com/android/settings/datausage/lib/
DDataUsageLibTest.kt21 import android.net.NetworkTemplate
72 assertThat(mobileTemplate.matchRule).isEqualTo(NetworkTemplate.MATCH_CARRIER) in getMobileTemplate_availableSubscriptionInfoListIsNull_returnDefaultSub()
83 assertThat(mobileTemplate.matchRule).isEqualTo(NetworkTemplate.MATCH_CARRIER) in getMobileTemplate_subscriptionNotActive_returnDefaultSub()
96 assertThat(mobileTemplate.matchRule).isEqualTo(NetworkTemplate.MATCH_CARRIER) in getMobileTemplate_mergedImsisFromGroupEmpty_returnRequestedSub()
109 assertThat(mobileTemplate.matchRule).isEqualTo(NetworkTemplate.MATCH_CARRIER) in getMobileTemplate_mergedImsisFromGroupNotContainSub_returnRequestedSub()
123 assertThat(mobileTemplate.matchRule).isEqualTo(NetworkTemplate.MATCH_CARRIER) in getMobileTemplate_mergedImsisFromGroupContainSub_returnRequestedSub()
135 assertThat(mobileTemplate.matchRule).isEqualTo(NetworkTemplate.MATCH_CARRIER) in getMobileTemplateForSubId_subscriberIdNotNull()
146 assertThat(mobileTemplate.matchRule).isEqualTo(NetworkTemplate.MATCH_MOBILE) in getMobileTemplateForSubId_subscriberIdIsNull()
/packages/modules/Connectivity/framework-t/api/
Dmodule-lib-current.txt11 …oid.app.usage.NetworkStats queryDetailsForDevice(@NonNull android.net.NetworkTemplate, long, long);
12 …p.usage.NetworkStats queryDetailsForUidTagState(@NonNull android.net.NetworkTemplate, long, long, …
13 …lic android.app.usage.NetworkStats querySummary(@NonNull android.net.NetworkTemplate, long, long) …
14 ….usage.NetworkStats.Bucket querySummaryForDevice(@NonNull android.net.NetworkTemplate, long, long);
15 …droid.app.usage.NetworkStats queryTaggedSummary(@NonNull android.net.NetworkTemplate, long, long) …
16 …itional=true) public void registerUsageCallback(@NonNull android.net.NetworkTemplate, long, @NonNu…
25 method public void onThresholdReached(@NonNull android.net.NetworkTemplate);
153 public final class NetworkTemplate implements android.os.Parcelable {
165 …field @NonNull public static final android.os.Parcelable.Creator<android.net.NetworkTemplate> CREA…
180 public static final class NetworkTemplate.Builder {
[all …]
/packages/apps/Settings/src/com/android/settings/datausage/
DDataUsageUtils.java27 import android.net.NetworkTemplate;
152 public static NetworkTemplate getDefaultTemplate(Context context, int defaultSubId) { in getDefaultTemplate()
156 return new NetworkTemplate.Builder(NetworkTemplate.MATCH_WIFI).build(); in getDefaultTemplate()
158 return new NetworkTemplate.Builder(NetworkTemplate.MATCH_ETHERNET).build(); in getDefaultTemplate()
166 public static Optional<NetworkTemplate> getMobileNetworkTemplateFromSubId(Context context, in getMobileNetworkTemplateFromSubId()
DDataUsagePreference.java21 import android.net.NetworkTemplate;
35 private NetworkTemplate mTemplate;
51 public void setTemplate(NetworkTemplate template, int subId) { in setTemplate()
55 if (mTemplate.getMatchRule() == NetworkTemplate.MATCH_MOBILE) { in setTemplate()
84 if (mTemplate.getMatchRule() == NetworkTemplate.MATCH_MOBILE) { in getIntent()
/packages/apps/Settings/src/com/android/settings/
DSettingsDumpService.java26 import android.net.NetworkTemplate;
135 NetworkTemplate template = DataUsageLib.getMobileTemplateForSubId( in dumpDataUsage()
145 new NetworkTemplate.Builder(NetworkTemplate.MATCH_WIFI).build(), controller)); in dumpDataUsage()
149 obj.put("ethernet", dumpDataUsage(new NetworkTemplate.Builder( in dumpDataUsage()
150 NetworkTemplate.MATCH_ETHERNET).build(), controller)); in dumpDataUsage()
155 private JSONObject dumpDataUsage(NetworkTemplate template, DataUsageController controller) in dumpDataUsage()
/packages/services/Car/service/src/com/android/car/telemetry/publisher/
DConnectivityPublisher.java31 import android.net.NetworkTemplate;
333 NetworkTemplate buildNetworkTemplate() { in buildNetworkTemplate()
334 return new NetworkTemplate.Builder(mMatchRule).setOemManaged(mOemManaged).build(); in buildNetworkTemplate()
340 return NetworkTemplate.MATCH_MOBILE; in getMatchRule()
342 return NetworkTemplate.MATCH_ETHERNET; in getMatchRule()
344 return NetworkTemplate.MATCH_WIFI; in getMatchRule()
346 return NetworkTemplate.MATCH_BLUETOOTH; in getMatchRule()
355 return NetworkTemplate.OEM_MANAGED_NO; in getNetstatsOemManaged()
357 return NetworkTemplate.OEM_MANAGED_YES; in getNetstatsOemManaged()
/packages/modules/Connectivity/tests/unit/java/com/android/server/net/
DNetworkStatsServiceTest.java51 import static android.net.NetworkTemplate.MATCH_MOBILE;
52 import static android.net.NetworkTemplate.MATCH_TEST;
53 import static android.net.NetworkTemplate.MATCH_WIFI;
54 import static android.net.NetworkTemplate.OEM_MANAGED_NO;
55 import static android.net.NetworkTemplate.OEM_MANAGED_YES;
120 import android.net.NetworkTemplate;
227 private static NetworkTemplate sTemplateWifi = new NetworkTemplate.Builder(MATCH_WIFI)
229 private static NetworkTemplate sTemplateCarrierWifi1 = new NetworkTemplate.Builder(MATCH_WIFI)
231 private static NetworkTemplate sTemplateImsi1 = new NetworkTemplate.Builder(MATCH_MOBILE)
233 private static NetworkTemplate sTemplateImsi2 = new NetworkTemplate.Builder(MATCH_MOBILE)
[all …]
/packages/services/Car/service/src/com/android/car/telemetry/publisher/net/
DNetworkStatsManagerProxy.java21 import android.net.NetworkTemplate;
35 @NonNull NetworkTemplate template, long start, long end) { in querySummary()
42 @NonNull NetworkTemplate template, long start, long end) { in queryTaggedSummary()
/packages/apps/Settings/src/com/android/settings/network/policy/
DNetworkPolicyRepository.kt22 import android.net.NetworkTemplate in <lambda>()
31 fun getNetworkPolicy(networkTemplate: NetworkTemplate): NetworkPolicy? = in <lambda>()
34 fun networkPolicyFlow(networkTemplate: NetworkTemplate): Flow<NetworkPolicy?> = flow { in <lambda>()

12345