1{
2  "methods": {
3    "addEvent(android.app.usage.UsageEvents.Event)": {
4      "isImplementation": false,
5      "modifiers": [
6        "public"
7      ],
8      "params": [
9        "event"
10      ],
11      "returnType": "void",
12      "exceptions": [],
13      "name": "addEvent(android.app.usage.UsageEvents.Event)",
14      "documentation": "Adds an event to be returned by {@link UsageStatsManager#queryEvents}.\n\nThis method won\u0027t affect the results of {@link #queryUsageStats} method.\n\nThe {@link Event} can be built by {@link EventBuilder}.\n"
15    },
16    "addEvent(java.lang.String,long,int)": {
17      "isImplementation": false,
18      "modifiers": [
19        "public"
20      ],
21      "params": [
22        "packageName",
23        "timeStamp",
24        "eventType"
25      ],
26      "returnType": "void",
27      "exceptions": [],
28      "name": "addEvent(java.lang.String,long,int)",
29      "documentation": "Adds an event to be returned by {@link UsageStatsManager#queryEvents}.\n\nThis method won\u0027t affect the results of {@link #queryUsageStats} method.\n\n@deprecated Use {@link #addEvent(Event)} and {@link EventBuilder} instead.\n"
30    },
31    "addUsageStats(int,android.app.usage.UsageStats)": {
32      "isImplementation": false,
33      "modifiers": [
34        "public"
35      ],
36      "params": [
37        "intervalType",
38        "stats"
39      ],
40      "returnType": "void",
41      "exceptions": [],
42      "name": "addUsageStats(int,android.app.usage.UsageStats)",
43      "documentation": "Adds an aggregated {@code UsageStats} object, to be returned by {@link #queryUsageStats}.\nConstruct these objects with {@link UsageStatsBuilder}, and set the firstTimestamp and\nlastTimestamp fields to make time filtering work in {@link #queryUsageStats}.\n\n@param intervalType An interval type constant, e.g. {@link UsageStatsManager#INTERVAL_WEEKLY}.\n"
44    },
45    "getAppStandbyBucket()": {
46      "isImplementation": true,
47      "modifiers": [
48        "protected"
49      ],
50      "params": [],
51      "returnType": "int",
52      "exceptions": [],
53      "minSdk": 28,
54      "name": "getAppStandbyBucket()",
55      "documentation": "Returns the current app\u0027s standby bucket that is set by {@code setCurrentAppStandbyBucket}. If\nthe standby bucket value has never been set, return {@link\nUsageStatsManager.STANDBY_BUCKET_ACTIVE}.\n"
56    },
57    "getAppStandbyBucket(java.lang.String)": {
58      "isImplementation": true,
59      "modifiers": [
60        "public"
61      ],
62      "params": [
63        "packageName"
64      ],
65      "returnType": "int",
66      "exceptions": [],
67      "minSdk": 28,
68      "name": "getAppStandbyBucket(java.lang.String)",
69      "documentation": "Returns the current standby bucket of the specified app that is set by {@code\nsetAppStandbyBucket}. If the standby bucket value has never been set, return {@link\nUsageStatsManager.STANDBY_BUCKET_ACTIVE}.\n"
70    },
71    "getAppStandbyBuckets()": {
72      "isImplementation": true,
73      "modifiers": [
74        "public"
75      ],
76      "params": [],
77      "returnType": "java.util.Map\u003cjava.lang.String,java.lang.Integer\u003e",
78      "exceptions": [],
79      "minSdk": 28,
80      "name": "getAppStandbyBuckets()"
81    },
82    "getRegisteredAppUsageObservers()": {
83      "isImplementation": false,
84      "modifiers": [
85        "public"
86      ],
87      "params": [],
88      "returnType": "java.util.Collection\u003corg.robolectric.shadows.ShadowUsageStatsManager.AppUsageObserver\u003e",
89      "exceptions": [],
90      "name": "getRegisteredAppUsageObservers()",
91      "documentation": "Returns the {@link AppUsageObserver}s currently registered in {@link UsageStatsManager}. "
92    },
93    "queryEvents(long,long)": {
94      "isImplementation": true,
95      "modifiers": [
96        "protected"
97      ],
98      "params": [
99        "beginTime",
100        "endTime"
101      ],
102      "returnType": "android.app.usage.UsageEvents",
103      "exceptions": [],
104      "name": "queryEvents(long,long)"
105    },
106    "queryUsageStats(int,long,long)": {
107      "isImplementation": true,
108      "modifiers": [
109        "protected"
110      ],
111      "params": [
112        "intervalType",
113        "beginTime",
114        "endTime"
115      ],
116      "returnType": "java.util.List\u003candroid.app.usage.UsageStats\u003e",
117      "exceptions": [],
118      "name": "queryUsageStats(int,long,long)",
119      "documentation": "Returns aggregated UsageStats added by calling {@link #addUsageStats}.\n\nThe real implementation creates these aggregated objects from individual {@link Event}. This\naggregation logic is nontrivial, so the shadow implementation just returns the aggregate data\nadded using {@link #addUsageStats}.\n"
120    },
121    "registerAppUsageObserver(int,java.lang.String[],long,java.util.concurrent.TimeUnit,android.app.PendingIntent)": {
122      "isImplementation": true,
123      "modifiers": [
124        "protected"
125      ],
126      "params": [
127        "observerId",
128        "packages",
129        "timeLimit",
130        "timeUnit",
131        "callbackIntent"
132      ],
133      "returnType": "void",
134      "exceptions": [],
135      "minSdk": 28,
136      "name": "registerAppUsageObserver(int,java.lang.String[],long,java.util.concurrent.TimeUnit,android.app.PendingIntent)"
137    },
138    "reset()": {
139      "isImplementation": false,
140      "modifiers": [
141        "public",
142        "static"
143      ],
144      "params": [],
145      "returnType": "void",
146      "exceptions": [],
147      "name": "reset()"
148    },
149    "setAppStandbyBucket(java.lang.String,int)": {
150      "isImplementation": true,
151      "modifiers": [
152        "public"
153      ],
154      "params": [
155        "packageName",
156        "bucket"
157      ],
158      "returnType": "void",
159      "exceptions": [],
160      "minSdk": 28,
161      "name": "setAppStandbyBucket(java.lang.String,int)",
162      "documentation": "Sets the standby bucket of the specified app. "
163    },
164    "setAppStandbyBuckets(java.util.Map\u003cjava.lang.String,java.lang.Integer\u003e)": {
165      "isImplementation": true,
166      "modifiers": [
167        "public"
168      ],
169      "params": [
170        "appBuckets"
171      ],
172      "returnType": "void",
173      "exceptions": [],
174      "minSdk": 28,
175      "name": "setAppStandbyBuckets(java.util.Map\u003cjava.lang.String,java.lang.Integer\u003e)"
176    },
177    "setCurrentAppStandbyBucket(int)": {
178      "isImplementation": false,
179      "modifiers": [
180        "public"
181      ],
182      "params": [
183        "bucket"
184      ],
185      "returnType": "void",
186      "exceptions": [],
187      "name": "setCurrentAppStandbyBucket(int)",
188      "documentation": "Sets the current app\u0027s standby bucket "
189    },
190    "simulateTimeChange(long)": {
191      "isImplementation": false,
192      "modifiers": [
193        "public"
194      ],
195      "params": [
196        "offsetToAddInMillis"
197      ],
198      "returnType": "void",
199      "exceptions": [],
200      "name": "simulateTimeChange(long)",
201      "documentation": "Simulates the operations done by the framework when there is a time change. If the time is\nchanged, the timestamps of all existing usage events will be shifted by the same offset as the\ntime change, in order to make sure they remain stable relative to the new time.\n\nThis method won\u0027t affect the results of {@link #queryUsageStats} method.\n\n@param offsetToAddInMillis the offset to be applied to all events. For example, if {@code\n    offsetInMillis} is 60,000, then all {@link Event}s will be shifted forward by 1 minute\n    (into the future). Likewise, if {@code offsetInMillis} is -60,000, then all {@link Event}s\n    will be shifted backward by 1 minute (into the past).\n"
202    },
203    "triggerRegisteredAppUsageObserver(int,long)": {
204      "isImplementation": false,
205      "modifiers": [
206        "public"
207      ],
208      "params": [
209        "observerId",
210        "timeUsedInMillis"
211      ],
212      "returnType": "void",
213      "exceptions": [],
214      "name": "triggerRegisteredAppUsageObserver(int,long)",
215      "documentation": "Triggers a currently registered {@link AppUsageObserver} with {@code observerId}.\n\nThe observer will be no longer registered afterwards.\n"
216    },
217    "unregisterAppUsageObserver(int)": {
218      "isImplementation": true,
219      "modifiers": [
220        "protected"
221      ],
222      "params": [
223        "observerId"
224      ],
225      "returnType": "void",
226      "exceptions": [],
227      "minSdk": 28,
228      "name": "unregisterAppUsageObserver(int)"
229    }
230  },
231  "imports": [
232    "android.annotation.NonNull",
233    "android.app.PendingIntent",
234    "android.app.PendingIntent.CanceledException",
235    "android.app.usage.UsageEvents",
236    "android.app.usage.UsageEvents.Event",
237    "android.app.usage.UsageStats",
238    "android.app.usage.UsageStatsManager",
239    "android.app.usage.UsageStatsManager.StandbyBuckets",
240    "android.content.Intent",
241    "android.content.res.Configuration",
242    "android.os.Build",
243    "android.os.Parcel",
244    "android.util.ArraySet",
245    "com.google.common.collect.HashMultimap",
246    "com.google.common.collect.ImmutableList",
247    "com.google.common.collect.ImmutableMap",
248    "com.google.common.collect.Range",
249    "com.google.common.collect.SetMultimap",
250    "java.util.ArrayList",
251    "java.util.Arrays",
252    "java.util.Collection",
253    "java.util.HashMap",
254    "java.util.List",
255    "java.util.Map",
256    "java.util.TreeMap",
257    "java.util.concurrent.TimeUnit",
258    "org.robolectric.RuntimeEnvironment",
259    "org.robolectric.annotation.HiddenApi",
260    "org.robolectric.annotation.Implementation",
261    "org.robolectric.annotation.Implements",
262    "org.robolectric.annotation.Resetter",
263    "org.robolectric.shadows.ShadowUsageStatsManager.AppUsageObserver",
264    "org.robolectric.shadows.ShadowUsageStatsManager.UsageStatsBuilder",
265    "org.robolectric.shadows.ShadowUsageStatsManager.EventBuilder"
266  ],
267  "name": "org.robolectric.shadows.ShadowUsageStatsManager",
268  "documentation": "Shadow of {@link UsageStatsManager}. "
269}