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