1 /*
2  * Copyright (C) 2015 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 com.android.layoutlib.bridge.android;
18 
19 import android.annotation.NonNull;
20 import android.app.PackageInstallObserver;
21 import android.content.ComponentName;
22 import android.content.Intent;
23 import android.content.IntentFilter;
24 import android.content.IntentSender;
25 import android.content.pm.ActivityInfo;
26 import android.content.pm.ApplicationInfo;
27 import android.content.pm.EphemeralApplicationInfo;
28 import android.content.pm.FeatureInfo;
29 import android.content.pm.IPackageDataObserver;
30 import android.content.pm.IPackageDeleteObserver;
31 import android.content.pm.IPackageInstallObserver;
32 import android.content.pm.IPackageStatsObserver;
33 import android.content.pm.InstrumentationInfo;
34 import android.content.pm.IntentFilterVerificationInfo;
35 import android.content.pm.KeySet;
36 import android.content.pm.PackageInfo;
37 import android.content.pm.PackageInstaller;
38 import android.content.pm.PackageItemInfo;
39 import android.content.pm.PackageManager;
40 import android.content.pm.PermissionGroupInfo;
41 import android.content.pm.PermissionInfo;
42 import android.content.pm.ProviderInfo;
43 import android.content.pm.ResolveInfo;
44 import android.content.pm.ServiceInfo;
45 import android.content.pm.VerifierDeviceIdentity;
46 import android.content.res.Resources;
47 import android.content.res.XmlResourceParser;
48 import android.graphics.Rect;
49 import android.graphics.drawable.Drawable;
50 import android.net.Uri;
51 import android.os.Handler;
52 import android.os.RemoteException;
53 import android.os.UserHandle;
54 import android.os.storage.VolumeInfo;
55 import java.util.List;
56 
57 /**
58  * An implementation of {@link PackageManager} that does nothing.
59  */
60 @SuppressWarnings("deprecation")
61 public class BridgePackageManager extends PackageManager {
62     @Override
getPackageInfo(String packageName, int flags)63     public PackageInfo getPackageInfo(String packageName, int flags) throws NameNotFoundException {
64         return null;
65     }
66 
67     @Override
getPackageInfoAsUser(String packageName, int flags, int userId)68     public PackageInfo getPackageInfoAsUser(String packageName, int flags, int userId)
69             throws NameNotFoundException {
70         return null;
71     }
72 
73     @Override
currentToCanonicalPackageNames(String[] names)74     public String[] currentToCanonicalPackageNames(String[] names) {
75         return new String[0];
76     }
77 
78     @Override
canonicalToCurrentPackageNames(String[] names)79     public String[] canonicalToCurrentPackageNames(String[] names) {
80         return new String[0];
81     }
82 
83     @Override
getLaunchIntentForPackage(String packageName)84     public Intent getLaunchIntentForPackage(String packageName) {
85         return null;
86     }
87 
88     @Override
getLeanbackLaunchIntentForPackage(String packageName)89     public Intent getLeanbackLaunchIntentForPackage(String packageName) {
90         return null;
91     }
92 
93     @Override
getPackageGids(String packageName)94     public int[] getPackageGids(String packageName) throws NameNotFoundException {
95         return new int[0];
96     }
97 
98     @Override
getPackageGids(String packageName, int flags)99     public int[] getPackageGids(String packageName, int flags) throws NameNotFoundException {
100         return new int[0];
101     }
102 
103     @Override
getPackageUid(String packageName, int flags)104     public int getPackageUid(String packageName, int flags) throws NameNotFoundException {
105         return 0;
106     }
107 
108     @Override
getPackageUidAsUser(String packageName, int userHandle)109     public int getPackageUidAsUser(String packageName, int userHandle) throws NameNotFoundException {
110         return 0;
111     }
112 
113     @Override
getPackageUidAsUser(String packageName, int flags, int userHandle)114     public int getPackageUidAsUser(String packageName, int flags, int userHandle) throws NameNotFoundException {
115         return 0;
116     }
117 
118     @Override
getPermissionInfo(String name, int flags)119     public PermissionInfo getPermissionInfo(String name, int flags) throws NameNotFoundException {
120         return null;
121     }
122 
123     @Override
queryPermissionsByGroup(String group, int flags)124     public List<PermissionInfo> queryPermissionsByGroup(String group, int flags)
125             throws NameNotFoundException {
126         return null;
127     }
128 
129     @Override
getPermissionGroupInfo(String name, int flags)130     public PermissionGroupInfo getPermissionGroupInfo(String name, int flags)
131             throws NameNotFoundException {
132         return null;
133     }
134 
135     @Override
getAllPermissionGroups(int flags)136     public List<PermissionGroupInfo> getAllPermissionGroups(int flags) {
137         return null;
138     }
139 
140     @Override
getApplicationInfo(String packageName, int flags)141     public ApplicationInfo getApplicationInfo(String packageName, int flags)
142             throws NameNotFoundException {
143         return null;
144     }
145 
146     @Override
getApplicationInfoAsUser(String packageName, int flags, int userId)147     public ApplicationInfo getApplicationInfoAsUser(String packageName, int flags, int userId)
148             throws NameNotFoundException {
149         return null;
150     }
151 
152     @Override
getActivityInfo(ComponentName component, int flags)153     public ActivityInfo getActivityInfo(ComponentName component, int flags)
154             throws NameNotFoundException {
155         return null;
156     }
157 
158     @Override
getReceiverInfo(ComponentName component, int flags)159     public ActivityInfo getReceiverInfo(ComponentName component, int flags)
160             throws NameNotFoundException {
161         return null;
162     }
163 
164     @Override
getServiceInfo(ComponentName component, int flags)165     public ServiceInfo getServiceInfo(ComponentName component, int flags)
166             throws NameNotFoundException {
167         return null;
168     }
169 
170     @Override
getProviderInfo(ComponentName component, int flags)171     public ProviderInfo getProviderInfo(ComponentName component, int flags)
172             throws NameNotFoundException {
173         return null;
174     }
175 
176     @Override
getInstalledPackages(int flags)177     public List<PackageInfo> getInstalledPackages(int flags) {
178         return null;
179     }
180 
181     @Override
getPackagesHoldingPermissions(String[] permissions, int flags)182     public List<PackageInfo> getPackagesHoldingPermissions(String[] permissions, int flags) {
183         return null;
184     }
185 
186     @Override
getInstalledPackagesAsUser(int flags, int userId)187     public List<PackageInfo> getInstalledPackagesAsUser(int flags, int userId) {
188         return null;
189     }
190 
191     @Override
checkPermission(String permName, String pkgName)192     public int checkPermission(String permName, String pkgName) {
193         return 0;
194     }
195 
196     @Override
isPermissionRevokedByPolicy(String permName, String pkgName)197     public boolean isPermissionRevokedByPolicy(String permName, String pkgName) {
198         return false;
199     }
200 
201     @Override
getPermissionControllerPackageName()202     public String getPermissionControllerPackageName() {
203         return null;
204     }
205 
206     @Override
addPermission(PermissionInfo info)207     public boolean addPermission(PermissionInfo info) {
208         return false;
209     }
210 
211     @Override
addPermissionAsync(PermissionInfo info)212     public boolean addPermissionAsync(PermissionInfo info) {
213         return false;
214     }
215 
216     @Override
removePermission(String name)217     public void removePermission(String name) {
218     }
219 
220     @Override
grantRuntimePermission(String packageName, String permissionName, UserHandle user)221     public void grantRuntimePermission(String packageName, String permissionName, UserHandle user) {
222     }
223 
224     @Override
revokeRuntimePermission(String packageName, String permissionName, UserHandle user)225     public void revokeRuntimePermission(String packageName, String permissionName,
226             UserHandle user) {
227     }
228 
229     @Override
getPermissionFlags(String permissionName, String packageName, UserHandle user)230     public int getPermissionFlags(String permissionName, String packageName, UserHandle user) {
231         return 0;
232     }
233 
234     @Override
updatePermissionFlags(String permissionName, String packageName, int flagMask, int flagValues, UserHandle user)235     public void updatePermissionFlags(String permissionName, String packageName, int flagMask,
236             int flagValues, UserHandle user) {
237     }
238 
239     @Override
shouldShowRequestPermissionRationale(String permission)240     public boolean shouldShowRequestPermissionRationale(String permission) {
241         return false;
242     }
243 
244     @Override
checkSignatures(String pkg1, String pkg2)245     public int checkSignatures(String pkg1, String pkg2) {
246         return 0;
247     }
248 
249     @Override
checkSignatures(int uid1, int uid2)250     public int checkSignatures(int uid1, int uid2) {
251         return 0;
252     }
253 
254     @Override
getPackagesForUid(int uid)255     public String[] getPackagesForUid(int uid) {
256         return new String[0];
257     }
258 
259     @Override
getNameForUid(int uid)260     public String getNameForUid(int uid) {
261         return null;
262     }
263 
264     @Override
getUidForSharedUser(String sharedUserName)265     public int getUidForSharedUser(String sharedUserName) throws NameNotFoundException {
266         return 0;
267     }
268 
269     @Override
getInstalledApplications(int flags)270     public List<ApplicationInfo> getInstalledApplications(int flags) {
271         return null;
272     }
273 
274     @Override
getEphemeralApplications()275     public List<EphemeralApplicationInfo> getEphemeralApplications() {
276         return null;
277     }
278 
279     @Override
getEphemeralApplicationIcon(String packageName)280     public Drawable getEphemeralApplicationIcon(String packageName) {
281         throw new UnsupportedOperationException();
282     }
283 
284     @Override
getEphemeralCookie()285     public byte[] getEphemeralCookie() {
286         return new byte[0];
287     }
288 
289     @Override
isEphemeralApplication()290     public boolean isEphemeralApplication() {
291         return false;
292     }
293 
294     @Override
getEphemeralCookieMaxSizeBytes()295     public int getEphemeralCookieMaxSizeBytes() {
296         return 0;
297     }
298 
299     @Override
setEphemeralCookie(@onNull byte[] cookie)300     public boolean setEphemeralCookie(@NonNull byte[] cookie) {
301         return false;
302     }
303 
304     @Override
getSystemSharedLibraryNames()305     public String[] getSystemSharedLibraryNames() {
306         return new String[0];
307     }
308 
309     @Override
getServicesSystemSharedLibraryPackageName()310     public String getServicesSystemSharedLibraryPackageName() {
311         return null;
312     }
313 
314     @Override
getSharedSystemSharedLibraryPackageName()315     public @NonNull String getSharedSystemSharedLibraryPackageName() {
316         return null;
317     }
318 
319     @Override
getSystemAvailableFeatures()320     public FeatureInfo[] getSystemAvailableFeatures() {
321         return new FeatureInfo[0];
322     }
323 
324     @Override
hasSystemFeature(String name)325     public boolean hasSystemFeature(String name) {
326         return false;
327     }
328 
329     @Override
hasSystemFeature(String name, int version)330     public boolean hasSystemFeature(String name, int version) {
331         return false;
332     }
333 
334     @Override
resolveActivity(Intent intent, int flags)335     public ResolveInfo resolveActivity(Intent intent, int flags) {
336         return null;
337     }
338 
339     @Override
resolveActivityAsUser(Intent intent, int flags, int userId)340     public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) {
341         return null;
342     }
343 
344     @Override
queryIntentActivities(Intent intent, int flags)345     public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) {
346         return null;
347     }
348 
349     @Override
queryIntentActivitiesAsUser(Intent intent, int flags, int userId)350     public List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent, int flags, int userId) {
351         return null;
352     }
353 
354     @Override
queryIntentActivityOptions(ComponentName caller, Intent[] specifics, Intent intent, int flags)355     public List<ResolveInfo> queryIntentActivityOptions(ComponentName caller, Intent[] specifics,
356             Intent intent, int flags) {
357         return null;
358     }
359 
360     @Override
queryBroadcastReceivers(Intent intent, int flags)361     public List<ResolveInfo> queryBroadcastReceivers(Intent intent, int flags) {
362         return null;
363     }
364 
365     @Override
queryBroadcastReceiversAsUser(Intent intent, int flags, int userId)366     public List<ResolveInfo> queryBroadcastReceiversAsUser(Intent intent, int flags, int userId) {
367         return null;
368     }
369 
370     @Override
resolveService(Intent intent, int flags)371     public ResolveInfo resolveService(Intent intent, int flags) {
372         return null;
373     }
374 
375     @Override
queryIntentServices(Intent intent, int flags)376     public List<ResolveInfo> queryIntentServices(Intent intent, int flags) {
377         return null;
378     }
379 
380     @Override
queryIntentServicesAsUser(Intent intent, int flags, int userId)381     public List<ResolveInfo> queryIntentServicesAsUser(Intent intent, int flags, int userId) {
382         return null;
383     }
384 
385     @Override
queryIntentContentProvidersAsUser(Intent intent, int flags, int userId)386     public List<ResolveInfo> queryIntentContentProvidersAsUser(Intent intent, int flags,
387             int userId) {
388         return null;
389     }
390 
391     @Override
queryIntentContentProviders(Intent intent, int flags)392     public List<ResolveInfo> queryIntentContentProviders(Intent intent, int flags) {
393         return null;
394     }
395 
396     @Override
resolveContentProvider(String name, int flags)397     public ProviderInfo resolveContentProvider(String name, int flags) {
398         return null;
399     }
400 
401     @Override
resolveContentProviderAsUser(String name, int flags, int userId)402     public ProviderInfo resolveContentProviderAsUser(String name, int flags, int userId) {
403         return null;
404     }
405 
406     @Override
queryContentProviders(String processName, int uid, int flags)407     public List<ProviderInfo> queryContentProviders(String processName, int uid, int flags) {
408         return null;
409     }
410 
411     @Override
getInstrumentationInfo(ComponentName className, int flags)412     public InstrumentationInfo getInstrumentationInfo(ComponentName className, int flags)
413             throws NameNotFoundException {
414         return null;
415     }
416 
417     @Override
queryInstrumentation(String targetPackage, int flags)418     public List<InstrumentationInfo> queryInstrumentation(String targetPackage, int flags) {
419         return null;
420     }
421 
422     @Override
getDrawable(String packageName, int resid, ApplicationInfo appInfo)423     public Drawable getDrawable(String packageName, int resid, ApplicationInfo appInfo) {
424         return null;
425     }
426 
427     @Override
getActivityIcon(ComponentName activityName)428     public Drawable getActivityIcon(ComponentName activityName) throws NameNotFoundException {
429         return null;
430     }
431 
432     @Override
getActivityIcon(Intent intent)433     public Drawable getActivityIcon(Intent intent) throws NameNotFoundException {
434         return null;
435     }
436 
437     @Override
getActivityBanner(ComponentName activityName)438     public Drawable getActivityBanner(ComponentName activityName) throws NameNotFoundException {
439         return null;
440     }
441 
442     @Override
getActivityBanner(Intent intent)443     public Drawable getActivityBanner(Intent intent) throws NameNotFoundException {
444         return null;
445     }
446 
447     @Override
getDefaultActivityIcon()448     public Drawable getDefaultActivityIcon() {
449         return null;
450     }
451 
452     @Override
getApplicationIcon(ApplicationInfo info)453     public Drawable getApplicationIcon(ApplicationInfo info) {
454         return null;
455     }
456 
457     @Override
getApplicationIcon(String packageName)458     public Drawable getApplicationIcon(String packageName) throws NameNotFoundException {
459         return null;
460     }
461 
462     @Override
getApplicationBanner(ApplicationInfo info)463     public Drawable getApplicationBanner(ApplicationInfo info) {
464         return null;
465     }
466 
467     @Override
getApplicationBanner(String packageName)468     public Drawable getApplicationBanner(String packageName) throws NameNotFoundException {
469         return null;
470     }
471 
472     @Override
getActivityLogo(ComponentName activityName)473     public Drawable getActivityLogo(ComponentName activityName) throws NameNotFoundException {
474         return null;
475     }
476 
477     @Override
getActivityLogo(Intent intent)478     public Drawable getActivityLogo(Intent intent) throws NameNotFoundException {
479         return null;
480     }
481 
482     @Override
getApplicationLogo(ApplicationInfo info)483     public Drawable getApplicationLogo(ApplicationInfo info) {
484         return null;
485     }
486 
487     @Override
getApplicationLogo(String packageName)488     public Drawable getApplicationLogo(String packageName) throws NameNotFoundException {
489         return null;
490     }
491 
492     @Override
getManagedUserBadgedDrawable(Drawable drawable, Rect badgeLocation, int badgeDensity)493     public Drawable getManagedUserBadgedDrawable(Drawable drawable, Rect badgeLocation,
494         int badgeDensity) {
495         return null;
496     }
497 
498     @Override
getUserBadgedIcon(Drawable icon, UserHandle user)499     public Drawable getUserBadgedIcon(Drawable icon, UserHandle user) {
500         return null;
501     }
502 
503     @Override
getUserBadgedDrawableForDensity(Drawable drawable, UserHandle user, Rect badgeLocation, int badgeDensity)504     public Drawable getUserBadgedDrawableForDensity(Drawable drawable, UserHandle user,
505             Rect badgeLocation, int badgeDensity) {
506         return null;
507     }
508 
509     @Override
getUserBadgeForDensity(UserHandle user, int density)510     public Drawable getUserBadgeForDensity(UserHandle user, int density) {
511         return null;
512     }
513 
514     @Override
getUserBadgeForDensityNoBackground(UserHandle user, int density)515     public Drawable getUserBadgeForDensityNoBackground(UserHandle user, int density) {
516         return null;
517     }
518 
519     @Override
getUserBadgedLabel(CharSequence label, UserHandle user)520     public CharSequence getUserBadgedLabel(CharSequence label, UserHandle user) {
521         return null;
522     }
523 
524     @Override
getText(String packageName, int resid, ApplicationInfo appInfo)525     public CharSequence getText(String packageName, int resid, ApplicationInfo appInfo) {
526         return null;
527     }
528 
529     @Override
getXml(String packageName, int resid, ApplicationInfo appInfo)530     public XmlResourceParser getXml(String packageName, int resid, ApplicationInfo appInfo) {
531         return null;
532     }
533 
534     @Override
getApplicationLabel(ApplicationInfo info)535     public CharSequence getApplicationLabel(ApplicationInfo info) {
536         return null;
537     }
538 
539     @Override
getResourcesForActivity(ComponentName activityName)540     public Resources getResourcesForActivity(ComponentName activityName)
541             throws NameNotFoundException {
542         return null;
543     }
544 
545     @Override
getResourcesForApplication(ApplicationInfo app)546     public Resources getResourcesForApplication(ApplicationInfo app) throws NameNotFoundException {
547         return null;
548     }
549 
550     @Override
getResourcesForApplication(String appPackageName)551     public Resources getResourcesForApplication(String appPackageName)
552             throws NameNotFoundException {
553         return null;
554     }
555 
556     @Override
getResourcesForApplicationAsUser(String appPackageName, int userId)557     public Resources getResourcesForApplicationAsUser(String appPackageName, int userId)
558             throws NameNotFoundException {
559         return null;
560     }
561 
562     @Override
installPackage(Uri packageURI, IPackageInstallObserver observer, int flags, String installerPackageName)563     public void installPackage(Uri packageURI, IPackageInstallObserver observer, int flags,
564             String installerPackageName) {
565     }
566 
567     @Override
installPackage(Uri packageURI, PackageInstallObserver observer, int flags, String installerPackageName)568     public void installPackage(Uri packageURI, PackageInstallObserver observer, int flags,
569             String installerPackageName) {
570     }
571 
572     @Override
installExistingPackage(String packageName)573     public int installExistingPackage(String packageName) throws NameNotFoundException {
574         return 0;
575     }
576 
577     @Override
installExistingPackageAsUser(String packageName, int userId)578     public int installExistingPackageAsUser(String packageName, int userId)
579             throws NameNotFoundException {
580         return 0;
581     }
582 
583     @Override
verifyPendingInstall(int id, int verificationCode)584     public void verifyPendingInstall(int id, int verificationCode) {
585     }
586 
587     @Override
extendVerificationTimeout(int id, int verificationCodeAtTimeout, long millisecondsToDelay)588     public void extendVerificationTimeout(int id, int verificationCodeAtTimeout,
589             long millisecondsToDelay) {
590     }
591 
592     @Override
verifyIntentFilter(int verificationId, int verificationCode, List<String> outFailedDomains)593     public void verifyIntentFilter(int verificationId, int verificationCode,
594             List<String> outFailedDomains) {
595     }
596 
597     @Override
getIntentVerificationStatusAsUser(String packageName, int userId)598     public int getIntentVerificationStatusAsUser(String packageName, int userId) {
599         return 0;
600     }
601 
602     @Override
updateIntentVerificationStatusAsUser(String packageName, int status, int userId)603     public boolean updateIntentVerificationStatusAsUser(String packageName, int status, int userId) {
604         return false;
605     }
606 
607     @Override
getIntentFilterVerifications(String packageName)608     public List<IntentFilterVerificationInfo> getIntentFilterVerifications(String packageName) {
609         return null;
610     }
611 
612     @Override
getAllIntentFilters(String packageName)613     public List<IntentFilter> getAllIntentFilters(String packageName) {
614         return null;
615     }
616 
617     @Override
getDefaultBrowserPackageNameAsUser(int userId)618     public String getDefaultBrowserPackageNameAsUser(int userId) {
619         return null;
620     }
621 
622     @Override
setDefaultBrowserPackageNameAsUser(String packageName, int userId)623     public boolean setDefaultBrowserPackageNameAsUser(String packageName, int userId) {
624         return false;
625     }
626 
627     @Override
setInstallerPackageName(String targetPackage, String installerPackageName)628     public void setInstallerPackageName(String targetPackage, String installerPackageName) {
629     }
630 
631     @Override
deletePackage(String packageName, IPackageDeleteObserver observer, int flags)632     public void deletePackage(String packageName, IPackageDeleteObserver observer, int flags) {
633     }
634 
635     @Override
deletePackageAsUser(String packageName, IPackageDeleteObserver observer, int flags, int userId)636     public void deletePackageAsUser(String packageName, IPackageDeleteObserver observer, int flags,
637             int userId) {
638     }
639 
640     @Override
getInstallerPackageName(String packageName)641     public String getInstallerPackageName(String packageName) {
642         return null;
643     }
644 
645     @Override
clearApplicationUserData(String packageName, IPackageDataObserver observer)646     public void clearApplicationUserData(String packageName, IPackageDataObserver observer) {
647     }
648 
649     @Override
deleteApplicationCacheFiles(String packageName, IPackageDataObserver observer)650     public void deleteApplicationCacheFiles(String packageName, IPackageDataObserver observer) {
651     }
652 
653     @Override
deleteApplicationCacheFilesAsUser(String packageName, int userId, IPackageDataObserver observer)654     public void deleteApplicationCacheFilesAsUser(String packageName, int userId,
655             IPackageDataObserver observer) {
656     }
657 
658     @Override
freeStorageAndNotify(String volumeUuid, long freeStorageSize, IPackageDataObserver observer)659     public void freeStorageAndNotify(String volumeUuid, long freeStorageSize,
660             IPackageDataObserver observer) {
661     }
662 
663     @Override
freeStorage(String volumeUuid, long freeStorageSize, IntentSender pi)664     public void freeStorage(String volumeUuid, long freeStorageSize, IntentSender pi) {
665     }
666 
667     @Override
getPackageSizeInfoAsUser(String packageName, int userHandle, IPackageStatsObserver observer)668     public void getPackageSizeInfoAsUser(String packageName, int userHandle,
669             IPackageStatsObserver observer) {
670     }
671 
672     @Override
addPackageToPreferred(String packageName)673     public void addPackageToPreferred(String packageName) {
674     }
675 
676     @Override
removePackageFromPreferred(String packageName)677     public void removePackageFromPreferred(String packageName) {
678     }
679 
680     @Override
getPreferredPackages(int flags)681     public List<PackageInfo> getPreferredPackages(int flags) {
682         return null;
683     }
684 
685     @Override
addPreferredActivity(IntentFilter filter, int match, ComponentName[] set, ComponentName activity)686     public void addPreferredActivity(IntentFilter filter, int match, ComponentName[] set,
687             ComponentName activity) {
688     }
689 
690     @Override
replacePreferredActivity(IntentFilter filter, int match, ComponentName[] set, ComponentName activity)691     public void replacePreferredActivity(IntentFilter filter, int match, ComponentName[] set,
692             ComponentName activity) {
693     }
694 
695     @Override
clearPackagePreferredActivities(String packageName)696     public void clearPackagePreferredActivities(String packageName) {
697     }
698 
699     @Override
getPreferredActivities(List<IntentFilter> outFilters, List<ComponentName> outActivities, String packageName)700     public int getPreferredActivities(List<IntentFilter> outFilters,
701             List<ComponentName> outActivities, String packageName) {
702         return 0;
703     }
704 
705     @Override
getHomeActivities(List<ResolveInfo> outActivities)706     public ComponentName getHomeActivities(List<ResolveInfo> outActivities) {
707         return null;
708     }
709 
710     @Override
setComponentEnabledSetting(ComponentName componentName, int newState, int flags)711     public void setComponentEnabledSetting(ComponentName componentName, int newState, int flags) {
712     }
713 
714     @Override
getComponentEnabledSetting(ComponentName componentName)715     public int getComponentEnabledSetting(ComponentName componentName) {
716         return 0;
717     }
718 
719     @Override
setApplicationEnabledSetting(String packageName, int newState, int flags)720     public void setApplicationEnabledSetting(String packageName, int newState, int flags) {
721     }
722 
723     @Override
getApplicationEnabledSetting(String packageName)724     public int getApplicationEnabledSetting(String packageName) {
725         return 0;
726     }
727 
728     @Override
flushPackageRestrictionsAsUser(int userId)729     public void flushPackageRestrictionsAsUser(int userId) {
730     }
731 
732     @Override
setApplicationHiddenSettingAsUser(String packageName, boolean hidden, UserHandle userHandle)733     public boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden,
734             UserHandle userHandle) {
735         return false;
736     }
737 
738     @Override
getApplicationHiddenSettingAsUser(String packageName, UserHandle userHandle)739     public boolean getApplicationHiddenSettingAsUser(String packageName, UserHandle userHandle) {
740         return false;
741     }
742 
743     @Override
isSafeMode()744     public boolean isSafeMode() {
745         return false;
746     }
747 
748     @Override
addOnPermissionsChangeListener(OnPermissionsChangedListener listener)749     public void addOnPermissionsChangeListener(OnPermissionsChangedListener listener) {
750     }
751 
752     @Override
removeOnPermissionsChangeListener(OnPermissionsChangedListener listener)753     public void removeOnPermissionsChangeListener(OnPermissionsChangedListener listener) {
754     }
755 
756     @Override
getKeySetByAlias(String packageName, String alias)757     public KeySet getKeySetByAlias(String packageName, String alias) {
758         return null;
759     }
760 
761     @Override
getSigningKeySet(String packageName)762     public KeySet getSigningKeySet(String packageName) {
763         return null;
764     }
765 
766     @Override
isSignedBy(String packageName, KeySet ks)767     public boolean isSignedBy(String packageName, KeySet ks) {
768         return false;
769     }
770 
771     @Override
isSignedByExactly(String packageName, KeySet ks)772     public boolean isSignedByExactly(String packageName, KeySet ks) {
773         return false;
774     }
775 
776     @Override
setPackagesSuspendedAsUser(String[] packageNames, boolean suspended, int userId)777     public String[] setPackagesSuspendedAsUser(String[] packageNames, boolean suspended,
778             int userId) {
779         return new String[]{};
780     }
781 
782     @Override
isPackageSuspendedForUser(String packageName, int userId)783     public boolean isPackageSuspendedForUser(String packageName, int userId) {
784         return false;
785     }
786 
787     @Override
getMoveStatus(int moveId)788     public int getMoveStatus(int moveId) {
789         return 0;
790     }
791 
792     @Override
registerMoveCallback(MoveCallback callback, Handler handler)793     public void registerMoveCallback(MoveCallback callback, Handler handler) {
794     }
795 
796     @Override
unregisterMoveCallback(MoveCallback callback)797     public void unregisterMoveCallback(MoveCallback callback) {
798     }
799 
800     @Override
movePackage(String packageName, VolumeInfo vol)801     public int movePackage(String packageName, VolumeInfo vol) {
802         return 0;
803     }
804 
805     @Override
getPackageCurrentVolume(ApplicationInfo app)806     public VolumeInfo getPackageCurrentVolume(ApplicationInfo app) {
807         return null;
808     }
809 
810     @Override
getPackageCandidateVolumes(ApplicationInfo app)811     public List<VolumeInfo> getPackageCandidateVolumes(ApplicationInfo app) {
812         return null;
813     }
814 
815     @Override
movePrimaryStorage(VolumeInfo vol)816     public int movePrimaryStorage(VolumeInfo vol) {
817         return 0;
818     }
819 
820     @Override
getPrimaryStorageCurrentVolume()821     public VolumeInfo getPrimaryStorageCurrentVolume() {
822         return null;
823     }
824 
825     @Override
getPrimaryStorageCandidateVolumes()826     public List<VolumeInfo> getPrimaryStorageCandidateVolumes() {
827         return null;
828     }
829 
830     @Override
getVerifierDeviceIdentity()831     public VerifierDeviceIdentity getVerifierDeviceIdentity() {
832         return null;
833     }
834 
835     @Override
isUpgrade()836     public boolean isUpgrade() {
837         return false;
838     }
839 
840     @Override
getPackageInstaller()841     public PackageInstaller getPackageInstaller() {
842         return null;
843     }
844 
845     @Override
addCrossProfileIntentFilter(IntentFilter filter, int sourceUserId, int targetUserId, int flags)846     public void addCrossProfileIntentFilter(IntentFilter filter, int sourceUserId, int targetUserId,
847             int flags) {
848     }
849 
850     @Override
clearCrossProfileIntentFilters(int sourceUserId)851     public void clearCrossProfileIntentFilters(int sourceUserId) {
852     }
853 
854     @Override
loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo)855     public Drawable loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) {
856         return null;
857     }
858 
859     @Override
loadUnbadgedItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo)860     public Drawable loadUnbadgedItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) {
861         return null;
862     }
863 
864     @Override
isPackageAvailable(String packageName)865     public boolean isPackageAvailable(String packageName) {
866         return false;
867     }
868 }
869