• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.xtremelabs.robolectric.tester.android.content.pm;
2 
3 import android.content.ComponentName;
4 import android.content.Intent;
5 import android.content.IntentFilter;
6 import android.content.pm.ActivityInfo;
7 import android.content.pm.ApplicationInfo;
8 import android.content.pm.FeatureInfo;
9 import android.content.pm.InstrumentationInfo;
10 import android.content.pm.PackageInfo;
11 import android.content.pm.PackageManager;
12 import android.content.pm.PermissionGroupInfo;
13 import android.content.pm.PermissionInfo;
14 import android.content.pm.ProviderInfo;
15 import android.content.pm.ResolveInfo;
16 import android.content.pm.ServiceInfo;
17 import android.content.res.Resources;
18 import android.content.res.XmlResourceParser;
19 import android.graphics.drawable.Drawable;
20 
21 import java.util.List;
22 
23 public class StubPackageManager extends PackageManager {
24     @Override
getPackageInfo(String packageName, int flags)25     public PackageInfo getPackageInfo(String packageName, int flags) throws NameNotFoundException {
26         return null;
27     }
28 
currentToCanonicalPackageNames(String[] strings)29     @Override public String[] currentToCanonicalPackageNames(String[] strings) {
30         return new String[0];
31     }
32 
canonicalToCurrentPackageNames(String[] strings)33     @Override public String[] canonicalToCurrentPackageNames(String[] strings) {
34         return new String[0];
35     }
36 
getLaunchIntentForPackage(String packageName)37     @Override public Intent getLaunchIntentForPackage(String packageName) {
38         return null;
39     }
40 
getPackageGids(String packageName)41     @Override public int[] getPackageGids(String packageName) throws NameNotFoundException {
42         return new int[0];
43     }
44 
45     @Override
getPermissionInfo(String name, int flags)46     public PermissionInfo getPermissionInfo(String name, int flags) throws NameNotFoundException {
47         return null;
48     }
49 
50     @Override
queryPermissionsByGroup(String group, int flags)51     public List<PermissionInfo> queryPermissionsByGroup(String group, int flags) throws NameNotFoundException {
52         return null;
53     }
54 
55     @Override
getPermissionGroupInfo(String name, int flags)56     public PermissionGroupInfo getPermissionGroupInfo(String name, int flags) throws NameNotFoundException {
57         return null;
58     }
59 
getAllPermissionGroups(int flags)60     @Override public List<PermissionGroupInfo> getAllPermissionGroups(int flags) {
61         return null;
62     }
63 
64     @Override
getApplicationInfo(String packageName, int flags)65     public ApplicationInfo getApplicationInfo(String packageName, int flags) throws NameNotFoundException {
66         return null;
67     }
68 
69     @Override
getActivityInfo(ComponentName className, int flags)70     public ActivityInfo getActivityInfo(ComponentName className, int flags) throws NameNotFoundException {
71         return null;
72     }
73 
74     @Override
getReceiverInfo(ComponentName className, int flags)75     public ActivityInfo getReceiverInfo(ComponentName className, int flags) throws NameNotFoundException {
76         return null;
77     }
78 
79     @Override
getServiceInfo(ComponentName className, int flags)80     public ServiceInfo getServiceInfo(ComponentName className, int flags) throws NameNotFoundException {
81         return null;
82     }
83 
84     @Override
getProviderInfo(ComponentName componentName, int i)85     public ProviderInfo getProviderInfo(ComponentName componentName, int i) throws NameNotFoundException {
86         return null;
87     }
88 
getInstalledPackages(int flags)89     @Override public List<PackageInfo> getInstalledPackages(int flags) {
90         return null;
91     }
92 
checkPermission(String permName, String pkgName)93     @Override public int checkPermission(String permName, String pkgName) {
94         return 0;
95     }
96 
addPermission(PermissionInfo info)97     @Override public boolean addPermission(PermissionInfo info) {
98         return false;
99     }
100 
addPermissionAsync(PermissionInfo permissionInfo)101     @Override public boolean addPermissionAsync(PermissionInfo permissionInfo) {
102         return false;
103     }
104 
removePermission(String name)105     @Override public void removePermission(String name) {
106     }
107 
checkSignatures(String pkg1, String pkg2)108     @Override public int checkSignatures(String pkg1, String pkg2) {
109         return 0;
110     }
111 
checkSignatures(int uid1, int uid2)112     @Override public int checkSignatures(int uid1, int uid2) {
113         return 0;
114     }
115 
getPackagesForUid(int uid)116     @Override public String[] getPackagesForUid(int uid) {
117         return new String[0];
118     }
119 
getNameForUid(int uid)120     @Override public String getNameForUid(int uid) {
121         return null;
122     }
123 
getInstalledApplications(int flags)124     @Override public List<ApplicationInfo> getInstalledApplications(int flags) {
125         return null;
126     }
127 
getSystemSharedLibraryNames()128     @Override public String[] getSystemSharedLibraryNames() {
129         return new String[0];
130     }
131 
getSystemAvailableFeatures()132     @Override public FeatureInfo[] getSystemAvailableFeatures() {
133         return new FeatureInfo[0];
134     }
135 
hasSystemFeature(String name)136     @Override public boolean hasSystemFeature(String name) {
137         return false;
138     }
139 
resolveActivity(Intent intent, int flags)140     @Override public ResolveInfo resolveActivity(Intent intent, int flags) {
141         return null;
142     }
143 
queryIntentActivities(Intent intent, int flags)144     @Override public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) {
145         return null;
146     }
147 
148     @Override
queryIntentActivityOptions(ComponentName caller, Intent[] specifics, Intent intent, int flags)149     public List<ResolveInfo> queryIntentActivityOptions(ComponentName caller, Intent[] specifics, Intent intent, int flags) {
150         return null;
151     }
152 
queryBroadcastReceivers(Intent intent, int flags)153     @Override public List<ResolveInfo> queryBroadcastReceivers(Intent intent, int flags) {
154         return null;
155     }
156 
resolveService(Intent intent, int flags)157     @Override public ResolveInfo resolveService(Intent intent, int flags) {
158         return null;
159     }
160 
queryIntentServices(Intent intent, int flags)161     @Override public List<ResolveInfo> queryIntentServices(Intent intent, int flags) {
162         return null;
163     }
164 
resolveContentProvider(String name, int flags)165     @Override public ProviderInfo resolveContentProvider(String name, int flags) {
166         return null;
167     }
168 
queryContentProviders(String processName, int uid, int flags)169     @Override public List<ProviderInfo> queryContentProviders(String processName, int uid, int flags) {
170         return null;
171     }
172 
173     @Override
getInstrumentationInfo(ComponentName className, int flags)174     public InstrumentationInfo getInstrumentationInfo(ComponentName className, int flags) throws NameNotFoundException {
175         return null;
176     }
177 
queryInstrumentation(String targetPackage, int flags)178     @Override public List<InstrumentationInfo> queryInstrumentation(String targetPackage, int flags) {
179         return null;
180     }
181 
getDrawable(String packageName, int resid, ApplicationInfo appInfo)182     @Override public Drawable getDrawable(String packageName, int resid, ApplicationInfo appInfo) {
183         return null;
184     }
185 
getActivityIcon(ComponentName activityName)186     @Override public Drawable getActivityIcon(ComponentName activityName) throws NameNotFoundException {
187         return null;
188     }
189 
getActivityIcon(Intent intent)190     @Override public Drawable getActivityIcon(Intent intent) throws NameNotFoundException {
191         return null;
192     }
193 
getDefaultActivityIcon()194     @Override public Drawable getDefaultActivityIcon() {
195         return null;
196     }
197 
getApplicationIcon(ApplicationInfo info)198     @Override public Drawable getApplicationIcon(ApplicationInfo info) {
199         return null;
200     }
201 
getApplicationIcon(String packageName)202     @Override public Drawable getApplicationIcon(String packageName) throws NameNotFoundException {
203         return null;
204     }
205 
getActivityLogo(ComponentName componentName)206     @Override public Drawable getActivityLogo(ComponentName componentName) throws NameNotFoundException {
207         return null;
208     }
209 
getActivityLogo(Intent intent)210     @Override public Drawable getActivityLogo(Intent intent) throws NameNotFoundException {
211         return null;
212     }
213 
getApplicationLogo(ApplicationInfo applicationInfo)214     @Override public Drawable getApplicationLogo(ApplicationInfo applicationInfo) {
215         return null;
216     }
217 
getApplicationLogo(String s)218     @Override public Drawable getApplicationLogo(String s) throws NameNotFoundException {
219         return null;
220     }
221 
getText(String packageName, int resid, ApplicationInfo appInfo)222     @Override public CharSequence getText(String packageName, int resid, ApplicationInfo appInfo) {
223         return null;
224     }
225 
getXml(String packageName, int resid, ApplicationInfo appInfo)226     @Override public XmlResourceParser getXml(String packageName, int resid, ApplicationInfo appInfo) {
227         return null;
228     }
229 
getApplicationLabel(ApplicationInfo info)230     @Override public CharSequence getApplicationLabel(ApplicationInfo info) {
231         return null;
232     }
233 
234     @Override
getResourcesForActivity(ComponentName activityName)235     public Resources getResourcesForActivity(ComponentName activityName) throws NameNotFoundException {
236         return null;
237     }
238 
239     @Override
getResourcesForApplication(ApplicationInfo app)240     public Resources getResourcesForApplication(ApplicationInfo app) throws NameNotFoundException {
241         return null;
242     }
243 
244     @Override
getResourcesForApplication(String appPackageName)245     public Resources getResourcesForApplication(String appPackageName) throws NameNotFoundException {
246         return null;
247     }
248 
getInstallerPackageName(String packageName)249     @Override public String getInstallerPackageName(String packageName) {
250         return null;
251     }
252 
addPackageToPreferred(String packageName)253     @Override public void addPackageToPreferred(String packageName) {
254     }
255 
removePackageFromPreferred(String packageName)256     @Override public void removePackageFromPreferred(String packageName) {
257     }
258 
getPreferredPackages(int flags)259     @Override public List<PackageInfo> getPreferredPackages(int flags) {
260         return null;
261     }
262 
263     @Override
addPreferredActivity(IntentFilter filter, int match, ComponentName[] set, ComponentName activity)264     public void addPreferredActivity(IntentFilter filter, int match, ComponentName[] set, ComponentName activity) {
265     }
266 
clearPackagePreferredActivities(String packageName)267     @Override public void clearPackagePreferredActivities(String packageName) {
268     }
269 
270     @Override
getPreferredActivities(List<IntentFilter> outFilters, List<ComponentName> outActivities, String packageName)271     public int getPreferredActivities(List<IntentFilter> outFilters, List<ComponentName> outActivities, String packageName) {
272         return 0;
273     }
274 
setComponentEnabledSetting(ComponentName componentName, int newState, int flags)275     @Override public void setComponentEnabledSetting(ComponentName componentName, int newState, int flags) {
276     }
277 
getComponentEnabledSetting(ComponentName componentName)278     @Override public int getComponentEnabledSetting(ComponentName componentName) {
279         return 0;
280     }
281 
setApplicationEnabledSetting(String packageName, int newState, int flags)282     @Override public void setApplicationEnabledSetting(String packageName, int newState, int flags) {
283     }
284 
getApplicationEnabledSetting(String packageName)285     @Override public int getApplicationEnabledSetting(String packageName) {
286         return 0;
287     }
288 
isSafeMode()289     @Override public boolean isSafeMode() {
290         return false;
291     }
292 
verifyPendingInstall(int id, int verificationCode)293     @Override public void verifyPendingInstall(int id, int verificationCode) {
294     }
295 
setInstallerPackageName(String targetPackage, String installerPackageName)296     @Override public void setInstallerPackageName(String targetPackage, String installerPackageName) {
297     }
298 
extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay)299     @Override public void extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay) {
300     }
301 
getPackagesHoldingPermissions(String[] permissions, int flags)302     @Override public List<PackageInfo> getPackagesHoldingPermissions(String[] permissions, int flags) {
303         return null;
304     }
305 }
306