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