Home
last modified time | relevance | path

Searched refs:StatsManager (Results 1 – 25 of 41) sorted by relevance

12

/packages/modules/StatsD/framework/test/hostsidetests/app/src/com/android/tests/statsd/framework/appnopermission/
DStatsdPermissionTest.java23 import android.app.StatsManager;
24 import android.app.StatsManager.StatsUnavailableException;
47 StatsManager statsManager = context.getSystemService(StatsManager.class); in testApisThrowExceptionWithoutPermission()
48 StatsUnavailableException e = assertThrows(StatsManager.StatsUnavailableException.class, in testApisThrowExceptionWithoutPermission()
59 StatsManager.StatsUnavailableException.class, () -> statsManager.removeConfig(1234)); in testApisThrowExceptionWithoutPermission()
63 StatsManager.StatsUnavailableException.class, () -> statsManager.getReports(1234)); in testApisThrowExceptionWithoutPermission()
71 StatsManager.StatsUnavailableException.class, () -> statsManager.getStatsMetadata()); in testApisThrowExceptionWithoutPermission()
74 e = assertThrows(StatsManager.StatsUnavailableException.class, in testApisThrowExceptionWithoutPermission()
81 e = assertThrows(StatsManager.StatsUnavailableException.class, in testApisThrowExceptionWithoutPermission()
85 e = assertThrows(StatsManager.StatsUnavailableException.class, in testApisThrowExceptionWithoutPermission()
[all …]
/packages/modules/StatsD/framework/test/hostsidetests/app/src/com/android/tests/statsd/framework/app/
DStatsdRestartTest.java22 import android.app.StatsManager;
23 import android.app.StatsManager.StatsUnavailableException;
38 StatsManager statsManager = context.getSystemService(StatsManager.class); in testApisThrowExceptionWhenStatsdNotAlive()
39 StatsUnavailableException e = assertThrows(StatsManager.StatsUnavailableException.class, in testApisThrowExceptionWhenStatsdNotAlive()
50 StatsManager.StatsUnavailableException.class, () -> statsManager.removeConfig(1234)); in testApisThrowExceptionWhenStatsdNotAlive()
54 StatsManager.StatsUnavailableException.class, () -> statsManager.getReports(1234)); in testApisThrowExceptionWhenStatsdNotAlive()
58 StatsManager.StatsUnavailableException.class, () -> statsManager.getStatsMetadata()); in testApisThrowExceptionWhenStatsdNotAlive()
61 e = assertThrows(StatsManager.StatsUnavailableException.class, in testApisThrowExceptionWhenStatsdNotAlive()
/packages/modules/StatsD/apex/tests/libstatspull/src/com/android/internal/os/statsd/libstats/
DLibStatsPullTests.java20 import android.app.StatsManager;
76 sPullReturnValue = StatsManager.PULL_SUCCESS; in setup()
89 StatsManager statsManager = (StatsManager) mContext.getSystemService( in tearDown()
99 StatsManager statsManager = (StatsManager) mContext.getSystemService( in testPullAtomCallbackRegistration()
133 StatsManager statsManager = (StatsManager) mContext.getSystemService( in testPullAtomCallbackFailure()
136 sPullReturnValue = StatsManager.PULL_SKIP; in testPullAtomCallbackFailure()
154 StatsManager statsManager = (StatsManager) mContext.getSystemService( in testPullAtomCallbackTimeout()
179 StatsManager statsManager = (StatsManager) mContext.getSystemService( in testPullAtomCallbackCache()
218 StatsManager statsManager = (StatsManager) mContext.getSystemService( in testPullAtomCallbackStress()
256 StatsManager statsManager = mContext.getSystemService(StatsManager.class); in testPullAtomCallbacksProcessedInOrder()
[all …]
DStatsConfigUtils.java20 import android.app.StatsManager;
60 public static boolean verifyValidConfigExists(StatsManager statsManager, long configId) { in verifyValidConfigExists()
92 public static ConfigMetricsReport getConfigMetricsReport(StatsManager statsManager, in getConfigMetricsReport()
129 public static List<Atom> getGaugeMetricDataList(StatsManager statsManager, long configId) { in getGaugeMetricDataList()
/packages/modules/StatsD/framework/api/
Dsystem-current.txt16 public final class StatsManager {
17 …_USAGE_STATS}) public void addConfig(long, byte[]) throws android.app.StatsManager.StatsUnavailabl…
22 …STATS}) public long[] getRegisteredExperimentIds() throws android.app.StatsManager.StatsUnavailabl…
23 …CKAGE_USAGE_STATS}) public byte[] getReports(long) throws android.app.StatsManager.StatsUnavailabl…
24 …AGE_USAGE_STATS}) public byte[] getStatsMetadata() throws android.app.StatsManager.StatsUnavailabl…
25 …ceiver<android.app.StatsCursor,android.app.StatsManager.StatsQueryException>) throws android.app.S…
26 …CKAGE_USAGE_STATS}) public void removeConfig(long) throws android.app.StatsManager.StatsUnavailabl…
28 …ngedOperation(@Nullable android.app.PendingIntent) throws android.app.StatsManager.StatsUnavailabl…
29 …tSubscriber(android.app.PendingIntent, long, long) throws android.app.StatsManager.StatsUnavailabl…
32 …hReportsOperation(android.app.PendingIntent, long) throws android.app.StatsManager.StatsUnavailabl…
[all …]
Dmodule-lib-lint-baseline.txt2 BroadcastBehavior: android.app.StatsManager#ACTION_STATSD_STARTED:
6 SdkConstant: android.app.StatsManager#ACTION_STATSD_STARTED:
Dsystem-lint-baseline.txt2 BroadcastBehavior: android.app.StatsManager#ACTION_STATSD_STARTED:
6 SdkConstant: android.app.StatsManager#ACTION_STATSD_STARTED:
/packages/modules/Wifi/service/java/com/android/server/wifi/
DWifiPulledAtomLogger.java19 import android.app.StatsManager;
46 private final StatsManager mStatsManager;
50 private StatsManager.StatsPullAtomCallback mStatsPullAtomCallback;
54 public WifiPulledAtomLogger(StatsManager statsManager, Handler handler, Context context, in WifiPulledAtomLogger()
85 public class WifiPullAtomCallback implements StatsManager.StatsPullAtomCallback {
98 return StatsManager.PULL_SKIP; in onPullAtom()
107 return StatsManager.PULL_SUCCESS; in handleWifiVersionPull()
112 return StatsManager.PULL_SKIP; in handleWifiVersionPull()
117 return StatsManager.PULL_SUCCESS; in handleWifiVersionPull()
152 return StatsManager.PULL_SUCCESS; in handleWifiSettingsPull()
[all …]
/packages/services/Mms/src/com/android/mms/service/metrics/
DMmsMetricsCollector.java22 import android.app.StatsManager;
43 public class MmsMetricsCollector implements StatsManager.StatsPullAtomCallback {
58 private final StatsManager mStatsManager;
68 mStatsManager = context.getSystemService(StatsManager.class); in MmsMetricsCollector()
125 return StatsManager.PULL_SKIP; in onPullAtom()
134 return StatsManager.PULL_SUCCESS; in pullIncomingMms()
137 return StatsManager.PULL_SKIP; in pullIncomingMms()
146 return StatsManager.PULL_SUCCESS; in pullOutgoingMms()
149 return StatsManager.PULL_SKIP; in pullOutgoingMms()
/packages/modules/Telephony/libs/TelephonyStatsLib/src/com/android/telephony/statslib/
DStatsLibPulledAtomCallback.java19 import android.app.StatsManager;
34 class StatsLibPulledAtomCallback implements StatsManager.StatsPullAtomCallback {
38 private static final StatsManager.PullAtomMetadata POLICY_PULL_DAILY =
39 new StatsManager.PullAtomMetadata.Builder()
43 private final StatsManager mStatsManager;
55 mStatsManager = context.getSystemService(StatsManager.class); in StatsLibPulledAtomCallback()
127 return StatsManager.PULL_SUCCESS; in onPullAtom()
138 return StatsManager.PULL_SUCCESS; in onPullAtom()
/packages/modules/StatsD/framework/test/unittests/src/android/app/
DPullAtomMetadataTest.java21 import android.app.StatsManager.PullAtomMetadata;
36 assertThat(metadata.getTimeoutMillis()).isEqualTo(StatsManager.DEFAULT_TIMEOUT_MILLIS); in testEmpty()
37 assertThat(metadata.getCoolDownMillis()).isEqualTo(StatsManager.DEFAULT_COOL_DOWN_MILLIS); in testEmpty()
47 assertThat(metadata.getCoolDownMillis()).isEqualTo(StatsManager.DEFAULT_COOL_DOWN_MILLIS); in testSetTimeoutMillis()
56 assertThat(metadata.getTimeoutMillis()).isEqualTo(StatsManager.DEFAULT_TIMEOUT_MILLIS); in testSetCoolDownMillis()
66 assertThat(metadata.getTimeoutMillis()).isEqualTo(StatsManager.DEFAULT_TIMEOUT_MILLIS); in testSetAdditiveFields()
67 assertThat(metadata.getCoolDownMillis()).isEqualTo(StatsManager.DEFAULT_COOL_DOWN_MILLIS); in testSetAdditiveFields()
/packages/modules/StatsD/service/java/com/android/server/stats/
DStatsCompanion.java20 import android.app.StatsManager;
141 intent.putExtra(StatsManager.EXTRA_STATS_ACTIVE_CONFIG_KEYS, configIds); in sendActiveConfigsChangedBroadcast()
160 .putExtra(StatsManager.EXTRA_STATS_CONFIG_UID, configUid) in sendSubscriberBroadcast()
161 .putExtra(StatsManager.EXTRA_STATS_CONFIG_KEY, configId) in sendSubscriberBroadcast()
162 .putExtra(StatsManager.EXTRA_STATS_SUBSCRIPTION_ID, subscriptionId) in sendSubscriberBroadcast()
163 .putExtra(StatsManager.EXTRA_STATS_SUBSCRIPTION_RULE_ID, in sendSubscriberBroadcast()
165 .putExtra(StatsManager.EXTRA_STATS_DIMENSIONS_VALUE, dimensionsValue); in sendSubscriberBroadcast()
170 StatsManager.EXTRA_STATS_BROADCAST_SUBSCRIBER_COOKIES, cookieList); in sendSubscriberBroadcast()
193 intent.putExtra(StatsManager.EXTRA_STATS_RESTRICTED_METRIC_IDS, metricIds); in sendRestrictedMetricsChangedBroadcast()
/packages/modules/AdServices/sdksandbox/service/java/com/android/server/sdksandbox/
DSdkSandboxPulledAtoms.java23 import android.app.StatsManager;
55 final StatsManager statsManager = context.getSystemService(StatsManager.class); in initialize()
74 return StatsManager.PULL_SKIP; in initialize()
88 return StatsManager.PULL_SKIP; in initialize()
92 return StatsManager.PULL_SUCCESS; in initialize()
/packages/providers/MediaProvider/src/com/android/providers/media/metrics/
DPulledMetrics.java22 import android.app.StatsManager;
50 final StatsManager statsManager = context.getSystemService(StatsManager.class); in initialize()
125 private static class StatsPullCallbackHandler implements StatsManager.StatsPullAtomCallback {
131 return StatsManager.PULL_SKIP; in onPullAtom()
135 return StatsManager.PULL_SUCCESS; in onPullAtom()
/packages/modules/Connectivity/service/src/com/android/metrics/
DConnectivitySampleMetricsHelper.java20 import android.app.StatsManager;
34 public class ConnectivitySampleMetricsHelper implements StatsManager.StatsPullAtomCallback {
58 final StatsManager mgr = context.getSystemService(StatsManager.class); in start()
72 return StatsManager.PULL_SUCCESS; in onPullAtom()
/packages/services/Mms/tests/unittests/src/com/android/mms/service/metrics/
DMmsMetricsCollectorTest.java32 import android.app.StatsManager;
75 assertThat(result).isEqualTo(StatsManager.PULL_SUCCESS); in onPullAtom_incomingMms_empty()
86 assertThat(result).isEqualTo(StatsManager.PULL_SKIP); in onPullAtom_incomingMms_tooFrequent()
102 assertThat(result).isEqualTo(StatsManager.PULL_SUCCESS); in onPullAtom_incomingMms_multipleMms()
113 assertThat(result).isEqualTo(StatsManager.PULL_SUCCESS); in onPullAtom_outgoingMms_empty()
124 assertThat(result).isEqualTo(StatsManager.PULL_SKIP); in onPullAtom_outgoingMms_tooFrequent()
140 assertThat(result).isEqualTo(StatsManager.PULL_SUCCESS); in onPullAtom_outgoingMms_multipleMms()
/packages/modules/AppSearch/service/java/com/android/server/appsearch/stats/
DStatsCollector.java22 import android.app.StatsManager;
51 public final class StatsCollector implements StatsManager.StatsPullAtomCallback {
55 private final StatsManager mStatsManager;
78 mStatsManager = context.getSystemService(StatsManager.class); in StatsCollector()
104 return StatsManager.PULL_SKIP; in onPullAtom()
128 return StatsManager.PULL_SKIP; in pullAppSearchStorageInfo()
131 return StatsManager.PULL_SUCCESS; in pullAppSearchStorageInfo()
144 @Nullable StatsManager.PullAtomMetadata policy, in registerAtom()
/packages/modules/Wifi/service/tests/wifitests/src/com/android/server/wifi/
DWifiPulledAtomLoggerTest.java29 import android.app.StatsManager;
70 @Mock private StatsManager mStatsManager;
80 @Captor ArgumentCaptor<StatsManager.StatsPullAtomCallback> mPullAtomCallbackArgumentCaptor;
117 assertEquals(StatsManager.PULL_SKIP, mPullAtomCallbackArgumentCaptor.getValue() in testSetCallbackWithInvalidPull()
132 assertEquals(StatsManager.PULL_SKIP, mPullAtomCallbackArgumentCaptor.getValue() in testWifiMainlineVersionPull_builtFromSource()
143 assertEquals(StatsManager.PULL_SUCCESS, mPullAtomCallbackArgumentCaptor.getValue() in testWifiMainlineVersionPull_builtFromSource()
167 assertEquals(StatsManager.PULL_SUCCESS, mPullAtomCallbackArgumentCaptor.getValue() in testWifiMainlineVersionPull_preBuilt()
190 assertEquals(StatsManager.PULL_SUCCESS, mPullAtomCallbackArgumentCaptor.getValue() in testWifiSettingsPull()
209 assertEquals(StatsManager.PULL_SUCCESS, mPullAtomCallbackArgumentCaptor.getValue() in testWifiComplexSettingsPull_valid()
225 assertEquals(StatsManager.PULL_SKIP, mPullAtomCallbackArgumentCaptor.getValue() in testWifiComplexSettingsPull_invalid()
[all …]
/packages/services/Car/service/src/com/android/car/telemetry/publisher/
DStatsManagerImpl.java21 import android.app.StatsManager;
22 import android.app.StatsManager.StatsUnavailableException;
26 private final StatsManager mStatsManager;
28 public StatsManagerImpl(@NonNull StatsManager statsManager) { in StatsManagerImpl()
DStatsManagerProxy.java21 import android.app.StatsManager;
22 import android.app.StatsManager.StatsUnavailableException;
DPublisherFactory.java20 import android.app.StatsManager;
103 StatsManager stats = mContext.getSystemService(StatsManager.class); in getPublisher()
/packages/modules/Permission/service/java/com/android/safetycenter/logging/
DSafetyCenterPullAtomCallback.java22 import android.app.StatsManager;
23 import android.app.StatsManager.StatsPullAtomCallback;
89 return StatsManager.PULL_SKIP; in onPullAtom()
93 return StatsManager.PULL_SKIP; in onPullAtom()
100 return StatsManager.PULL_SKIP; in onPullAtom()
115 return StatsManager.PULL_SUCCESS; in onPullAtom()
/packages/services/Car/service/src/com/android/car/stats/
DCarStatsService.java21 import android.app.StatsManager;
22 import android.app.StatsManager.PullAtomMetadata;
86 private final StatsManager mStatsManager;
94 mStatsManager = (StatsManager) mContext.getSystemService(Context.STATS_MANAGER); in CarStatsService()
165 return StatsManager.PULL_SKIP; in pullVmsClientStats()
184 return StatsManager.PULL_SUCCESS; in pullVmsClientStats()
/packages/modules/StatsD/framework/java/android/os/
DStatsFrameworkInitializer.java21 import android.app.StatsManager;
73 StatsManager.class, in registerServiceWrappers()
74 context -> new StatsManager(context) in registerServiceWrappers()
/packages/modules/Connectivity/service/src/com/android/server/
DBpfNetMaps.java50 import android.app.StatsManager;
941 final StatsManager statsManager = context.getSystemService(StatsManager.class); in setPullAtomCallback()
961 return StatsManager.PULL_SKIP; in pullBpfMapInfoAtom()
969 return StatsManager.PULL_SKIP; in pullBpfMapInfoAtom()
971 return StatsManager.PULL_SUCCESS; in pullBpfMapInfoAtom()

12