Searched defs:template (Results 1 - 25 of 68) sorted by path

123

/frameworks/base/cmds/statsd/tools/loadtest/src/com/android/statsd/loadtest/
H A DConfigFactory.java61 // Read the config template from the resoures.
63 byte[] template = null;
67 template = new byte[inputStream.available()];
68 inputStream.read(template);
69 templateProto = StatsdConfig.parseFrom(template);
71 Log.e(TAG, "Unable to read or parse loadtest config template. Using an empty config.");
75 Log.d(TAG, "Loadtest template config: " + mTemplate);
81 * All configs are based on the same template.
82 * That template is designed to make the most use of the set of atoms that {@code SequencePusher}
89 * If the config template ha
171 addEventMetric(EventMetric template, int suffix, StatsdConfig.Builder config) argument
190 addCountMetric(CountMetric template, int suffix, TimeUnit bucket, StatsdConfig.Builder config) argument
211 addDurationMetric(DurationMetric template, int suffix, TimeUnit bucket, StatsdConfig.Builder config) argument
232 addGaugeMetric(GaugeMetric template, int suffix, TimeUnit bucket, StatsdConfig.Builder config) argument
253 addValueMetric(ValueMetric template, int suffix, TimeUnit bucket, StatsdConfig.Builder config) argument
274 addPredicate(Predicate template, int suffix, StatsdConfig.Builder config) argument
301 addMatcher(AtomMatcher template, int suffix, StatsdConfig.Builder config) argument
[all...]
/frameworks/base/core/java/android/app/usage/
H A DNetworkStats.java104 NetworkStats(Context context, NetworkTemplate template, int flags, long startTimestamp, argument
110 mTemplate = template;
H A DNetworkStatsManager.java166 public Bucket querySummaryForDevice(NetworkTemplate template, argument
169 NetworkStats stats = new NetworkStats(mContext, template, mFlags, startTime, endTime,
201 NetworkTemplate template;
203 template = createTemplate(networkType, subscriberId);
205 if (DBG) Log.e(TAG, "Cannot create template", e);
209 return querySummaryForDevice(template, startTime, endTime);
234 NetworkTemplate template;
236 template = createTemplate(networkType, subscriberId);
238 if (DBG) Log.e(TAG, "Cannot create template", e);
243 stats = new NetworkStats(mContext, template, mFlag
396 registerUsageCallback(NetworkTemplate template, int networkType, long thresholdBytes, UsageCallback callback, @Nullable Handler handler) argument
[all...]
/frameworks/base/core/java/android/hardware/camera2/
H A DCaptureRequest.java717 * Initialize the builder using the template; the request takes
718 * ownership of the template.
720 * @param template Template settings for this capture request.
738 public Builder(CameraMetadataNative template, boolean reprocess, argument
741 mRequest = new CaptureRequest(template, reprocess, reprocessableSessionId,
1934 * TEMPLATE_STILL_CAPTURE template may be <code>true</code>. The value in other templates is always
1938 * <p>For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p>
/frameworks/base/core/java/android/net/
H A DDataUsageRequest.java47 public final NetworkTemplate template; field in class:DataUsageRequest
54 public DataUsageRequest(int requestId, NetworkTemplate template, long thresholdInBytes) { argument
56 this.template = template;
68 dest.writeParcelable(template, flags);
77 NetworkTemplate template = in.readParcelable(null);
79 DataUsageRequest result = new DataUsageRequest(requestId, template,
93 + ", networkTemplate=" + template
102 && Objects.equals(that.template, this.template)
[all...]
H A DNetworkPolicy.java52 public NetworkTemplate template; field in class:NetworkPolicy
73 public NetworkPolicy(NetworkTemplate template, int cycleDay, String cycleTimezone, argument
75 this(template, cycleDay, cycleTimezone, warningBytes, limitBytes, SNOOZE_NEVER,
80 public NetworkPolicy(NetworkTemplate template, int cycleDay, String cycleTimezone, argument
83 this(template, buildRule(cycleDay, ZoneId.of(cycleTimezone)), warningBytes,
88 public NetworkPolicy(NetworkTemplate template, RecurrenceRule cycleRule, long warningBytes, argument
91 this(template, cycleRule, warningBytes, limitBytes, lastWarningSnooze, lastLimitSnooze,
95 public NetworkPolicy(NetworkTemplate template, RecurrenceRule cycleRule, long warningBytes, argument
98 this.template = Preconditions.checkNotNull(template, "missin
[all...]
H A DNetworkTemplate.java162 * that should be considered to match this template.
197 Log.e(TAG, "Unknown network template rule " + matchRule
309 * Test if given {@link NetworkIdentity} matches this template.
332 // We have no idea what kind of network template we are, so we
375 * Check if matches Wi-Fi network template.
388 * Check if matches Ethernet network template.
416 * Check if matches Bluetooth network template.
426 * Check if matches Proxy network template.
454 * Examine the given template and normalize if it refers to a "merged"
456 * for key purposes, and expand the template t
463 normalize(NetworkTemplate template, String[] merged) argument
[all...]
/frameworks/base/core/java/android/service/autofill/
H A DInternalTransformation.java42 * presentation template}.
45 * @param template the {@link RemoteViews presentation template}.
46 * @param childViewId resource id of the child view inside the template.
50 abstract void apply(@NonNull ValueFinder finder, @NonNull RemoteViews template, argument
55 * {@link android.widget.RemoteViews presentation template}.
58 * @param template the {@link RemoteViews presentation template}.
59 * @param transformations map of resource id of the child view inside the template to
64 public static boolean batchApply(@NonNull ValueFinder finder, @NonNull RemoteViews template, argument
[all...]
/frameworks/base/core/java/android/text/
H A DTextUtils.java905 public static CharSequence replace(CharSequence template, argument
908 SpannableStringBuilder tb = new SpannableStringBuilder(template);
932 * <code>template</code> CharSequence with the corresponding
938 * @param template the input text containing "^1"-style
942 * @param values CharSequences substituted into the template. The
947 * @throws IllegalArgumentException if the template requests a
951 public static CharSequence expandTemplate(CharSequence template, argument
957 SpannableStringBuilder ssb = new SpannableStringBuilder(template);
972 "template requests value ^" + (which+1));
976 "template request
[all...]
/frameworks/base/core/java/android/webkit/
H A DURLUtil.java88 public static String composeSearchUrl(String inQuery, String template, argument
90 int placeHolderIndex = template.indexOf(queryPlaceHolder);
97 buffer.append(template.substring(0, placeHolderIndex));
106 buffer.append(template.substring(
/frameworks/base/core/tests/coretests/src/android/content/pm/
H A DPackageParserTest.java333 * @param template templated string with %s subbed with Activity, Service, Provider, Receiver
335 private void assertOneComponentOfEachType(String template, Package p) { argument
339 assertComponent(String.format(template, "Activity"),
342 assertComponent(String.format(template, "Service"),
345 assertComponent(String.format(template, "Provider"),
348 assertComponent(String.format(template, "Receiver"),
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/
H A DNetworkPolicyEditor.java99 public boolean hasLimitedPolicy(NetworkTemplate template) { argument
100 final NetworkPolicy policy = getPolicy(template);
104 public NetworkPolicy getOrCreatePolicy(NetworkTemplate template) { argument
105 NetworkPolicy policy = getPolicy(template);
107 policy = buildDefaultPolicy(template);
113 public NetworkPolicy getPolicy(NetworkTemplate template) { argument
115 if (policy.template.equals(template)) {
122 public NetworkPolicy getPolicyMaybeUnquoted(NetworkTemplate template) { argument
123 NetworkPolicy policy = getPolicy(template);
132 buildDefaultPolicy(NetworkTemplate template) argument
151 getPolicyCycleDay(NetworkTemplate template) argument
161 setPolicyCycleDay(NetworkTemplate template, int cycleDay, String cycleTimezone) argument
169 getPolicyWarningBytes(NetworkTemplate template) argument
174 setPolicyWarningBytesInner(NetworkTemplate template, long warningBytes) argument
182 setPolicyWarningBytes(NetworkTemplate template, long warningBytes) argument
191 getPolicyLimitBytes(NetworkTemplate template) argument
197 setPolicyLimitBytes(NetworkTemplate template, long limitBytes) argument
216 buildUnquotedNetworkTemplate(NetworkTemplate template) argument
[all...]
/frameworks/base/packages/SettingsLib/src/com/android/settingslib/net/
H A DChartDataLoader.java40 private static final String KEY_TEMPLATE = "template";
47 public static Bundle buildArgs(NetworkTemplate template, AppItem app) { argument
48 return buildArgs(template, app, FIELD_RX_BYTES | FIELD_TX_BYTES);
51 public static Bundle buildArgs(NetworkTemplate template, AppItem app, int fields) { argument
53 args.putParcelable(KEY_TEMPLATE, template);
73 final NetworkTemplate template = mArgs.getParcelable(KEY_TEMPLATE);
78 return loadInBackground(template, app, fields);
86 private ChartData loadInBackground(NetworkTemplate template, AppItem app, int fields) argument
89 data.network = mSession.getHistoryForNetwork(template, fields);
92 // load stats for current uid and template
132 collectHistoryForUid( NetworkTemplate template, int uid, int set, NetworkStatsHistory existing) argument
[all...]
H A DDataUsageController.java116 NetworkTemplate template = NetworkTemplate.buildTemplateMobileAll(subscriberId);
117 template = NetworkTemplate.normalize(template, mTelephonyManager.getMergedSubscriberIds());
119 return getDataUsageInfo(template);
123 NetworkTemplate template = NetworkTemplate.buildTemplateWifiWildcard();
124 return getDataUsageInfo(template);
127 public DataUsageInfo getDataUsageInfo(NetworkTemplate template) { argument
132 final NetworkPolicy policy = findNetworkPolicy(template);
134 final NetworkStatsHistory history = session.getHistoryForNetwork(template, FIELDS);
179 private NetworkPolicy findNetworkPolicy(NetworkTemplate template) { argument
[all...]
H A DSummaryForAllUidLoader.java28 private static final String KEY_TEMPLATE = "template";
35 public static Bundle buildArgs(NetworkTemplate template, long start, long end) { argument
37 args.putParcelable(KEY_TEMPLATE, template);
57 final NetworkTemplate template = mArgs.getParcelable(KEY_TEMPLATE);
62 return mSession.getSummaryForAllUid(template, start, end, false);
/frameworks/base/packages/SystemUI/src/com/android/systemui/net/
H A DNetworkOverLimitActivity.java50 final NetworkTemplate template = getIntent().getParcelableExtra(EXTRA_NETWORK_TEMPLATE);
52 builder.setTitle(getLimitedDialogTitleForTemplate(template));
59 snoozePolicy(template);
74 private void snoozePolicy(NetworkTemplate template) { argument
78 policyService.snoozeLimit(template);
84 private static int getLimitedDialogTitleForTemplate(NetworkTemplate template) { argument
85 switch (template.getMatchRule()) {
/frameworks/base/services/core/java/com/android/server/net/
H A DNetworkPolicyManagerInternal.java63 * Return the active {@link SubscriptionPlan} for the given template.
65 public abstract SubscriptionPlan getSubscriptionPlan(NetworkTemplate template); argument
H A DNetworkPolicyManagerService.java1038 final NetworkTemplate template = intent.getParcelableExtra(EXTRA_NETWORK_TEMPLATE);
1040 performSnooze(template, TYPE_WARNING);
1042 performSnooze(template, TYPE_RAPID);
1135 final int subId = findRelevantSubIdNL(policy.template);
1145 final long totalBytes = getTotalBytes(policy.template, cycleStart, cycleEnd);
1174 notifyOverLimitNL(policy.template);
1177 notifyUnderLimitNL(policy.template);
1187 final long recentBytes = getTotalBytes(policy.template, recentStart, recentEnd);
1202 findRapidBlame(policy.template, recentStart, recentEnd));
1222 private @Nullable ApplicationInfo findRapidBlame(NetworkTemplate template, argument
1266 findRelevantSubIdNL(NetworkTemplate template) argument
1285 notifyOverLimitNL(NetworkTemplate template) argument
1292 notifyUnderLimitNL(NetworkTemplate template) argument
1672 setNetworkTemplateEnabled(NetworkTemplate template, boolean enabled) argument
1679 setNetworkTemplateEnabledInner(NetworkTemplate template, boolean enabled) argument
2726 snoozeLimit(NetworkTemplate template) argument
2737 performSnooze(NetworkTemplate template, int type) argument
4642 getTotalBytes(NetworkTemplate template, long start, long end) argument
4646 getNetworkTotalBytes(NetworkTemplate template, long start, long end) argument
4655 getNetworkUidBytes(NetworkTemplate template, long start, long end) argument
4680 buildSnoozeWarningIntent(NetworkTemplate template) argument
4687 buildSnoozeRapidIntent(NetworkTemplate template) argument
4694 buildNetworkOverLimitIntent(Resources res, NetworkTemplate template) argument
4703 buildViewDataUsageIntent(Resources res, NetworkTemplate template) argument
4903 getSubscriptionPlan(NetworkTemplate template) argument
[all...]
H A DNetworkStatsCollection.java242 public NetworkStatsHistory getHistory(NetworkTemplate template, SubscriptionPlan augmentPlan, argument
295 && templateMatches(template, key.ident)) {
355 public NetworkStats getSummary(NetworkTemplate template, long start, long end, argument
369 if (templateMatches(template, key.ident)
766 private static boolean templateMatches(NetworkTemplate template, NetworkIdentitySet identSet) { argument
768 if (template.matches(ident)) {
H A DNetworkStatsManagerInternal.java23 /** Return network layer usage total for traffic that matches template. */
24 public abstract long getNetworkTotalBytes(NetworkTemplate template, long start, long end); argument
26 /** Return network layer usage per-UID for traffic that matches template. */
27 public abstract NetworkStats getNetworkUidBytes(NetworkTemplate template, long start, long end); argument
H A DNetworkStatsObservers.java206 request.template, thresholdInBytes);
340 long bytesSoFar = getTotalBytesForNetwork(mRequest.template);
343 + mRequest.template);
361 * Reads stats matching the given template. {@link NetworkStatsCollection} will aggregate
365 private long getTotalBytesForNetwork(NetworkTemplate template) { argument
366 NetworkStats stats = mCollection.getSummary(template,
385 long bytesSoFar = getTotalBytesForNetworkUid(mRequest.template, uidsToMonitor[i]);
403 * Reads all stats matching the given template and uid. Ther history will likely only
407 private long getTotalBytesForNetworkUid(NetworkTemplate template, int uid) { argument
409 NetworkStatsHistory history = mCollection.getHistory(template, nul
[all...]
H A DNetworkStatsRecorder.java154 public NetworkStats.Entry getTotalSinceBootLocked(NetworkTemplate template) { argument
155 return mSinceBoot.getSummary(template, Long.MIN_VALUE, Long.MAX_VALUE,
H A DNetworkStatsService.java597 NetworkTemplate template, long start, long end) {
598 return internalGetSummaryForNetwork(template, usedFlags, start, end, mAccessLevel,
604 NetworkTemplate template, long start, long end) {
605 return internalGetSummaryForNetwork(template, usedFlags, start, end, mAccessLevel,
610 public NetworkStatsHistory getHistoryForNetwork(NetworkTemplate template, int fields) {
611 return internalGetHistoryForNetwork(template, usedFlags, fields, mAccessLevel,
617 NetworkTemplate template, long start, long end, boolean includeTags) {
620 .getSummary(template, start, end, mAccessLevel, mCallingUid);
623 .getSummary(template, start, end, mAccessLevel, mCallingUid);
636 NetworkTemplate template, in
682 resolveSubscriptionPlan(NetworkTemplate template, int flags) argument
703 internalGetSummaryForNetwork(NetworkTemplate template, int flags, long start, long end, @NetworkStatsAccess.Level int accessLevel, int callingUid) argument
724 internalGetHistoryForNetwork(NetworkTemplate template, int flags, int fields, @NetworkStatsAccess.Level int accessLevel, int callingUid) argument
736 getNetworkTotalBytes(NetworkTemplate template, long start, long end) argument
747 getNetworkUidBytes(NetworkTemplate template, long start, long end) argument
1400 getNetworkTotalBytes(NetworkTemplate template, long start, long end) argument
1410 getNetworkUidBytes(NetworkTemplate template, long start, long end) argument
[all...]
/frameworks/base/tests/DataIdleTest/src/com/android/tests/dataidle/
H A DDataIdleTest.java56 NetworkTemplate template = NetworkTemplate.buildTemplateWifiWildcard();
57 fetchStats(template);
65 NetworkTemplate template = NetworkTemplate.buildTemplateMobileAll(subscriberId);
66 fetchStats(template);
72 * @param template {@link NetworkTemplate} to match.
74 private void fetchStats(NetworkTemplate template) { argument
80 template, Long.MIN_VALUE, Long.MAX_VALUE, false);
/frameworks/base/tests/net/java/com/android/server/net/
H A DNetworkStatsCollectionTest.java549 NetworkTemplate template, long rxBytes, long rxPackets, long txBytes, long txPackets,
552 template, Long.MIN_VALUE, Long.MAX_VALUE, accessLevel, myUid())
558 NetworkTemplate template, long rxBytes, long rxPackets, long txBytes, long txPackets) {
560 template, Long.MIN_VALUE, Long.MAX_VALUE, NetworkStatsAccess.Level.DEVICE, myUid())
548 assertSummaryTotal(NetworkStatsCollection collection, NetworkTemplate template, long rxBytes, long rxPackets, long txBytes, long txPackets, @NetworkStatsAccess.Level int accessLevel) argument
557 assertSummaryTotalIncludingTags(NetworkStatsCollection collection, NetworkTemplate template, long rxBytes, long rxPackets, long txBytes, long txPackets) argument

Completed in 882 milliseconds

123