Debian Codegraph @

core/java/android/app/usage/IUsageStatsManager.aidl

raw
1 /**
2 * Copyright (c) 2014, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package android.app.usage;
18
19 import android.app.PendingIntent;
20 import android.app.usage.BroadcastResponseStats;
21 import android.app.usage.BroadcastResponseStatsList;
22 import android.app.usage.UsageEvents;
23 import android.content.pm.ParceledListSlice;
24
25 import java.util.Map;
26
27 /**
28 * System private API for talking with the UsageStatsManagerService.
29 *
30 * {@hide}
31 */
32 interface IUsageStatsManager {
33 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
34 ParceledListSlice queryUsageStats(int bucketType, long beginTime, long endTime,
35 String callingPackage, int userId);
36 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
37 ParceledListSlice queryConfigurationStats(int bucketType, long beginTime, long endTime,
38 String callingPackage);
39 ParceledListSlice queryEventStats(int bucketType, long beginTime, long endTime,
40 String callingPackage);
41 UsageEvents queryEvents(long beginTime, long endTime, String callingPackage);
42 UsageEvents queryEventsForPackage(long beginTime, long endTime, String callingPackage);
43 UsageEvents queryEventsForUser(long beginTime, long endTime, int userId, String callingPackage);
44 UsageEvents queryEventsForPackageForUser(long beginTime, long endTime, int userId, String pkg, String callingPackage);
45 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
46 void setAppInactive(String packageName, boolean inactive, int userId);
47 @UnsupportedAppUsage(maxTargetSdk = 30, trackingBug = 170729553)
48 boolean isAppInactive(String packageName, int userId, String callingPackage);
49 void onCarrierPrivilegedAppsChanged();
50 void reportChooserSelection(String packageName, int userId, String contentType,
51 in String[] annotations, String action);
52 int getAppStandbyBucket(String packageName, String callingPackage, int userId);
53 void setAppStandbyBucket(String packageName, int bucket, int userId);
54 ParceledListSlice getAppStandbyBuckets(String callingPackage, int userId);
55 void setAppStandbyBuckets(in ParceledListSlice appBuckets, int userId);
56 int getAppMinStandbyBucket(String packageName, String callingPackage, int userId);
57 void setEstimatedLaunchTime(String packageName, long estimatedLaunchTime, int userId);
58 void setEstimatedLaunchTimes(in ParceledListSlice appLaunchTimes, int userId);
59 void registerAppUsageObserver(int observerId, in String[] packages, long timeLimitMs,
60 in PendingIntent callback, String callingPackage);
61 void unregisterAppUsageObserver(int observerId, String callingPackage);
62 void registerUsageSessionObserver(int sessionObserverId, in String[] observed, long timeLimitMs,
63 long sessionThresholdTimeMs, in PendingIntent limitReachedCallbackIntent,
64 in PendingIntent sessionEndCallbackIntent, String callingPackage);
65 void unregisterUsageSessionObserver(int sessionObserverId, String callingPackage);
66 void registerAppUsageLimitObserver(int observerId, in String[] packages, long timeLimitMs,
67 long timeUsedMs, in PendingIntent callback, String callingPackage);
68 void unregisterAppUsageLimitObserver(int observerId, String callingPackage);
69 void reportUsageStart(in IBinder activity, String token, String callingPackage);
70 void reportPastUsageStart(in IBinder activity, String token, long timeAgoMs,
71 String callingPackage);
72 void reportUsageStop(in IBinder activity, String token, String callingPackage);
73 void reportUserInteraction(String packageName, int userId);
74 int getUsageSource();
75 void forceUsageSourceSettingRead();
76 long getLastTimeAnyComponentUsed(String packageName, String callingPackage);
77 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.ACCESS_BROADCAST_RESPONSE_STATS)")
78 BroadcastResponseStatsList queryBroadcastResponseStats(
79 String packageName, long id, String callingPackage, int userId);
80 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.ACCESS_BROADCAST_RESPONSE_STATS)")
81 void clearBroadcastResponseStats(String packageName, long id, String callingPackage,
82 int userId);
83 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.ACCESS_BROADCAST_RESPONSE_STATS)")
84 void clearBroadcastEvents(String callingPackage, int userId);
85 @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.READ_DEVICE_CONFIG)")
86 String getAppStandbyConstant(String key);
87 }