• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2006 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.content;
18 
19 import android.annotation.NonNull;
20 import android.annotation.Nullable;
21 import android.annotation.RequiresPermission;
22 import android.annotation.SystemApi;
23 import android.annotation.TestApi;
24 import android.annotation.UiContext;
25 import android.app.IApplicationThread;
26 import android.app.IServiceConnection;
27 import android.compat.annotation.UnsupportedAppUsage;
28 import android.content.pm.ApplicationInfo;
29 import android.content.pm.PackageManager;
30 import android.content.res.AssetManager;
31 import android.content.res.Configuration;
32 import android.content.res.Resources;
33 import android.database.DatabaseErrorHandler;
34 import android.database.sqlite.SQLiteDatabase;
35 import android.database.sqlite.SQLiteDatabase.CursorFactory;
36 import android.graphics.Bitmap;
37 import android.graphics.drawable.Drawable;
38 import android.net.Uri;
39 import android.os.Build;
40 import android.os.Bundle;
41 import android.os.Handler;
42 import android.os.IBinder;
43 import android.os.Looper;
44 import android.os.UserHandle;
45 import android.view.Display;
46 import android.view.DisplayAdjustments;
47 import android.view.WindowManager.LayoutParams.WindowType;
48 import android.view.autofill.AutofillManager.AutofillClient;
49 
50 import java.io.File;
51 import java.io.FileInputStream;
52 import java.io.FileNotFoundException;
53 import java.io.FileOutputStream;
54 import java.io.IOException;
55 import java.io.InputStream;
56 import java.util.List;
57 import java.util.concurrent.Executor;
58 
59 /**
60  * Proxying implementation of Context that simply delegates all of its calls to
61  * another Context.  Can be subclassed to modify behavior without changing
62  * the original Context.
63  */
64 public class ContextWrapper extends Context {
65     @UnsupportedAppUsage
66     Context mBase;
67 
ContextWrapper(Context base)68     public ContextWrapper(Context base) {
69         mBase = base;
70     }
71 
72     /**
73      * Set the base context for this ContextWrapper.  All calls will then be
74      * delegated to the base context.  Throws
75      * IllegalStateException if a base context has already been set.
76      *
77      * @param base The new base context for this wrapper.
78      */
attachBaseContext(Context base)79     protected void attachBaseContext(Context base) {
80         if (mBase != null) {
81             throw new IllegalStateException("Base context already set");
82         }
83         mBase = base;
84     }
85 
86     /**
87      * @return the base context as set by the constructor or setBaseContext
88      */
getBaseContext()89     public Context getBaseContext() {
90         return mBase;
91     }
92 
93     @Override
getAssets()94     public AssetManager getAssets() {
95         return mBase.getAssets();
96     }
97 
98     @Override
getResources()99     public Resources getResources() {
100         return mBase.getResources();
101     }
102 
103     @Override
getPackageManager()104     public PackageManager getPackageManager() {
105         return mBase.getPackageManager();
106     }
107 
108     @Override
getContentResolver()109     public ContentResolver getContentResolver() {
110         return mBase.getContentResolver();
111     }
112 
113     @Override
getMainLooper()114     public Looper getMainLooper() {
115         return mBase.getMainLooper();
116     }
117 
118     @Override
getMainExecutor()119     public Executor getMainExecutor() {
120         return mBase.getMainExecutor();
121     }
122 
123     @Override
getApplicationContext()124     public Context getApplicationContext() {
125         return mBase.getApplicationContext();
126     }
127 
128     @Override
setTheme(int resid)129     public void setTheme(int resid) {
130         mBase.setTheme(resid);
131     }
132 
133     /** @hide */
134     @Override
135     @UnsupportedAppUsage
getThemeResId()136     public int getThemeResId() {
137         return mBase.getThemeResId();
138     }
139 
140     @Override
getTheme()141     public Resources.Theme getTheme() {
142         return mBase.getTheme();
143     }
144 
145     @Override
getClassLoader()146     public ClassLoader getClassLoader() {
147         return mBase.getClassLoader();
148     }
149 
150     @Override
getPackageName()151     public String getPackageName() {
152         return mBase.getPackageName();
153     }
154 
155     /** @hide */
156     @Override
157     @UnsupportedAppUsage
getBasePackageName()158     public String getBasePackageName() {
159         return mBase.getBasePackageName();
160     }
161 
162     /** @hide */
163     @Override
getOpPackageName()164     public String getOpPackageName() {
165         return mBase.getOpPackageName();
166     }
167 
168     /** @hide */
169     @Override
getAttributionTag()170     public @Nullable String getAttributionTag() {
171         return mBase.getAttributionTag();
172     }
173 
174     @Override
getParams()175     public @Nullable ContextParams getParams() {
176         return mBase.getParams();
177     }
178 
179     @Override
getApplicationInfo()180     public ApplicationInfo getApplicationInfo() {
181         return mBase.getApplicationInfo();
182     }
183 
184     @Override
getPackageResourcePath()185     public String getPackageResourcePath() {
186         return mBase.getPackageResourcePath();
187     }
188 
189     @Override
getPackageCodePath()190     public String getPackageCodePath() {
191         return mBase.getPackageCodePath();
192     }
193 
194     @Override
getSharedPreferences(String name, int mode)195     public SharedPreferences getSharedPreferences(String name, int mode) {
196         return mBase.getSharedPreferences(name, mode);
197     }
198 
199     /** @removed */
200     @Override
getSharedPreferences(File file, int mode)201     public SharedPreferences getSharedPreferences(File file, int mode) {
202         return mBase.getSharedPreferences(file, mode);
203     }
204 
205     /** @hide */
206     @Override
reloadSharedPreferences()207     public void reloadSharedPreferences() {
208         mBase.reloadSharedPreferences();
209     }
210 
211     @Override
moveSharedPreferencesFrom(Context sourceContext, String name)212     public boolean moveSharedPreferencesFrom(Context sourceContext, String name) {
213         return mBase.moveSharedPreferencesFrom(sourceContext, name);
214     }
215 
216     @Override
deleteSharedPreferences(String name)217     public boolean deleteSharedPreferences(String name) {
218         return mBase.deleteSharedPreferences(name);
219     }
220 
221     @Override
openFileInput(String name)222     public FileInputStream openFileInput(String name)
223             throws FileNotFoundException {
224         return mBase.openFileInput(name);
225     }
226 
227     @Override
openFileOutput(String name, int mode)228     public FileOutputStream openFileOutput(String name, int mode)
229             throws FileNotFoundException {
230         return mBase.openFileOutput(name, mode);
231     }
232 
233     @Override
deleteFile(String name)234     public boolean deleteFile(String name) {
235         return mBase.deleteFile(name);
236     }
237 
238     @Override
getFileStreamPath(String name)239     public File getFileStreamPath(String name) {
240         return mBase.getFileStreamPath(name);
241     }
242 
243     /** @removed */
244     @Override
getSharedPreferencesPath(String name)245     public File getSharedPreferencesPath(String name) {
246         return mBase.getSharedPreferencesPath(name);
247     }
248 
249     @Override
fileList()250     public String[] fileList() {
251         return mBase.fileList();
252     }
253 
254     @Override
getDataDir()255     public File getDataDir() {
256         return mBase.getDataDir();
257     }
258 
259     @Override
getFilesDir()260     public File getFilesDir() {
261         return mBase.getFilesDir();
262     }
263 
264     /**
265      * {@inheritDoc Context#getCrateDir()}
266      * @hide
267      */
268     @NonNull
269     @Override
getCrateDir(@onNull String cratedId)270     public File getCrateDir(@NonNull String cratedId) {
271         return mBase.getCrateDir(cratedId);
272     }
273 
274     @Override
getNoBackupFilesDir()275     public File getNoBackupFilesDir() {
276         return mBase.getNoBackupFilesDir();
277     }
278 
279     @Override
getExternalFilesDir(@ullable String type)280     public @Nullable File getExternalFilesDir(@Nullable String type) {
281         return mBase.getExternalFilesDir(type);
282     }
283 
284     @Override
getExternalFilesDirs(String type)285     public File[] getExternalFilesDirs(String type) {
286         return mBase.getExternalFilesDirs(type);
287     }
288 
289     @Override
getObbDir()290     public File getObbDir() {
291         return mBase.getObbDir();
292     }
293 
294     @Override
getObbDirs()295     public File[] getObbDirs() {
296         return mBase.getObbDirs();
297     }
298 
299     @Override
getCacheDir()300     public File getCacheDir() {
301         return mBase.getCacheDir();
302     }
303 
304     @Override
getCodeCacheDir()305     public File getCodeCacheDir() {
306         return mBase.getCodeCacheDir();
307     }
308 
309     @Override
getExternalCacheDir()310     public @Nullable File getExternalCacheDir() {
311         return mBase.getExternalCacheDir();
312     }
313 
314     @Override
getExternalCacheDirs()315     public File[] getExternalCacheDirs() {
316         return mBase.getExternalCacheDirs();
317     }
318 
319     @Override
getExternalMediaDirs()320     public File[] getExternalMediaDirs() {
321         return mBase.getExternalMediaDirs();
322     }
323 
324     @Override
getDir(String name, int mode)325     public File getDir(String name, int mode) {
326         return mBase.getDir(name, mode);
327     }
328 
329 
330     /** @hide **/
331     @Override
getPreloadsFileCache()332     public @Nullable File getPreloadsFileCache() {
333         return mBase.getPreloadsFileCache();
334     }
335 
336     @Override
openOrCreateDatabase(String name, int mode, CursorFactory factory)337     public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory) {
338         return mBase.openOrCreateDatabase(name, mode, factory);
339     }
340 
341     @Override
openOrCreateDatabase(String name, int mode, CursorFactory factory, @Nullable DatabaseErrorHandler errorHandler)342     public SQLiteDatabase openOrCreateDatabase(String name, int mode, CursorFactory factory,
343             @Nullable DatabaseErrorHandler errorHandler) {
344         return mBase.openOrCreateDatabase(name, mode, factory, errorHandler);
345     }
346 
347     @Override
moveDatabaseFrom(Context sourceContext, String name)348     public boolean moveDatabaseFrom(Context sourceContext, String name) {
349         return mBase.moveDatabaseFrom(sourceContext, name);
350     }
351 
352     @Override
deleteDatabase(String name)353     public boolean deleteDatabase(String name) {
354         return mBase.deleteDatabase(name);
355     }
356 
357     @Override
getDatabasePath(String name)358     public File getDatabasePath(String name) {
359         return mBase.getDatabasePath(name);
360     }
361 
362     @Override
databaseList()363     public String[] databaseList() {
364         return mBase.databaseList();
365     }
366 
367     @Override
368     @Deprecated
getWallpaper()369     public Drawable getWallpaper() {
370         return mBase.getWallpaper();
371     }
372 
373     @Override
374     @Deprecated
peekWallpaper()375     public Drawable peekWallpaper() {
376         return mBase.peekWallpaper();
377     }
378 
379     @Override
380     @Deprecated
getWallpaperDesiredMinimumWidth()381     public int getWallpaperDesiredMinimumWidth() {
382         return mBase.getWallpaperDesiredMinimumWidth();
383     }
384 
385     @Override
386     @Deprecated
getWallpaperDesiredMinimumHeight()387     public int getWallpaperDesiredMinimumHeight() {
388         return mBase.getWallpaperDesiredMinimumHeight();
389     }
390 
391     @Override
392     @Deprecated
setWallpaper(Bitmap bitmap)393     public void setWallpaper(Bitmap bitmap) throws IOException {
394         mBase.setWallpaper(bitmap);
395     }
396 
397     @Override
398     @Deprecated
setWallpaper(InputStream data)399     public void setWallpaper(InputStream data) throws IOException {
400         mBase.setWallpaper(data);
401     }
402 
403     @Override
404     @Deprecated
clearWallpaper()405     public void clearWallpaper() throws IOException {
406         mBase.clearWallpaper();
407     }
408 
409     @Override
startActivity(Intent intent)410     public void startActivity(Intent intent) {
411         mBase.startActivity(intent);
412     }
413 
414     /** @hide */
415     @Override
startActivityAsUser(Intent intent, UserHandle user)416     public void startActivityAsUser(Intent intent, UserHandle user) {
417         mBase.startActivityAsUser(intent, user);
418     }
419 
420     /** @hide **/
startActivityForResult( String who, Intent intent, int requestCode, @Nullable Bundle options)421     public void startActivityForResult(
422             String who, Intent intent, int requestCode, @Nullable Bundle options) {
423         mBase.startActivityForResult(who, intent, requestCode, options);
424     }
425 
426     /** @hide **/
canStartActivityForResult()427     public boolean canStartActivityForResult() {
428         return mBase.canStartActivityForResult();
429     }
430 
431     @Override
startActivity(Intent intent, @Nullable Bundle options)432     public void startActivity(Intent intent, @Nullable Bundle options) {
433         mBase.startActivity(intent, options);
434     }
435 
436     /** @hide */
437     @Override
startActivityAsUser(Intent intent, @Nullable Bundle options, UserHandle user)438     public void startActivityAsUser(Intent intent, @Nullable Bundle options, UserHandle user) {
439         mBase.startActivityAsUser(intent, options, user);
440     }
441 
442     @Override
startActivities(Intent[] intents)443     public void startActivities(Intent[] intents) {
444         mBase.startActivities(intents);
445     }
446 
447     @Override
startActivities(Intent[] intents, @Nullable Bundle options)448     public void startActivities(Intent[] intents, @Nullable Bundle options) {
449         mBase.startActivities(intents, options);
450     }
451 
452     /** @hide */
453     @Override
startActivitiesAsUser(Intent[] intents, @Nullable Bundle options, UserHandle userHandle)454     public int startActivitiesAsUser(Intent[] intents, @Nullable Bundle options,
455             UserHandle userHandle) {
456         return mBase.startActivitiesAsUser(intents, options, userHandle);
457     }
458 
459     @Override
startIntentSender(IntentSender intent, @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)460     public void startIntentSender(IntentSender intent,
461             @Nullable Intent fillInIntent, int flagsMask, int flagsValues,
462             int extraFlags)
463             throws IntentSender.SendIntentException {
464         mBase.startIntentSender(intent, fillInIntent, flagsMask,
465                 flagsValues, extraFlags);
466     }
467 
468     @Override
startIntentSender(IntentSender intent, @Nullable Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, @Nullable Bundle options)469     public void startIntentSender(IntentSender intent,
470             @Nullable Intent fillInIntent, int flagsMask, int flagsValues,
471             int extraFlags, @Nullable Bundle options)
472             throws IntentSender.SendIntentException {
473         mBase.startIntentSender(intent, fillInIntent, flagsMask,
474                 flagsValues, extraFlags, options);
475     }
476 
477     @Override
sendBroadcast(Intent intent)478     public void sendBroadcast(Intent intent) {
479         mBase.sendBroadcast(intent);
480     }
481 
482     @Override
sendBroadcast(Intent intent, @Nullable String receiverPermission)483     public void sendBroadcast(Intent intent, @Nullable String receiverPermission) {
484         mBase.sendBroadcast(intent, receiverPermission);
485     }
486 
487     /** @hide */
488     @Override
sendBroadcastMultiplePermissions(@onNull Intent intent, @NonNull String[] receiverPermissions)489     public void sendBroadcastMultiplePermissions(@NonNull Intent intent,
490             @NonNull String[] receiverPermissions) {
491         mBase.sendBroadcastMultiplePermissions(intent, receiverPermissions);
492     }
493 
494     /** @hide */
495     @Override
sendBroadcastMultiplePermissions(@onNull Intent intent, @NonNull String[] receiverPermissions, @Nullable String[] excludedPermissions)496     public void sendBroadcastMultiplePermissions(@NonNull Intent intent,
497             @NonNull String[] receiverPermissions, @Nullable String[] excludedPermissions) {
498         mBase.sendBroadcastMultiplePermissions(intent, receiverPermissions, excludedPermissions);
499     }
500 
501     /** @hide */
502     @Override
sendBroadcastMultiplePermissions(@onNull Intent intent, @NonNull String[] receiverPermissions, @Nullable Bundle options)503     public void sendBroadcastMultiplePermissions(@NonNull Intent intent,
504             @NonNull String[] receiverPermissions, @Nullable Bundle options) {
505         mBase.sendBroadcastMultiplePermissions(intent, receiverPermissions, options);
506     }
507 
508     /** @hide */
509     @Override
sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user, String[] receiverPermissions)510     public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
511             String[] receiverPermissions) {
512         mBase.sendBroadcastAsUserMultiplePermissions(intent, user, receiverPermissions);
513     }
514 
515     /** @hide */
516     @SystemApi
517     @Override
sendBroadcast(Intent intent, @Nullable String receiverPermission, @Nullable Bundle options)518     public void sendBroadcast(Intent intent, @Nullable String receiverPermission,
519             @Nullable Bundle options) {
520         mBase.sendBroadcast(intent, receiverPermission, options);
521     }
522 
523     /** @hide */
524     @Override
sendBroadcast(Intent intent, @Nullable String receiverPermission, int appOp)525     public void sendBroadcast(Intent intent, @Nullable String receiverPermission, int appOp) {
526         mBase.sendBroadcast(intent, receiverPermission, appOp);
527     }
528 
529     @Override
sendOrderedBroadcast(Intent intent, @Nullable String receiverPermission)530     public void sendOrderedBroadcast(Intent intent,
531             @Nullable String receiverPermission) {
532         mBase.sendOrderedBroadcast(intent, receiverPermission);
533     }
534 
535     @Override
sendOrderedBroadcast( Intent intent, @Nullable String receiverPermission, @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler, int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras)536     public void sendOrderedBroadcast(
537             Intent intent, @Nullable String receiverPermission,
538             @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler,
539             int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras) {
540         mBase.sendOrderedBroadcast(intent, receiverPermission,
541                 resultReceiver, scheduler, initialCode,
542                 initialData, initialExtras);
543     }
544 
545     /** @hide */
546     @SystemApi
547     @Override
sendOrderedBroadcast( Intent intent, @Nullable String receiverPermission, @Nullable Bundle options, @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler, int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras)548     public void sendOrderedBroadcast(
549             Intent intent, @Nullable String receiverPermission, @Nullable Bundle options,
550             @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler,
551             int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras) {
552         mBase.sendOrderedBroadcast(intent, receiverPermission,
553                 options, resultReceiver, scheduler, initialCode,
554                 initialData, initialExtras);
555     }
556 
557     /** @hide */
558     @Override
sendOrderedBroadcast( Intent intent, @Nullable String receiverPermission, int appOp, @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler, int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras)559     public void sendOrderedBroadcast(
560             Intent intent, @Nullable String receiverPermission, int appOp,
561             @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler,
562             int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras) {
563         mBase.sendOrderedBroadcast(intent, receiverPermission, appOp,
564                 resultReceiver, scheduler, initialCode,
565                 initialData, initialExtras);
566     }
567 
568     @Override
sendBroadcastAsUser(Intent intent, UserHandle user)569     public void sendBroadcastAsUser(Intent intent, UserHandle user) {
570         mBase.sendBroadcastAsUser(intent, user);
571     }
572 
573     @Override
sendBroadcastAsUser(Intent intent, UserHandle user, String receiverPermission)574     public void sendBroadcastAsUser(Intent intent, UserHandle user,
575             String receiverPermission) {
576         mBase.sendBroadcastAsUser(intent, user, receiverPermission);
577     }
578 
579     /** @hide */
580     @Override
sendBroadcastAsUser(Intent intent, UserHandle user, @Nullable String receiverPermission, @Nullable Bundle options)581     public void sendBroadcastAsUser(Intent intent, UserHandle user,
582             @Nullable String receiverPermission, @Nullable Bundle options) {
583         mBase.sendBroadcastAsUser(intent, user, receiverPermission, options);
584     }
585 
586     /** @hide */
587     @Override
sendBroadcastAsUser(Intent intent, UserHandle user, @Nullable String receiverPermission, int appOp)588     public void sendBroadcastAsUser(Intent intent, UserHandle user,
589             @Nullable String receiverPermission, int appOp) {
590         mBase.sendBroadcastAsUser(intent, user, receiverPermission, appOp);
591     }
592 
593     @Override
sendOrderedBroadcastAsUser(Intent intent, UserHandle user, @Nullable String receiverPermission, @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler, int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras)594     public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
595             @Nullable String receiverPermission, @Nullable BroadcastReceiver resultReceiver,
596             @Nullable Handler scheduler, int initialCode, @Nullable String initialData,
597             @Nullable Bundle initialExtras) {
598         mBase.sendOrderedBroadcastAsUser(intent, user, receiverPermission, resultReceiver,
599                 scheduler, initialCode, initialData, initialExtras);
600     }
601 
602     /** @hide */
603     @Override
sendOrderedBroadcastAsUser(Intent intent, UserHandle user, @Nullable String receiverPermission, int appOp, @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler, int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras)604     public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
605             @Nullable String receiverPermission, int appOp,
606             @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler,
607             int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras) {
608         mBase.sendOrderedBroadcastAsUser(intent, user, receiverPermission, appOp, resultReceiver,
609                 scheduler, initialCode, initialData, initialExtras);
610     }
611 
612     /** @hide */
613     @Override
sendOrderedBroadcastAsUser(Intent intent, UserHandle user, @Nullable String receiverPermission, int appOp, @Nullable Bundle options, @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler, int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras)614     public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
615             @Nullable String receiverPermission, int appOp, @Nullable Bundle options,
616             @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler,
617             int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras) {
618         mBase.sendOrderedBroadcastAsUser(intent, user, receiverPermission, appOp, options,
619                 resultReceiver, scheduler, initialCode, initialData, initialExtras);
620     }
621 
622     @Override
sendOrderedBroadcast(@equiresPermission @onNull Intent intent, @Nullable String receiverPermission, @Nullable String receiverAppOp, @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler, int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras)623     public void sendOrderedBroadcast(@RequiresPermission @NonNull Intent intent,
624             @Nullable String receiverPermission, @Nullable String receiverAppOp,
625             @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler,
626             int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras) {
627         mBase.sendOrderedBroadcast(intent, receiverPermission, receiverAppOp, resultReceiver,
628                 scheduler, initialCode, initialData, initialExtras);
629     }
630 
631     @Override
sendOrderedBroadcast(@equiresPermission @onNull Intent intent, int initialCode, @Nullable String receiverPermission, @Nullable String receiverAppOp, @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler, @Nullable String initialData, @Nullable Bundle initialExtras, @Nullable Bundle options)632     public void sendOrderedBroadcast(@RequiresPermission @NonNull Intent intent, int initialCode,
633             @Nullable String receiverPermission, @Nullable String receiverAppOp,
634             @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler,
635             @Nullable String initialData, @Nullable Bundle initialExtras,
636             @Nullable Bundle options) {
637         mBase.sendOrderedBroadcast(intent, initialCode, receiverPermission, receiverAppOp,
638                 resultReceiver, scheduler, initialData, initialExtras, options);
639     }
640 
641     @Override
642     @Deprecated
sendStickyBroadcast(Intent intent)643     public void sendStickyBroadcast(Intent intent) {
644         mBase.sendStickyBroadcast(intent);
645     }
646 
647     /**
648      * <p>Perform a {@link #sendBroadcast(Intent)} that is "sticky," meaning the
649      * Intent you are sending stays around after the broadcast is complete,
650      * so that others can quickly retrieve that data through the return
651      * value of {@link #registerReceiver(BroadcastReceiver, IntentFilter)}.  In
652      * all other ways, this behaves the same as
653      * {@link #sendBroadcast(Intent)}.
654      *
655      * @deprecated Sticky broadcasts should not be used.  They provide no security (anyone
656      * can access them), no protection (anyone can modify them), and many other problems.
657      * The recommended pattern is to use a non-sticky broadcast to report that <em>something</em>
658      * has changed, with another mechanism for apps to retrieve the current value whenever
659      * desired.
660      *
661      * @param intent The Intent to broadcast; all receivers matching this
662      * Intent will receive the broadcast, and the Intent will be held to
663      * be re-broadcast to future receivers.
664      * @param options (optional) Additional sending options, generated from a
665      * {@link android.app.BroadcastOptions}.
666      *
667      * @see #sendBroadcast(Intent)
668      * @see #sendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, int, String, Bundle)
669      */
670     @Override
671     @Deprecated
sendStickyBroadcast(@onNull Intent intent, @Nullable Bundle options)672     public void sendStickyBroadcast(@NonNull Intent intent, @Nullable Bundle options) {
673         mBase.sendStickyBroadcast(intent, options);
674     }
675 
676     @Override
677     @Deprecated
sendStickyOrderedBroadcast(Intent intent, @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler, int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras)678     public void sendStickyOrderedBroadcast(Intent intent,
679             @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler,
680             int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras) {
681         mBase.sendStickyOrderedBroadcast(intent,
682                 resultReceiver, scheduler, initialCode,
683                 initialData, initialExtras);
684     }
685 
686     @Override
687     @Deprecated
removeStickyBroadcast(Intent intent)688     public void removeStickyBroadcast(Intent intent) {
689         mBase.removeStickyBroadcast(intent);
690     }
691 
692     @Override
693     @Deprecated
sendStickyBroadcastAsUser(Intent intent, UserHandle user)694     public void sendStickyBroadcastAsUser(Intent intent, UserHandle user) {
695         mBase.sendStickyBroadcastAsUser(intent, user);
696     }
697 
698     /** @hide */
699     @Override
700     @Deprecated
sendStickyBroadcastAsUser(Intent intent, UserHandle user, @Nullable Bundle options)701     public void sendStickyBroadcastAsUser(Intent intent, UserHandle user,
702             @Nullable Bundle options) {
703         mBase.sendStickyBroadcastAsUser(intent, user, options);
704     }
705 
706     @Override
707     @Deprecated
sendStickyOrderedBroadcastAsUser(Intent intent, UserHandle user, @Nullable BroadcastReceiver resultReceiver, @Nullable Handler scheduler, int initialCode, @Nullable String initialData, @Nullable Bundle initialExtras)708     public void sendStickyOrderedBroadcastAsUser(Intent intent,
709             UserHandle user, @Nullable BroadcastReceiver resultReceiver,
710             @Nullable Handler scheduler, int initialCode, @Nullable String initialData,
711             @Nullable Bundle initialExtras) {
712         mBase.sendStickyOrderedBroadcastAsUser(intent, user, resultReceiver,
713                 scheduler, initialCode, initialData, initialExtras);
714     }
715 
716     @Override
717     @Deprecated
removeStickyBroadcastAsUser(Intent intent, UserHandle user)718     public void removeStickyBroadcastAsUser(Intent intent, UserHandle user) {
719         mBase.removeStickyBroadcastAsUser(intent, user);
720     }
721 
722     @Override
registerReceiver(@ullable BroadcastReceiver receiver, IntentFilter filter)723     public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter) {
724         return mBase.registerReceiver(receiver, filter);
725     }
726 
727     @Override
registerReceiver(@ullable BroadcastReceiver receiver, IntentFilter filter, int flags)728     public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter,
729             int flags) {
730         return mBase.registerReceiver(receiver, filter, flags);
731     }
732 
733     @Override
registerReceiver(@ullable BroadcastReceiver receiver, IntentFilter filter, @Nullable String broadcastPermission, @Nullable Handler scheduler)734     public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter,
735             @Nullable String broadcastPermission, @Nullable Handler scheduler) {
736         return mBase.registerReceiver(receiver, filter, broadcastPermission,
737                 scheduler);
738     }
739 
740     @Override
registerReceiver(@ullable BroadcastReceiver receiver, IntentFilter filter, @Nullable String broadcastPermission, @Nullable Handler scheduler, int flags)741     public Intent registerReceiver(@Nullable BroadcastReceiver receiver, IntentFilter filter,
742             @Nullable String broadcastPermission, @Nullable Handler scheduler, int flags) {
743         return mBase.registerReceiver(receiver, filter, broadcastPermission,
744                 scheduler, flags);
745     }
746 
747     /** @hide */
748     @Override
749     @Nullable
registerReceiverForAllUsers(@ullable BroadcastReceiver receiver, @NonNull IntentFilter filter, @Nullable String broadcastPermission, @Nullable Handler scheduler)750     public Intent registerReceiverForAllUsers(@Nullable BroadcastReceiver receiver,
751             @NonNull IntentFilter filter, @Nullable String broadcastPermission,
752             @Nullable Handler scheduler) {
753         return mBase.registerReceiverForAllUsers(receiver, filter, broadcastPermission,
754                 scheduler);
755     }
756 
757     /** @hide */
758     @Override
759     @UnsupportedAppUsage
registerReceiverAsUser(@ullable BroadcastReceiver receiver, UserHandle user, IntentFilter filter, @Nullable String broadcastPermission, @Nullable Handler scheduler)760     public Intent registerReceiverAsUser(@Nullable BroadcastReceiver receiver, UserHandle user,
761             IntentFilter filter, @Nullable String broadcastPermission,
762             @Nullable Handler scheduler) {
763         return mBase.registerReceiverAsUser(receiver, user, filter, broadcastPermission,
764                 scheduler);
765     }
766 
767     @Override
unregisterReceiver(BroadcastReceiver receiver)768     public void unregisterReceiver(BroadcastReceiver receiver) {
769         mBase.unregisterReceiver(receiver);
770     }
771 
772     @Override
startService(Intent service)773     public @Nullable ComponentName startService(Intent service) {
774         return mBase.startService(service);
775     }
776 
777     @Override
startForegroundService(Intent service)778     public @Nullable ComponentName startForegroundService(Intent service) {
779         return mBase.startForegroundService(service);
780     }
781 
782     @Override
stopService(Intent name)783     public boolean stopService(Intent name) {
784         return mBase.stopService(name);
785     }
786 
787     /** @hide */
788     @Override
789     @UnsupportedAppUsage
startServiceAsUser(Intent service, UserHandle user)790     public @Nullable ComponentName startServiceAsUser(Intent service, UserHandle user) {
791         return mBase.startServiceAsUser(service, user);
792     }
793 
794     /** @hide */
795     @Override
796     @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
startForegroundServiceAsUser(Intent service, UserHandle user)797     public @Nullable ComponentName startForegroundServiceAsUser(Intent service, UserHandle user) {
798         return mBase.startForegroundServiceAsUser(service, user);
799     }
800 
801     /** @hide */
802     @Override
stopServiceAsUser(Intent name, UserHandle user)803     public boolean stopServiceAsUser(Intent name, UserHandle user) {
804         return mBase.stopServiceAsUser(name, user);
805     }
806 
807     @Override
bindService(Intent service, ServiceConnection conn, int flags)808     public boolean bindService(Intent service, ServiceConnection conn,
809             int flags) {
810         return mBase.bindService(service, conn, flags);
811     }
812 
813     @Override
bindService(Intent service, int flags, Executor executor, ServiceConnection conn)814     public boolean bindService(Intent service, int flags, Executor executor,
815             ServiceConnection conn) {
816         return mBase.bindService(service, flags, executor, conn);
817     }
818 
819     @Override
bindIsolatedService(Intent service, int flags, String instanceName, Executor executor, ServiceConnection conn)820     public boolean bindIsolatedService(Intent service, int flags, String instanceName,
821             Executor executor, ServiceConnection conn) {
822         return mBase.bindIsolatedService(service, flags, instanceName, executor, conn);
823     }
824 
825     /** @hide */
826     @Override
bindServiceAsUser(Intent service, ServiceConnection conn, int flags, UserHandle user)827     public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags,
828             UserHandle user) {
829         return mBase.bindServiceAsUser(service, conn, flags, user);
830     }
831 
832     /** @hide */
833     @Override
bindServiceAsUser(Intent service, ServiceConnection conn, int flags, Handler handler, UserHandle user)834     public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags,
835             Handler handler, UserHandle user) {
836         return mBase.bindServiceAsUser(service, conn, flags, handler, user);
837     }
838 
839     @Override
updateServiceGroup(ServiceConnection conn, int group, int importance)840     public void updateServiceGroup(ServiceConnection conn, int group, int importance) {
841         mBase.updateServiceGroup(conn, group, importance);
842     }
843 
844     @Override
unbindService(ServiceConnection conn)845     public void unbindService(ServiceConnection conn) {
846         mBase.unbindService(conn);
847     }
848 
849     @Override
startInstrumentation(ComponentName className, @Nullable String profileFile, @Nullable Bundle arguments)850     public boolean startInstrumentation(ComponentName className,
851             @Nullable String profileFile, @Nullable Bundle arguments) {
852         return mBase.startInstrumentation(className, profileFile, arguments);
853     }
854 
855     @Override
getSystemService(String name)856     public @Nullable Object getSystemService(String name) {
857         return mBase.getSystemService(name);
858     }
859 
860     @Override
getSystemServiceName(Class<?> serviceClass)861     public String getSystemServiceName(Class<?> serviceClass) {
862         return mBase.getSystemServiceName(serviceClass);
863     }
864 
865     @Override
checkPermission(String permission, int pid, int uid)866     public int checkPermission(String permission, int pid, int uid) {
867         return mBase.checkPermission(permission, pid, uid);
868     }
869 
870     /** @hide */
871     @Override
checkPermission(String permission, int pid, int uid, IBinder callerToken)872     public int checkPermission(String permission, int pid, int uid, IBinder callerToken) {
873         return mBase.checkPermission(permission, pid, uid, callerToken);
874     }
875 
876     @Override
checkCallingPermission(String permission)877     public int checkCallingPermission(String permission) {
878         return mBase.checkCallingPermission(permission);
879     }
880 
881     @Override
checkCallingOrSelfPermission(String permission)882     public int checkCallingOrSelfPermission(String permission) {
883         return mBase.checkCallingOrSelfPermission(permission);
884     }
885 
886     @Override
checkSelfPermission(String permission)887     public int checkSelfPermission(String permission) {
888        return mBase.checkSelfPermission(permission);
889     }
890 
891     @Override
enforcePermission( String permission, int pid, int uid, @Nullable String message)892     public void enforcePermission(
893             String permission, int pid, int uid, @Nullable String message) {
894         mBase.enforcePermission(permission, pid, uid, message);
895     }
896 
897     @Override
enforceCallingPermission(String permission, @Nullable String message)898     public void enforceCallingPermission(String permission, @Nullable String message) {
899         mBase.enforceCallingPermission(permission, message);
900     }
901 
902     @Override
enforceCallingOrSelfPermission( String permission, @Nullable String message)903     public void enforceCallingOrSelfPermission(
904             String permission, @Nullable String message) {
905         mBase.enforceCallingOrSelfPermission(permission, message);
906     }
907 
908     @Override
grantUriPermission(String toPackage, Uri uri, int modeFlags)909     public void grantUriPermission(String toPackage, Uri uri, int modeFlags) {
910         mBase.grantUriPermission(toPackage, uri, modeFlags);
911     }
912 
913     @Override
revokeUriPermission(Uri uri, int modeFlags)914     public void revokeUriPermission(Uri uri, int modeFlags) {
915         mBase.revokeUriPermission(uri, modeFlags);
916     }
917 
918     @Override
revokeUriPermission(String targetPackage, Uri uri, int modeFlags)919     public void revokeUriPermission(String targetPackage, Uri uri, int modeFlags) {
920         mBase.revokeUriPermission(targetPackage, uri, modeFlags);
921     }
922 
923     @Override
checkUriPermission(Uri uri, int pid, int uid, int modeFlags)924     public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) {
925         return mBase.checkUriPermission(uri, pid, uid, modeFlags);
926     }
927 
928     @NonNull
929     @Override
checkUriPermissions(@onNull List<Uri> uris, int pid, int uid, int modeFlags)930     public int[] checkUriPermissions(@NonNull List<Uri> uris, int pid, int uid,
931             int modeFlags) {
932         return mBase.checkUriPermissions(uris, pid, uid, modeFlags);
933     }
934 
935     /** @hide */
936     @Override
checkUriPermission(Uri uri, int pid, int uid, int modeFlags, IBinder callerToken)937     public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags, IBinder callerToken) {
938         return mBase.checkUriPermission(uri, pid, uid, modeFlags, callerToken);
939     }
940 
941     @Override
checkCallingUriPermission(Uri uri, int modeFlags)942     public int checkCallingUriPermission(Uri uri, int modeFlags) {
943         return mBase.checkCallingUriPermission(uri, modeFlags);
944     }
945 
946     @NonNull
947     @Override
checkCallingUriPermissions(@onNull List<Uri> uris, int modeFlags)948     public int[] checkCallingUriPermissions(@NonNull List<Uri> uris, int modeFlags) {
949         return mBase.checkCallingUriPermissions(uris, modeFlags);
950     }
951 
952     @Override
checkCallingOrSelfUriPermission(Uri uri, int modeFlags)953     public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) {
954         return mBase.checkCallingOrSelfUriPermission(uri, modeFlags);
955     }
956 
957     @NonNull
958     @Override
checkCallingOrSelfUriPermissions(@onNull List<Uri> uris, int modeFlags)959     public int[] checkCallingOrSelfUriPermissions(@NonNull List<Uri> uris, int modeFlags) {
960         return mBase.checkCallingOrSelfUriPermissions(uris, modeFlags);
961     }
962 
963     @Override
checkUriPermission(@ullable Uri uri, @Nullable String readPermission, @Nullable String writePermission, int pid, int uid, int modeFlags)964     public int checkUriPermission(@Nullable Uri uri, @Nullable String readPermission,
965             @Nullable String writePermission, int pid, int uid, int modeFlags) {
966         return mBase.checkUriPermission(uri, readPermission, writePermission,
967                 pid, uid, modeFlags);
968     }
969 
970     @Override
enforceUriPermission( Uri uri, int pid, int uid, int modeFlags, String message)971     public void enforceUriPermission(
972             Uri uri, int pid, int uid, int modeFlags, String message) {
973         mBase.enforceUriPermission(uri, pid, uid, modeFlags, message);
974     }
975 
976     @Override
enforceCallingUriPermission( Uri uri, int modeFlags, String message)977     public void enforceCallingUriPermission(
978             Uri uri, int modeFlags, String message) {
979         mBase.enforceCallingUriPermission(uri, modeFlags, message);
980     }
981 
982     @Override
enforceCallingOrSelfUriPermission( Uri uri, int modeFlags, String message)983     public void enforceCallingOrSelfUriPermission(
984             Uri uri, int modeFlags, String message) {
985         mBase.enforceCallingOrSelfUriPermission(uri, modeFlags, message);
986     }
987 
988     @Override
enforceUriPermission( @ullable Uri uri, @Nullable String readPermission, @Nullable String writePermission, int pid, int uid, int modeFlags, @Nullable String message)989     public void enforceUriPermission(
990             @Nullable Uri uri, @Nullable String readPermission, @Nullable String writePermission,
991             int pid, int uid, int modeFlags, @Nullable String message) {
992         mBase.enforceUriPermission(
993                 uri, readPermission, writePermission, pid, uid, modeFlags,
994                 message);
995     }
996 
997     @Override
createPackageContext(String packageName, int flags)998     public Context createPackageContext(String packageName, int flags)
999         throws PackageManager.NameNotFoundException {
1000         return mBase.createPackageContext(packageName, flags);
1001     }
1002 
1003     /** @hide */
1004     @Override
createPackageContextAsUser(String packageName, int flags, UserHandle user)1005     public Context createPackageContextAsUser(String packageName, int flags, UserHandle user)
1006             throws PackageManager.NameNotFoundException {
1007         return mBase.createPackageContextAsUser(packageName, flags, user);
1008     }
1009 
1010     /** @hide */
1011     @Override
createContextAsUser(UserHandle user, @CreatePackageOptions int flags)1012     public Context createContextAsUser(UserHandle user, @CreatePackageOptions int flags) {
1013         return mBase.createContextAsUser(user, flags);
1014     }
1015 
1016     /** @hide */
1017     @Override
1018     @UnsupportedAppUsage(trackingBug = 175981568)
createApplicationContext(ApplicationInfo application, int flags)1019     public Context createApplicationContext(ApplicationInfo application,
1020             int flags) throws PackageManager.NameNotFoundException {
1021         return mBase.createApplicationContext(application, flags);
1022     }
1023 
1024     /** @hide */
1025     @Override
createContextForSplit(String splitName)1026     public Context createContextForSplit(String splitName)
1027             throws PackageManager.NameNotFoundException {
1028         return mBase.createContextForSplit(splitName);
1029     }
1030 
1031     /** @hide */
1032     @Override
getUserId()1033     public int getUserId() {
1034         return mBase.getUserId();
1035     }
1036 
1037     /** @hide */
1038     @Override
getUser()1039     public UserHandle getUser() {
1040         return mBase.getUser();
1041     }
1042 
1043     @Override
createConfigurationContext(Configuration overrideConfiguration)1044     public Context createConfigurationContext(Configuration overrideConfiguration) {
1045         return mBase.createConfigurationContext(overrideConfiguration);
1046     }
1047 
1048     @Override
createDisplayContext(Display display)1049     public Context createDisplayContext(Display display) {
1050         return mBase.createDisplayContext(display);
1051     }
1052 
1053     @Override
1054     @NonNull
createWindowContext(@indowType int type, @Nullable Bundle options)1055     public Context createWindowContext(@WindowType int type, @Nullable Bundle options) {
1056         return mBase.createWindowContext(type, options);
1057     }
1058 
1059     @Override
1060     @NonNull
createWindowContext(@onNull Display display, @WindowType int type, @Nullable Bundle options)1061     public Context createWindowContext(@NonNull Display display, @WindowType int type,
1062             @Nullable Bundle options) {
1063         return mBase.createWindowContext(display, type, options);
1064     }
1065 
1066     @Override
1067     @NonNull
createContext(@onNull ContextParams contextParams)1068     public Context createContext(@NonNull ContextParams contextParams) {
1069         return mBase.createContext(contextParams);
1070     }
1071 
1072     @Override
createAttributionContext(@ullable String attributionTag)1073     public @NonNull Context createAttributionContext(@Nullable String attributionTag) {
1074         return mBase.createAttributionContext(attributionTag);
1075     }
1076 
1077     @NonNull
1078     @Override
getAttributionSource()1079     public AttributionSource getAttributionSource() {
1080         return mBase.getAttributionSource();
1081     }
1082 
1083     @Override
isRestricted()1084     public boolean isRestricted() {
1085         return mBase.isRestricted();
1086     }
1087 
1088     /** @hide */
1089     @Override
getDisplayAdjustments(int displayId)1090     public DisplayAdjustments getDisplayAdjustments(int displayId) {
1091         return mBase.getDisplayAdjustments(displayId);
1092     }
1093 
1094     @Override
getDisplay()1095     public @Nullable Display getDisplay() {
1096         return mBase.getDisplay();
1097     }
1098 
1099     /** @hide */
1100     @Override
getDisplayNoVerify()1101     public @Nullable Display getDisplayNoVerify() {
1102         return mBase.getDisplayNoVerify();
1103     }
1104 
1105     /**
1106      * @hide
1107      */
1108     @Override
getDisplayId()1109     public int getDisplayId() {
1110         return mBase.getDisplayId();
1111     }
1112 
1113     /**
1114      * @hide
1115      */
1116     @Override
updateDisplay(int displayId)1117     public void updateDisplay(int displayId) {
1118         mBase.updateDisplay(displayId);
1119     }
1120 
1121     @Override
createDeviceProtectedStorageContext()1122     public Context createDeviceProtectedStorageContext() {
1123         return mBase.createDeviceProtectedStorageContext();
1124     }
1125 
1126     /** {@hide} */
1127     @SystemApi
1128     @Override
createCredentialProtectedStorageContext()1129     public Context createCredentialProtectedStorageContext() {
1130         return mBase.createCredentialProtectedStorageContext();
1131     }
1132 
1133     /** @hide */
1134     @UiContext
1135     @NonNull
1136     @Override
createTokenContext(@onNull IBinder token, @NonNull Display display)1137     public Context createTokenContext(@NonNull IBinder token, @NonNull Display display) {
1138         return mBase.createTokenContext(token, display);
1139     }
1140 
1141     @Override
isDeviceProtectedStorage()1142     public boolean isDeviceProtectedStorage() {
1143         return mBase.isDeviceProtectedStorage();
1144     }
1145 
1146     /** {@hide} */
1147     @SystemApi
1148     @Override
isCredentialProtectedStorage()1149     public boolean isCredentialProtectedStorage() {
1150         return mBase.isCredentialProtectedStorage();
1151     }
1152 
1153     /** {@hide} */
1154     @Override
canLoadUnsafeResources()1155     public boolean canLoadUnsafeResources() {
1156         return mBase.canLoadUnsafeResources();
1157     }
1158 
1159     /**
1160      * @hide
1161      */
1162     @Override
getActivityToken()1163     public @Nullable IBinder getActivityToken() {
1164         return mBase.getActivityToken();
1165     }
1166 
1167     /**
1168      * @hide
1169      */
1170     @Override
getWindowContextToken()1171     public @Nullable IBinder getWindowContextToken() {
1172         return mBase != null ? mBase.getWindowContextToken() : null;
1173     }
1174 
1175     /**
1176      * @hide
1177      */
1178     @Override
getServiceDispatcher(ServiceConnection conn, Handler handler, int flags)1179     public @Nullable IServiceConnection getServiceDispatcher(ServiceConnection conn,
1180             Handler handler, int flags) {
1181         return mBase.getServiceDispatcher(conn, handler, flags);
1182     }
1183 
1184     /**
1185      * @hide
1186      */
1187     @Override
getIApplicationThread()1188     public IApplicationThread getIApplicationThread() {
1189         return mBase.getIApplicationThread();
1190     }
1191 
1192     /**
1193      * @hide
1194      */
1195     @Override
getMainThreadHandler()1196     public Handler getMainThreadHandler() {
1197         return mBase.getMainThreadHandler();
1198     }
1199 
1200     /**
1201      * @hide
1202      */
1203     @Override
getNextAutofillId()1204     public int getNextAutofillId() {
1205         return mBase.getNextAutofillId();
1206     }
1207 
1208     /**
1209      * @hide
1210      */
1211     @Override
getAutofillClient()1212     public AutofillClient getAutofillClient() {
1213         return mBase.getAutofillClient();
1214     }
1215 
1216     /**
1217      * @hide
1218      */
1219     @Override
setAutofillClient(AutofillClient client)1220     public void setAutofillClient(AutofillClient client) {
1221         mBase.setAutofillClient(client);
1222     }
1223 
1224     /** @hide */
1225     @Override
getAutofillOptions()1226     public AutofillOptions getAutofillOptions() {
1227         return mBase == null ? null : mBase.getAutofillOptions();
1228     }
1229 
1230     /** @hide */
1231     @Override
setAutofillOptions(AutofillOptions options)1232     public void setAutofillOptions(AutofillOptions options) {
1233         if (mBase != null) {
1234             mBase.setAutofillOptions(options);
1235         }
1236     }
1237 
1238     /**
1239      * @hide
1240      */
1241     @Override
getContentCaptureOptions()1242     public @Nullable ContentCaptureOptions getContentCaptureOptions() {
1243         return mBase == null ? null : mBase.getContentCaptureOptions();
1244     }
1245 
1246     /**
1247      * @hide
1248      */
1249     @TestApi
1250     @Override
setContentCaptureOptions(@ullable ContentCaptureOptions options)1251     public void setContentCaptureOptions(@Nullable ContentCaptureOptions options) {
1252         if (mBase != null) {
1253             mBase.setContentCaptureOptions(options);
1254         }
1255     }
1256 
1257     /**
1258      * @hide
1259      */
1260     @Override
isUiContext()1261     public boolean isUiContext() {
1262         if (mBase == null) {
1263             return false;
1264         }
1265         return mBase.isUiContext();
1266     }
1267 
1268     /**
1269      * @hide
1270      */
1271     @Override
isConfigurationContext()1272     public boolean isConfigurationContext() {
1273         if (mBase == null) {
1274             return false;
1275         }
1276         return mBase.isConfigurationContext();
1277     }
1278 }
1279