blob: a95b6f11e98a5821c360e0258917b6a16af279ec [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
2 * Copyright (C) 2007 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
17package android.test.mock;
18
Dianne Hackborna750a632015-06-16 17:18:23 -070019import android.annotation.SystemApi;
Tony Mak46aabe52016-11-14 12:53:06 +000020import android.app.IApplicationThread;
21import android.app.IServiceConnection;
Jeff Sharkey8439ac02017-12-12 17:26:23 -070022import android.content.BroadcastReceiver;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080023import android.content.ComponentName;
24import android.content.ContentResolver;
25import android.content.Context;
26import android.content.Intent;
27import android.content.IntentFilter;
Dianne Hackbornfa82f222009-09-17 15:14:12 -070028import android.content.IntentSender;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080029import android.content.ServiceConnection;
30import android.content.SharedPreferences;
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -070031import android.content.pm.ApplicationInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080032import android.content.pm.PackageManager;
33import android.content.res.AssetManager;
Dianne Hackborn756220b2012-08-14 16:45:30 -070034import android.content.res.Configuration;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080035import android.content.res.Resources;
Vasu Nori74f170f2010-06-01 18:06:18 -070036import android.database.DatabaseErrorHandler;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080037import android.database.sqlite.SQLiteDatabase;
38import android.graphics.Bitmap;
39import android.graphics.drawable.Drawable;
40import android.net.Uri;
41import android.os.Bundle;
42import android.os.Handler;
Dianne Hackbornff170242014-11-19 10:59:01 -080043import android.os.IBinder;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080044import android.os.Looper;
Dianne Hackborn79af1dd2012-08-16 16:42:52 -070045import android.os.UserHandle;
Jeff Browna492c3a2012-08-23 19:48:44 -070046import android.view.Display;
Jeff Sharkey8439ac02017-12-12 17:26:23 -070047import android.view.DisplayAdjustments;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080048
49import java.io.File;
50import java.io.FileInputStream;
51import java.io.FileNotFoundException;
52import java.io.FileOutputStream;
53import java.io.IOException;
54import java.io.InputStream;
Jeff Sharkey8439ac02017-12-12 17:26:23 -070055import java.util.concurrent.Executor;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080056
57/**
Stephan Linznerb51617f2016-01-27 18:09:50 -080058 * A mock {@link android.content.Context} class. All methods are non-functional and throw
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080059 * {@link java.lang.UnsupportedOperationException}. You can use this to inject other dependencies,
60 * mocks, or monitors into the classes you are testing.
61 */
62public class MockContext extends Context {
63
64 @Override
65 public AssetManager getAssets() {
66 throw new UnsupportedOperationException();
67 }
68
69 @Override
70 public Resources getResources() {
71 throw new UnsupportedOperationException();
72 }
73
74 @Override
75 public PackageManager getPackageManager() {
76 throw new UnsupportedOperationException();
77 }
78
79 @Override
80 public ContentResolver getContentResolver() {
81 throw new UnsupportedOperationException();
82 }
83
84 @Override
85 public Looper getMainLooper() {
86 throw new UnsupportedOperationException();
87 }
Stephan Linznerb51617f2016-01-27 18:09:50 -080088
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080089 @Override
Jeff Sharkey8439ac02017-12-12 17:26:23 -070090 public Executor getMainExecutor() {
91 throw new UnsupportedOperationException();
92 }
93
94 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080095 public Context getApplicationContext() {
96 throw new UnsupportedOperationException();
97 }
Stephan Linznerb51617f2016-01-27 18:09:50 -080098
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080099 @Override
100 public void setTheme(int resid) {
101 throw new UnsupportedOperationException();
102 }
103
104 @Override
105 public Resources.Theme getTheme() {
106 throw new UnsupportedOperationException();
107 }
108
109 @Override
110 public ClassLoader getClassLoader() {
111 throw new UnsupportedOperationException();
112 }
113
114 @Override
115 public String getPackageName() {
116 throw new UnsupportedOperationException();
117 }
118
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800119 /** @hide */
120 @Override
121 public String getBasePackageName() {
122 throw new UnsupportedOperationException();
123 }
124
Dianne Hackborn95d78532013-09-11 09:51:14 -0700125 /** @hide */
126 @Override
127 public String getOpPackageName() {
128 throw new UnsupportedOperationException();
129 }
130
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800131 @Override
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700132 public ApplicationInfo getApplicationInfo() {
133 throw new UnsupportedOperationException();
134 }
Stephan Linznerb51617f2016-01-27 18:09:50 -0800135
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700136 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800137 public String getPackageResourcePath() {
138 throw new UnsupportedOperationException();
139 }
140
Joe Onorato23ecae32009-06-10 17:07:15 -0700141 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800142 public String getPackageCodePath() {
143 throw new UnsupportedOperationException();
144 }
145
146 @Override
147 public SharedPreferences getSharedPreferences(String name, int mode) {
148 throw new UnsupportedOperationException();
149 }
150
Jeff Sharkey70168dd2016-03-30 21:47:16 -0600151 /** @removed */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800152 @Override
Jeff Sharkey8fc29cf2015-11-30 17:51:00 -0700153 public SharedPreferences getSharedPreferences(File file, int mode) {
154 throw new UnsupportedOperationException();
155 }
156
Christopher Tatefe2368c2017-05-17 15:42:35 -0700157 /** @hide */
158 @Override
159 public void reloadSharedPreferences() {
160 throw new UnsupportedOperationException();
161 }
162
Jeff Sharkey8fc29cf2015-11-30 17:51:00 -0700163 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600164 public boolean moveSharedPreferencesFrom(Context sourceContext, String name) {
Jeff Sharkey35871f22016-01-29 17:13:29 -0700165 throw new UnsupportedOperationException();
166 }
167
168 @Override
169 public boolean deleteSharedPreferences(String name) {
170 throw new UnsupportedOperationException();
171 }
172
173 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800174 public FileInputStream openFileInput(String name) throws FileNotFoundException {
175 throw new UnsupportedOperationException();
176 }
177
178 @Override
179 public FileOutputStream openFileOutput(String name, int mode) throws FileNotFoundException {
180 throw new UnsupportedOperationException();
181 }
182
183 @Override
184 public boolean deleteFile(String name) {
185 throw new UnsupportedOperationException();
186 }
187
188 @Override
189 public File getFileStreamPath(String name) {
190 throw new UnsupportedOperationException();
191 }
192
Jeff Sharkey70168dd2016-03-30 21:47:16 -0600193 /** @removed */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800194 @Override
Jeff Sharkey6a6cdaf2015-12-07 19:25:19 -0700195 public File getSharedPreferencesPath(String name) {
196 throw new UnsupportedOperationException();
197 }
198
199 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800200 public String[] fileList() {
201 throw new UnsupportedOperationException();
202 }
203
204 @Override
Jeff Sharkey2c1ba9a2016-02-17 15:29:38 -0700205 public File getDataDir() {
206 throw new UnsupportedOperationException();
207 }
208
209 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800210 public File getFilesDir() {
211 throw new UnsupportedOperationException();
212 }
213
214 @Override
Christopher Tatea7835b62014-07-11 17:25:57 -0700215 public File getNoBackupFilesDir() {
216 throw new UnsupportedOperationException();
217 }
218
219 @Override
Dianne Hackborne83cefce2010-02-04 17:38:14 -0800220 public File getExternalFilesDir(String type) {
221 throw new UnsupportedOperationException();
222 }
223
224 @Override
Dianne Hackborn805fd7e2011-01-16 18:30:29 -0800225 public File getObbDir() {
226 throw new UnsupportedOperationException();
227 }
Stephan Linznerb51617f2016-01-27 18:09:50 -0800228
Dianne Hackborn805fd7e2011-01-16 18:30:29 -0800229 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800230 public File getCacheDir() {
231 throw new UnsupportedOperationException();
232 }
233
234 @Override
Jeff Sharkey4ed745d2014-07-15 20:39:15 -0700235 public File getCodeCacheDir() {
236 throw new UnsupportedOperationException();
237 }
238
239 @Override
Dianne Hackborne83cefce2010-02-04 17:38:14 -0800240 public File getExternalCacheDir() {
241 throw new UnsupportedOperationException();
242 }
243
244 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800245 public File getDir(String name, int mode) {
246 throw new UnsupportedOperationException();
247 }
248
249 @Override
Stephan Linznerb51617f2016-01-27 18:09:50 -0800250 public SQLiteDatabase openOrCreateDatabase(String file, int mode,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800251 SQLiteDatabase.CursorFactory factory) {
252 throw new UnsupportedOperationException();
253 }
254
255 @Override
Vasu Nori74f170f2010-06-01 18:06:18 -0700256 public SQLiteDatabase openOrCreateDatabase(String file, int mode,
257 SQLiteDatabase.CursorFactory factory, DatabaseErrorHandler errorHandler) {
258 throw new UnsupportedOperationException();
259 }
260
261 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800262 public File getDatabasePath(String name) {
263 throw new UnsupportedOperationException();
264 }
265
266 @Override
267 public String[] databaseList() {
268 throw new UnsupportedOperationException();
269 }
270
271 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600272 public boolean moveDatabaseFrom(Context sourceContext, String name) {
Jeff Sharkey35871f22016-01-29 17:13:29 -0700273 throw new UnsupportedOperationException();
274 }
275
276 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800277 public boolean deleteDatabase(String name) {
278 throw new UnsupportedOperationException();
279 }
280
281 @Override
282 public Drawable getWallpaper() {
283 throw new UnsupportedOperationException();
284 }
285
286 @Override
287 public Drawable peekWallpaper() {
288 throw new UnsupportedOperationException();
289 }
290
291 @Override
292 public int getWallpaperDesiredMinimumWidth() {
293 throw new UnsupportedOperationException();
294 }
295
296 @Override
297 public int getWallpaperDesiredMinimumHeight() {
298 throw new UnsupportedOperationException();
299 }
300
301 @Override
302 public void setWallpaper(Bitmap bitmap) throws IOException {
303 throw new UnsupportedOperationException();
304 }
305
306 @Override
307 public void setWallpaper(InputStream data) throws IOException {
308 throw new UnsupportedOperationException();
309 }
310
311 @Override
312 public void clearWallpaper() {
313 throw new UnsupportedOperationException();
314 }
315
316 @Override
317 public void startActivity(Intent intent) {
318 throw new UnsupportedOperationException();
319 }
320
321 @Override
Dianne Hackborna4972e92012-03-14 10:38:05 -0700322 public void startActivity(Intent intent, Bundle options) {
323 startActivity(intent);
324 }
325
326 @Override
Dianne Hackborn621e17d2010-11-22 15:59:56 -0800327 public void startActivities(Intent[] intents) {
328 throw new UnsupportedOperationException();
329 }
330
331 @Override
Dianne Hackborna4972e92012-03-14 10:38:05 -0700332 public void startActivities(Intent[] intents, Bundle options) {
333 startActivities(intents);
334 }
335
336 @Override
Dianne Hackbornfa82f222009-09-17 15:14:12 -0700337 public void startIntentSender(IntentSender intent,
338 Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)
339 throws IntentSender.SendIntentException {
340 throw new UnsupportedOperationException();
341 }
Dianne Hackborna4972e92012-03-14 10:38:05 -0700342
343 @Override
344 public void startIntentSender(IntentSender intent,
345 Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags,
346 Bundle options) throws IntentSender.SendIntentException {
347 startIntentSender(intent, fillInIntent, flagsMask, flagsValues, extraFlags);
348 }
Stephan Linznerb51617f2016-01-27 18:09:50 -0800349
Dianne Hackbornfa82f222009-09-17 15:14:12 -0700350 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800351 public void sendBroadcast(Intent intent) {
352 throw new UnsupportedOperationException();
353 }
354
Amith Yamasani67cf7d32012-02-16 14:31:23 -0800355 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800356 public void sendBroadcast(Intent intent, String receiverPermission) {
357 throw new UnsupportedOperationException();
358 }
359
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800360 /** @hide */
Fyodor Kupolovd4fd8c72015-07-13 19:19:25 -0700361 @Override
362 public void sendBroadcastMultiplePermissions(Intent intent, String[] receiverPermissions) {
363 throw new UnsupportedOperationException();
364 }
365
366 /** @hide */
Tyler Gunnf955e562018-04-26 14:43:31 -0700367 @Override
368 public void sendBroadcastAsUserMultiplePermissions(Intent intent, UserHandle user,
369 String[] receiverPermissions) {
370 throw new UnsupportedOperationException();
371 }
372
373 /** @hide */
Dianne Hackborna750a632015-06-16 17:18:23 -0700374 @SystemApi
375 @Override
376 public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
377 throw new UnsupportedOperationException();
378 }
379
380 /** @hide */
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800381 @Override
382 public void sendBroadcast(Intent intent, String receiverPermission, int appOp) {
383 throw new UnsupportedOperationException();
384 }
385
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800386 @Override
387 public void sendOrderedBroadcast(Intent intent,
388 String receiverPermission) {
389 throw new UnsupportedOperationException();
390 }
391
392 @Override
393 public void sendOrderedBroadcast(Intent intent, String receiverPermission,
394 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
395 Bundle initialExtras) {
396 throw new UnsupportedOperationException();
397 }
398
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800399 /** @hide */
Dianne Hackborna750a632015-06-16 17:18:23 -0700400 @SystemApi
401 @Override
402 public void sendOrderedBroadcast(Intent intent, String receiverPermission,
403 Bundle options, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
404 Bundle initialExtras) {
405 throw new UnsupportedOperationException();
406 }
407
408 /** @hide */
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800409 @Override
410 public void sendOrderedBroadcast(Intent intent, String receiverPermission, int appOp,
411 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
412 Bundle initialExtras) {
413 throw new UnsupportedOperationException();
414 }
415
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800416 @Override
Dianne Hackborn79af1dd2012-08-16 16:42:52 -0700417 public void sendBroadcastAsUser(Intent intent, UserHandle user) {
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700418 throw new UnsupportedOperationException();
419 }
420
421 @Override
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700422 public void sendBroadcastAsUser(Intent intent, UserHandle user,
423 String receiverPermission) {
424 throw new UnsupportedOperationException();
425 }
426
Svet Ganov16a16892015-04-16 10:32:04 -0700427 /** @hide */
Chad Brubaker52c8edc2016-07-25 14:30:26 -0700428 @SystemApi
429 @Override
430 public void sendBroadcastAsUser(Intent intent, UserHandle user,
431 String receiverPermission, Bundle options) {
432 throw new UnsupportedOperationException();
433 }
434
435 /** @hide */
Svet Ganov16a16892015-04-16 10:32:04 -0700436 @Override
437 public void sendBroadcastAsUser(Intent intent, UserHandle user,
438 String receiverPermission, int appOp) {
439 throw new UnsupportedOperationException();
440 }
441
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700442 @Override
Dianne Hackborn79af1dd2012-08-16 16:42:52 -0700443 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700444 String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler,
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700445 int initialCode, String initialData, Bundle initialExtras) {
446 throw new UnsupportedOperationException();
447 }
448
Amith Yamasani3cf75722014-05-16 12:37:29 -0700449 /** @hide */
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700450 @Override
Amith Yamasani3cf75722014-05-16 12:37:29 -0700451 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
452 String receiverPermission, int appOp, BroadcastReceiver resultReceiver,
Dianne Hackbornfd854ee2015-07-13 18:00:37 -0700453 Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
454 throw new UnsupportedOperationException();
455 }
456
457 /** @hide */
458 @Override
459 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
460 String receiverPermission, int appOp, Bundle options, BroadcastReceiver resultReceiver,
461 Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
Amith Yamasani3cf75722014-05-16 12:37:29 -0700462 throw new UnsupportedOperationException();
463 }
464
465 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800466 public void sendStickyBroadcast(Intent intent) {
467 throw new UnsupportedOperationException();
468 }
469
470 @Override
Dianne Hackbornefa199f2009-09-19 12:03:15 -0700471 public void sendStickyOrderedBroadcast(Intent intent,
472 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
473 Bundle initialExtras) {
474 throw new UnsupportedOperationException();
475 }
476
477 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800478 public void removeStickyBroadcast(Intent intent) {
479 throw new UnsupportedOperationException();
480 }
481
482 @Override
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700483 public void sendStickyBroadcastAsUser(Intent intent, UserHandle user) {
484 throw new UnsupportedOperationException();
485 }
486
Dianne Hackborne0e413e2015-12-09 17:22:26 -0800487 /** @hide */
488 @Override
489 public void sendStickyBroadcastAsUser(Intent intent, UserHandle user, Bundle options) {
490 throw new UnsupportedOperationException();
491 }
492
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700493 @Override
494 public void sendStickyOrderedBroadcastAsUser(Intent intent,
495 UserHandle user, BroadcastReceiver resultReceiver,
496 Handler scheduler, int initialCode, String initialData,
497 Bundle initialExtras) {
498 throw new UnsupportedOperationException();
499 }
500
501 @Override
502 public void removeStickyBroadcastAsUser(Intent intent, UserHandle user) {
503 throw new UnsupportedOperationException();
504 }
505
506 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800507 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
508 throw new UnsupportedOperationException();
509 }
510
511 @Override
512 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter,
Chad Brubaker6d6015f2017-04-18 11:25:16 -0700513 int flags) {
Chad Brubaker816c83b2017-03-02 10:27:59 -0800514 throw new UnsupportedOperationException();
515 }
516
517 @Override
518 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800519 String broadcastPermission, Handler scheduler) {
520 throw new UnsupportedOperationException();
521 }
522
Chad Brubaker816c83b2017-03-02 10:27:59 -0800523 @Override
524 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter,
Chad Brubaker6d6015f2017-04-18 11:25:16 -0700525 String broadcastPermission, Handler scheduler, int flags) {
Chad Brubaker816c83b2017-03-02 10:27:59 -0800526 throw new UnsupportedOperationException();
527 }
528
Dianne Hackborn20e80982012-08-31 19:00:44 -0700529 /** @hide */
530 @Override
531 public Intent registerReceiverAsUser(BroadcastReceiver receiver, UserHandle user,
532 IntentFilter filter, String broadcastPermission, Handler scheduler) {
533 throw new UnsupportedOperationException();
534 }
535
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800536 @Override
537 public void unregisterReceiver(BroadcastReceiver receiver) {
538 throw new UnsupportedOperationException();
539 }
540
541 @Override
542 public ComponentName startService(Intent service) {
543 throw new UnsupportedOperationException();
544 }
545
546 @Override
Christopher Tate08992ac2017-03-21 11:37:06 -0700547 public ComponentName startForegroundService(Intent service) {
548 throw new UnsupportedOperationException();
549 }
550
Christopher Tate42a386b2016-11-07 12:21:21 -0800551 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800552 public boolean stopService(Intent service) {
553 throw new UnsupportedOperationException();
554 }
555
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700556 /** @hide */
557 @Override
558 public ComponentName startServiceAsUser(Intent service, UserHandle user) {
559 throw new UnsupportedOperationException();
560 }
561
562 /** @hide */
563 @Override
Christopher Tate08992ac2017-03-21 11:37:06 -0700564 public ComponentName startForegroundServiceAsUser(Intent service, UserHandle user) {
565 throw new UnsupportedOperationException();
566 }
567
Christopher Tate42a386b2016-11-07 12:21:21 -0800568 /** @hide */
569 @Override
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700570 public boolean stopServiceAsUser(Intent service, UserHandle user) {
571 throw new UnsupportedOperationException();
572 }
573
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800574 @Override
575 public boolean bindService(Intent service, ServiceConnection conn, int flags) {
576 throw new UnsupportedOperationException();
577 }
578
Dianne Hackborn27b4d942018-11-12 15:01:40 -0800579 @Override
Bo Liu58a57662019-03-06 20:21:45 +0000580 public boolean bindService(Intent service, int flags, Executor executor,
581 ServiceConnection conn) {
582 throw new UnsupportedOperationException();
583 }
584
585 @Override
586 public boolean bindIsolatedService(Intent service, int flags, String instanceName,
587 Executor executor, ServiceConnection conn) {
Dianne Hackborn27b4d942018-11-12 15:01:40 -0800588 throw new UnsupportedOperationException();
589 }
590
Amith Yamasani37ce3a82012-02-06 12:04:42 -0800591 /** @hide */
592 @Override
Amith Yamasani27b89e62013-01-16 12:30:11 -0800593 public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags,
594 UserHandle user) {
Amith Yamasani37ce3a82012-02-06 12:04:42 -0800595 throw new UnsupportedOperationException();
596 }
597
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800598 @Override
Dianne Hackborna631d562018-11-20 15:58:15 -0800599 public void updateServiceGroup(ServiceConnection conn, int group, int importance) {
600 throw new UnsupportedOperationException();
601 }
602
603 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800604 public void unbindService(ServiceConnection conn) {
605 throw new UnsupportedOperationException();
606 }
607
608 @Override
609 public boolean startInstrumentation(ComponentName className,
610 String profileFile, Bundle arguments) {
611 throw new UnsupportedOperationException();
612 }
613
614 @Override
615 public Object getSystemService(String name) {
616 throw new UnsupportedOperationException();
617 }
618
619 @Override
Jeff Brown6e539312015-02-24 18:53:21 -0800620 public String getSystemServiceName(Class<?> serviceClass) {
621 throw new UnsupportedOperationException();
622 }
623
624 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800625 public int checkPermission(String permission, int pid, int uid) {
626 throw new UnsupportedOperationException();
627 }
628
Dianne Hackbornff170242014-11-19 10:59:01 -0800629 /** @hide */
630 @Override
631 public int checkPermission(String permission, int pid, int uid, IBinder callerToken) {
632 return checkPermission(permission, pid, uid);
633 }
634
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800635 @Override
636 public int checkCallingPermission(String permission) {
637 throw new UnsupportedOperationException();
638 }
639
640 @Override
641 public int checkCallingOrSelfPermission(String permission) {
642 throw new UnsupportedOperationException();
643 }
644
645 @Override
Svetoslavc6d1c342015-02-26 14:44:43 -0800646 public int checkSelfPermission(String permission) {
647 throw new UnsupportedOperationException();
648 }
649
650 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800651 public void enforcePermission(
652 String permission, int pid, int uid, String message) {
653 throw new UnsupportedOperationException();
654 }
655
656 @Override
657 public void enforceCallingPermission(String permission, String message) {
658 throw new UnsupportedOperationException();
659 }
660
661 @Override
662 public void enforceCallingOrSelfPermission(String permission, String message) {
663 throw new UnsupportedOperationException();
664 }
665
666 @Override
667 public void grantUriPermission(String toPackage, Uri uri, int modeFlags) {
668 throw new UnsupportedOperationException();
669 }
670
671 @Override
672 public void revokeUriPermission(Uri uri, int modeFlags) {
673 throw new UnsupportedOperationException();
674 }
675
676 @Override
Dianne Hackborna47223f2017-03-30 13:49:13 -0700677 public void revokeUriPermission(String targetPackage, Uri uri, int modeFlags) {
678 throw new UnsupportedOperationException();
679 }
680
681 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800682 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) {
683 throw new UnsupportedOperationException();
684 }
685
Dianne Hackbornff170242014-11-19 10:59:01 -0800686 /** @hide */
687 @Override
688 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags, IBinder callerToken) {
689 return checkUriPermission(uri, pid, uid, modeFlags);
690 }
691
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800692 @Override
693 public int checkCallingUriPermission(Uri uri, int modeFlags) {
694 throw new UnsupportedOperationException();
695 }
696
697 @Override
698 public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) {
699 throw new UnsupportedOperationException();
700 }
701
702 @Override
703 public int checkUriPermission(Uri uri, String readPermission,
704 String writePermission, int pid, int uid, int modeFlags) {
705 throw new UnsupportedOperationException();
706 }
707
708 @Override
709 public void enforceUriPermission(
710 Uri uri, int pid, int uid, int modeFlags, String message) {
711 throw new UnsupportedOperationException();
712 }
713
714 @Override
715 public void enforceCallingUriPermission(
716 Uri uri, int modeFlags, String message) {
717 throw new UnsupportedOperationException();
718 }
719
720 @Override
721 public void enforceCallingOrSelfUriPermission(
722 Uri uri, int modeFlags, String message) {
723 throw new UnsupportedOperationException();
724 }
725
726 public void enforceUriPermission(
727 Uri uri, String readPermission, String writePermission,
728 int pid, int uid, int modeFlags, String message) {
729 throw new UnsupportedOperationException();
730 }
731
732 @Override
733 public Context createPackageContext(String packageName, int flags)
734 throws PackageManager.NameNotFoundException {
735 throw new UnsupportedOperationException();
736 }
Romain Guy870e09f2009-07-06 16:35:25 -0700737
Jeff Sharkey6d515712012-09-20 16:06:08 -0700738 /** {@hide} */
739 @Override
Svetoslav976e8bd2014-07-16 15:12:03 -0700740 public Context createApplicationContext(ApplicationInfo application, int flags)
741 throws PackageManager.NameNotFoundException {
742 return null;
743 }
744
Adam Lesinski4e862812016-11-21 16:02:24 -0800745 /** @hide */
746 @Override
747 public Context createContextForSplit(String splitName)
748 throws PackageManager.NameNotFoundException {
749 throw new UnsupportedOperationException();
750 }
751
Svetoslav976e8bd2014-07-16 15:12:03 -0700752 /** {@hide} */
753 @Override
Jeff Sharkey6d515712012-09-20 16:06:08 -0700754 public Context createPackageContextAsUser(String packageName, int flags, UserHandle user)
755 throws PackageManager.NameNotFoundException {
756 throw new UnsupportedOperationException();
757 }
758
Jim Millera75a8832013-02-07 16:53:32 -0800759 /** {@hide} */
760 @Override
761 public int getUserId() {
762 throw new UnsupportedOperationException();
763 }
764
Romain Guy870e09f2009-07-06 16:35:25 -0700765 @Override
Dianne Hackborn756220b2012-08-14 16:45:30 -0700766 public Context createConfigurationContext(Configuration overrideConfiguration) {
767 throw new UnsupportedOperationException();
768 }
769
770 @Override
Jeff Browna492c3a2012-08-23 19:48:44 -0700771 public Context createDisplayContext(Display display) {
772 throw new UnsupportedOperationException();
773 }
774
775 @Override
Romain Guy870e09f2009-07-06 16:35:25 -0700776 public boolean isRestricted() {
Svetoslav976e8bd2014-07-16 15:12:03 -0700777 throw new UnsupportedOperationException();
Romain Guy870e09f2009-07-06 16:35:25 -0700778 }
Jeff Brown98365d72012-08-19 20:30:52 -0700779
780 /** @hide */
781 @Override
Craig Mautner48d0d182013-06-11 07:53:06 -0700782 public DisplayAdjustments getDisplayAdjustments(int displayId) {
Jeff Brown98365d72012-08-19 20:30:52 -0700783 throw new UnsupportedOperationException();
784 }
Jeff Sharkey7f392de2013-08-11 17:42:17 -0700785
Adam Lesinski4ece3d62016-06-16 18:05:41 -0700786 /** @hide */
787 @Override
788 public Display getDisplay() {
789 throw new UnsupportedOperationException();
790 }
791
Andrii Kulianb047b8b2017-02-08 18:38:26 -0800792 /** @hide */
793 @Override
Yohei Yukawa5281b6b2018-10-15 07:38:25 +0800794 public int getDisplayId() {
795 throw new UnsupportedOperationException();
796 }
797
798 /** @hide */
799 @Override
Andrii Kulianb047b8b2017-02-08 18:38:26 -0800800 public void updateDisplay(int displayId) {
801 throw new UnsupportedOperationException();
802 }
803
Jeff Sharkey7f392de2013-08-11 17:42:17 -0700804 @Override
805 public File[] getExternalFilesDirs(String type) {
806 throw new UnsupportedOperationException();
807 }
808
809 @Override
810 public File[] getObbDirs() {
811 throw new UnsupportedOperationException();
812 }
813
814 @Override
815 public File[] getExternalCacheDirs() {
816 throw new UnsupportedOperationException();
817 }
Jeff Sharkey2ee3c1e2014-05-30 15:38:35 -0700818
819 @Override
820 public File[] getExternalMediaDirs() {
821 throw new UnsupportedOperationException();
822 }
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700823
Fyodor Kupolov61221292016-09-02 15:21:03 -0700824 /** @hide **/
825 @Override
826 public File getPreloadsFileCache() { throw new UnsupportedOperationException(); }
827
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700828 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600829 public Context createDeviceProtectedStorageContext() {
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700830 throw new UnsupportedOperationException();
831 }
832
833 /** {@hide} */
834 @SystemApi
835 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600836 public Context createCredentialProtectedStorageContext() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700837 throw new UnsupportedOperationException();
838 }
839
840 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600841 public boolean isDeviceProtectedStorage() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700842 throw new UnsupportedOperationException();
843 }
844
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700845 /** {@hide} */
846 @SystemApi
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700847 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600848 public boolean isCredentialProtectedStorage() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700849 throw new UnsupportedOperationException();
850 }
Tony Mak46aabe52016-11-14 12:53:06 +0000851
852 /** {@hide} */
853 @Override
Seigo Nonaka6d6cd682017-06-22 08:22:18 -0700854 public boolean canLoadUnsafeResources() {
855 throw new UnsupportedOperationException();
856 }
857
858 /** {@hide} */
859 @Override
Tony Mak46aabe52016-11-14 12:53:06 +0000860 public IBinder getActivityToken() {
861 throw new UnsupportedOperationException();
862 }
863
864 /** {@hide} */
865 @Override
866 public IServiceConnection getServiceDispatcher(ServiceConnection conn, Handler handler,
867 int flags) {
868 throw new UnsupportedOperationException();
869 }
870
871 /** {@hide} */
872 @Override
873 public IApplicationThread getIApplicationThread() {
874 throw new UnsupportedOperationException();
875 }
Tony Makbf9928d2016-12-22 11:02:45 +0000876
877 /** {@hide} */
878 @Override
879 public Handler getMainThreadHandler() {
880 throw new UnsupportedOperationException();
881 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800882}