blob: 9b93bda56ea5fcdb2f0e00b0127d403547a07ed8 [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;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080020import android.content.ComponentName;
21import android.content.ContentResolver;
22import android.content.Context;
23import android.content.Intent;
24import android.content.IntentFilter;
25import android.content.BroadcastReceiver;
Dianne Hackbornfa82f222009-09-17 15:14:12 -070026import android.content.IntentSender;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080027import android.content.ServiceConnection;
28import android.content.SharedPreferences;
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -070029import android.content.pm.ApplicationInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080030import android.content.pm.PackageManager;
31import android.content.res.AssetManager;
Dianne Hackborn756220b2012-08-14 16:45:30 -070032import android.content.res.Configuration;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080033import android.content.res.Resources;
Vasu Nori74f170f2010-06-01 18:06:18 -070034import android.database.DatabaseErrorHandler;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080035import android.database.sqlite.SQLiteDatabase;
36import android.graphics.Bitmap;
37import android.graphics.drawable.Drawable;
38import android.net.Uri;
39import android.os.Bundle;
40import android.os.Handler;
Dianne Hackbornff170242014-11-19 10:59:01 -080041import android.os.IBinder;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080042import android.os.Looper;
Dianne Hackborn79af1dd2012-08-16 16:42:52 -070043import android.os.UserHandle;
Craig Mautner48d0d182013-06-11 07:53:06 -070044import android.view.DisplayAdjustments;
Jeff Browna492c3a2012-08-23 19:48:44 -070045import android.view.Display;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080046
47import java.io.File;
48import java.io.FileInputStream;
49import java.io.FileNotFoundException;
50import java.io.FileOutputStream;
51import java.io.IOException;
52import java.io.InputStream;
53
54/**
Stephan Linznerb51617f2016-01-27 18:09:50 -080055 * A mock {@link android.content.Context} class. All methods are non-functional and throw
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080056 * {@link java.lang.UnsupportedOperationException}. You can use this to inject other dependencies,
57 * mocks, or monitors into the classes you are testing.
Stephan Linznerb51617f2016-01-27 18:09:50 -080058 *
59 * @deprecated Use a mocking framework like <a href="https://github.com/mockito/mockito">Mockito</a>.
60 * New tests should be written using the
61 * <a href="{@docRoot}tools/testing-support-library/index.html">Android Testing Support Library</a>.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080062 */
Stephan Linznerb51617f2016-01-27 18:09:50 -080063@Deprecated
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080064public class MockContext extends Context {
65
66 @Override
67 public AssetManager getAssets() {
68 throw new UnsupportedOperationException();
69 }
70
71 @Override
72 public Resources getResources() {
73 throw new UnsupportedOperationException();
74 }
75
76 @Override
77 public PackageManager getPackageManager() {
78 throw new UnsupportedOperationException();
79 }
80
81 @Override
82 public ContentResolver getContentResolver() {
83 throw new UnsupportedOperationException();
84 }
85
86 @Override
87 public Looper getMainLooper() {
88 throw new UnsupportedOperationException();
89 }
Stephan Linznerb51617f2016-01-27 18:09:50 -080090
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080091 @Override
92 public Context getApplicationContext() {
93 throw new UnsupportedOperationException();
94 }
Stephan Linznerb51617f2016-01-27 18:09:50 -080095
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080096 @Override
97 public void setTheme(int resid) {
98 throw new UnsupportedOperationException();
99 }
100
101 @Override
102 public Resources.Theme getTheme() {
103 throw new UnsupportedOperationException();
104 }
105
106 @Override
107 public ClassLoader getClassLoader() {
108 throw new UnsupportedOperationException();
109 }
110
111 @Override
112 public String getPackageName() {
113 throw new UnsupportedOperationException();
114 }
115
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800116 /** @hide */
117 @Override
118 public String getBasePackageName() {
119 throw new UnsupportedOperationException();
120 }
121
Dianne Hackborn95d78532013-09-11 09:51:14 -0700122 /** @hide */
123 @Override
124 public String getOpPackageName() {
125 throw new UnsupportedOperationException();
126 }
127
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800128 @Override
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700129 public ApplicationInfo getApplicationInfo() {
130 throw new UnsupportedOperationException();
131 }
Stephan Linznerb51617f2016-01-27 18:09:50 -0800132
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700133 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800134 public String getPackageResourcePath() {
135 throw new UnsupportedOperationException();
136 }
137
Joe Onorato23ecae32009-06-10 17:07:15 -0700138 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800139 public String getPackageCodePath() {
140 throw new UnsupportedOperationException();
141 }
142
143 @Override
144 public SharedPreferences getSharedPreferences(String name, int mode) {
145 throw new UnsupportedOperationException();
146 }
147
148 @Override
Jeff Sharkey8fc29cf2015-11-30 17:51:00 -0700149 public SharedPreferences getSharedPreferences(File file, int mode) {
150 throw new UnsupportedOperationException();
151 }
152
153 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800154 public FileInputStream openFileInput(String name) throws FileNotFoundException {
155 throw new UnsupportedOperationException();
156 }
157
158 @Override
159 public FileOutputStream openFileOutput(String name, int mode) throws FileNotFoundException {
160 throw new UnsupportedOperationException();
161 }
162
163 @Override
164 public boolean deleteFile(String name) {
165 throw new UnsupportedOperationException();
166 }
167
168 @Override
169 public File getFileStreamPath(String name) {
170 throw new UnsupportedOperationException();
171 }
172
173 @Override
Jeff Sharkey6a6cdafa2015-12-07 19:25:19 -0700174 public File getSharedPreferencesPath(String name) {
175 throw new UnsupportedOperationException();
176 }
177
178 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800179 public String[] fileList() {
180 throw new UnsupportedOperationException();
181 }
182
183 @Override
184 public File getFilesDir() {
185 throw new UnsupportedOperationException();
186 }
187
188 @Override
Christopher Tatea7835b62014-07-11 17:25:57 -0700189 public File getNoBackupFilesDir() {
190 throw new UnsupportedOperationException();
191 }
192
193 @Override
Dianne Hackborne83cefce2010-02-04 17:38:14 -0800194 public File getExternalFilesDir(String type) {
195 throw new UnsupportedOperationException();
196 }
197
198 @Override
Dianne Hackborn805fd7e2011-01-16 18:30:29 -0800199 public File getObbDir() {
200 throw new UnsupportedOperationException();
201 }
Stephan Linznerb51617f2016-01-27 18:09:50 -0800202
Dianne Hackborn805fd7e2011-01-16 18:30:29 -0800203 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800204 public File getCacheDir() {
205 throw new UnsupportedOperationException();
206 }
207
208 @Override
Jeff Sharkey4ed745d2014-07-15 20:39:15 -0700209 public File getCodeCacheDir() {
210 throw new UnsupportedOperationException();
211 }
212
213 @Override
Dianne Hackborne83cefce2010-02-04 17:38:14 -0800214 public File getExternalCacheDir() {
215 throw new UnsupportedOperationException();
216 }
217
218 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800219 public File getDir(String name, int mode) {
220 throw new UnsupportedOperationException();
221 }
222
223 @Override
Stephan Linznerb51617f2016-01-27 18:09:50 -0800224 public SQLiteDatabase openOrCreateDatabase(String file, int mode,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800225 SQLiteDatabase.CursorFactory factory) {
226 throw new UnsupportedOperationException();
227 }
228
229 @Override
Vasu Nori74f170f2010-06-01 18:06:18 -0700230 public SQLiteDatabase openOrCreateDatabase(String file, int mode,
231 SQLiteDatabase.CursorFactory factory, DatabaseErrorHandler errorHandler) {
232 throw new UnsupportedOperationException();
233 }
234
235 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800236 public File getDatabasePath(String name) {
237 throw new UnsupportedOperationException();
238 }
239
240 @Override
241 public String[] databaseList() {
242 throw new UnsupportedOperationException();
243 }
244
245 @Override
246 public boolean deleteDatabase(String name) {
247 throw new UnsupportedOperationException();
248 }
249
250 @Override
251 public Drawable getWallpaper() {
252 throw new UnsupportedOperationException();
253 }
254
255 @Override
256 public Drawable peekWallpaper() {
257 throw new UnsupportedOperationException();
258 }
259
260 @Override
261 public int getWallpaperDesiredMinimumWidth() {
262 throw new UnsupportedOperationException();
263 }
264
265 @Override
266 public int getWallpaperDesiredMinimumHeight() {
267 throw new UnsupportedOperationException();
268 }
269
270 @Override
271 public void setWallpaper(Bitmap bitmap) throws IOException {
272 throw new UnsupportedOperationException();
273 }
274
275 @Override
276 public void setWallpaper(InputStream data) throws IOException {
277 throw new UnsupportedOperationException();
278 }
279
280 @Override
281 public void clearWallpaper() {
282 throw new UnsupportedOperationException();
283 }
284
285 @Override
286 public void startActivity(Intent intent) {
287 throw new UnsupportedOperationException();
288 }
289
290 @Override
Dianne Hackborna4972e92012-03-14 10:38:05 -0700291 public void startActivity(Intent intent, Bundle options) {
292 startActivity(intent);
293 }
294
295 @Override
Dianne Hackborn621e17d2010-11-22 15:59:56 -0800296 public void startActivities(Intent[] intents) {
297 throw new UnsupportedOperationException();
298 }
299
300 @Override
Dianne Hackborna4972e92012-03-14 10:38:05 -0700301 public void startActivities(Intent[] intents, Bundle options) {
302 startActivities(intents);
303 }
304
305 @Override
Dianne Hackbornfa82f222009-09-17 15:14:12 -0700306 public void startIntentSender(IntentSender intent,
307 Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)
308 throws IntentSender.SendIntentException {
309 throw new UnsupportedOperationException();
310 }
Dianne Hackborna4972e92012-03-14 10:38:05 -0700311
312 @Override
313 public void startIntentSender(IntentSender intent,
314 Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags,
315 Bundle options) throws IntentSender.SendIntentException {
316 startIntentSender(intent, fillInIntent, flagsMask, flagsValues, extraFlags);
317 }
Stephan Linznerb51617f2016-01-27 18:09:50 -0800318
Dianne Hackbornfa82f222009-09-17 15:14:12 -0700319 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800320 public void sendBroadcast(Intent intent) {
321 throw new UnsupportedOperationException();
322 }
323
Amith Yamasani67cf7d32012-02-16 14:31:23 -0800324 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800325 public void sendBroadcast(Intent intent, String receiverPermission) {
326 throw new UnsupportedOperationException();
327 }
328
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800329 /** @hide */
Fyodor Kupolovd4fd8c72015-07-13 19:19:25 -0700330 @Override
331 public void sendBroadcastMultiplePermissions(Intent intent, String[] receiverPermissions) {
332 throw new UnsupportedOperationException();
333 }
334
335 /** @hide */
Dianne Hackborna750a632015-06-16 17:18:23 -0700336 @SystemApi
337 @Override
338 public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
339 throw new UnsupportedOperationException();
340 }
341
342 /** @hide */
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800343 @Override
344 public void sendBroadcast(Intent intent, String receiverPermission, int appOp) {
345 throw new UnsupportedOperationException();
346 }
347
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800348 @Override
349 public void sendOrderedBroadcast(Intent intent,
350 String receiverPermission) {
351 throw new UnsupportedOperationException();
352 }
353
354 @Override
355 public void sendOrderedBroadcast(Intent intent, String receiverPermission,
356 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
357 Bundle initialExtras) {
358 throw new UnsupportedOperationException();
359 }
360
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800361 /** @hide */
Dianne Hackborna750a632015-06-16 17:18:23 -0700362 @SystemApi
363 @Override
364 public void sendOrderedBroadcast(Intent intent, String receiverPermission,
365 Bundle options, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
366 Bundle initialExtras) {
367 throw new UnsupportedOperationException();
368 }
369
370 /** @hide */
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800371 @Override
372 public void sendOrderedBroadcast(Intent intent, String receiverPermission, int appOp,
373 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
374 Bundle initialExtras) {
375 throw new UnsupportedOperationException();
376 }
377
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800378 @Override
Dianne Hackborn79af1dd2012-08-16 16:42:52 -0700379 public void sendBroadcastAsUser(Intent intent, UserHandle user) {
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700380 throw new UnsupportedOperationException();
381 }
382
383 @Override
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700384 public void sendBroadcastAsUser(Intent intent, UserHandle user,
385 String receiverPermission) {
386 throw new UnsupportedOperationException();
387 }
388
Svet Ganov16a16892015-04-16 10:32:04 -0700389 /** @hide */
390 @Override
391 public void sendBroadcastAsUser(Intent intent, UserHandle user,
392 String receiverPermission, int appOp) {
393 throw new UnsupportedOperationException();
394 }
395
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700396 @Override
Dianne Hackborn79af1dd2012-08-16 16:42:52 -0700397 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700398 String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler,
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700399 int initialCode, String initialData, Bundle initialExtras) {
400 throw new UnsupportedOperationException();
401 }
402
Amith Yamasani3cf75722014-05-16 12:37:29 -0700403 /** @hide */
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700404 @Override
Amith Yamasani3cf75722014-05-16 12:37:29 -0700405 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
406 String receiverPermission, int appOp, BroadcastReceiver resultReceiver,
Dianne Hackbornfd854ee2015-07-13 18:00:37 -0700407 Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
408 throw new UnsupportedOperationException();
409 }
410
411 /** @hide */
412 @Override
413 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
414 String receiverPermission, int appOp, Bundle options, BroadcastReceiver resultReceiver,
415 Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
Amith Yamasani3cf75722014-05-16 12:37:29 -0700416 throw new UnsupportedOperationException();
417 }
418
419 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800420 public void sendStickyBroadcast(Intent intent) {
421 throw new UnsupportedOperationException();
422 }
423
424 @Override
Dianne Hackbornefa199f2009-09-19 12:03:15 -0700425 public void sendStickyOrderedBroadcast(Intent intent,
426 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
427 Bundle initialExtras) {
428 throw new UnsupportedOperationException();
429 }
430
431 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800432 public void removeStickyBroadcast(Intent intent) {
433 throw new UnsupportedOperationException();
434 }
435
436 @Override
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700437 public void sendStickyBroadcastAsUser(Intent intent, UserHandle user) {
438 throw new UnsupportedOperationException();
439 }
440
Dianne Hackborne0e413e2015-12-09 17:22:26 -0800441 /** @hide */
442 @Override
443 public void sendStickyBroadcastAsUser(Intent intent, UserHandle user, Bundle options) {
444 throw new UnsupportedOperationException();
445 }
446
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700447 @Override
448 public void sendStickyOrderedBroadcastAsUser(Intent intent,
449 UserHandle user, BroadcastReceiver resultReceiver,
450 Handler scheduler, int initialCode, String initialData,
451 Bundle initialExtras) {
452 throw new UnsupportedOperationException();
453 }
454
455 @Override
456 public void removeStickyBroadcastAsUser(Intent intent, UserHandle user) {
457 throw new UnsupportedOperationException();
458 }
459
460 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800461 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
462 throw new UnsupportedOperationException();
463 }
464
465 @Override
466 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter,
467 String broadcastPermission, Handler scheduler) {
468 throw new UnsupportedOperationException();
469 }
470
Dianne Hackborn20e80982012-08-31 19:00:44 -0700471 /** @hide */
472 @Override
473 public Intent registerReceiverAsUser(BroadcastReceiver receiver, UserHandle user,
474 IntentFilter filter, String broadcastPermission, Handler scheduler) {
475 throw new UnsupportedOperationException();
476 }
477
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800478 @Override
479 public void unregisterReceiver(BroadcastReceiver receiver) {
480 throw new UnsupportedOperationException();
481 }
482
483 @Override
484 public ComponentName startService(Intent service) {
485 throw new UnsupportedOperationException();
486 }
487
488 @Override
489 public boolean stopService(Intent service) {
490 throw new UnsupportedOperationException();
491 }
492
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700493 /** @hide */
494 @Override
495 public ComponentName startServiceAsUser(Intent service, UserHandle user) {
496 throw new UnsupportedOperationException();
497 }
498
499 /** @hide */
500 @Override
501 public boolean stopServiceAsUser(Intent service, UserHandle user) {
502 throw new UnsupportedOperationException();
503 }
504
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800505 @Override
506 public boolean bindService(Intent service, ServiceConnection conn, int flags) {
507 throw new UnsupportedOperationException();
508 }
509
Amith Yamasani37ce3a82012-02-06 12:04:42 -0800510 /** @hide */
511 @Override
Amith Yamasani27b89e62013-01-16 12:30:11 -0800512 public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags,
513 UserHandle user) {
Amith Yamasani37ce3a82012-02-06 12:04:42 -0800514 throw new UnsupportedOperationException();
515 }
516
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800517 @Override
518 public void unbindService(ServiceConnection conn) {
519 throw new UnsupportedOperationException();
520 }
521
522 @Override
523 public boolean startInstrumentation(ComponentName className,
524 String profileFile, Bundle arguments) {
525 throw new UnsupportedOperationException();
526 }
527
528 @Override
529 public Object getSystemService(String name) {
530 throw new UnsupportedOperationException();
531 }
532
533 @Override
Jeff Brown6e539312015-02-24 18:53:21 -0800534 public String getSystemServiceName(Class<?> serviceClass) {
535 throw new UnsupportedOperationException();
536 }
537
538 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800539 public int checkPermission(String permission, int pid, int uid) {
540 throw new UnsupportedOperationException();
541 }
542
Dianne Hackbornff170242014-11-19 10:59:01 -0800543 /** @hide */
544 @Override
545 public int checkPermission(String permission, int pid, int uid, IBinder callerToken) {
546 return checkPermission(permission, pid, uid);
547 }
548
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800549 @Override
550 public int checkCallingPermission(String permission) {
551 throw new UnsupportedOperationException();
552 }
553
554 @Override
555 public int checkCallingOrSelfPermission(String permission) {
556 throw new UnsupportedOperationException();
557 }
558
559 @Override
Svetoslavc6d1c342015-02-26 14:44:43 -0800560 public int checkSelfPermission(String permission) {
561 throw new UnsupportedOperationException();
562 }
563
564 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800565 public void enforcePermission(
566 String permission, int pid, int uid, String message) {
567 throw new UnsupportedOperationException();
568 }
569
570 @Override
571 public void enforceCallingPermission(String permission, String message) {
572 throw new UnsupportedOperationException();
573 }
574
575 @Override
576 public void enforceCallingOrSelfPermission(String permission, String message) {
577 throw new UnsupportedOperationException();
578 }
579
580 @Override
581 public void grantUriPermission(String toPackage, Uri uri, int modeFlags) {
582 throw new UnsupportedOperationException();
583 }
584
585 @Override
586 public void revokeUriPermission(Uri uri, int modeFlags) {
587 throw new UnsupportedOperationException();
588 }
589
590 @Override
591 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) {
592 throw new UnsupportedOperationException();
593 }
594
Dianne Hackbornff170242014-11-19 10:59:01 -0800595 /** @hide */
596 @Override
597 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags, IBinder callerToken) {
598 return checkUriPermission(uri, pid, uid, modeFlags);
599 }
600
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800601 @Override
602 public int checkCallingUriPermission(Uri uri, int modeFlags) {
603 throw new UnsupportedOperationException();
604 }
605
606 @Override
607 public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) {
608 throw new UnsupportedOperationException();
609 }
610
611 @Override
612 public int checkUriPermission(Uri uri, String readPermission,
613 String writePermission, int pid, int uid, int modeFlags) {
614 throw new UnsupportedOperationException();
615 }
616
617 @Override
618 public void enforceUriPermission(
619 Uri uri, int pid, int uid, int modeFlags, String message) {
620 throw new UnsupportedOperationException();
621 }
622
623 @Override
624 public void enforceCallingUriPermission(
625 Uri uri, int modeFlags, String message) {
626 throw new UnsupportedOperationException();
627 }
628
629 @Override
630 public void enforceCallingOrSelfUriPermission(
631 Uri uri, int modeFlags, String message) {
632 throw new UnsupportedOperationException();
633 }
634
635 public void enforceUriPermission(
636 Uri uri, String readPermission, String writePermission,
637 int pid, int uid, int modeFlags, String message) {
638 throw new UnsupportedOperationException();
639 }
640
641 @Override
642 public Context createPackageContext(String packageName, int flags)
643 throws PackageManager.NameNotFoundException {
644 throw new UnsupportedOperationException();
645 }
Romain Guy870e09f2009-07-06 16:35:25 -0700646
Jeff Sharkey6d515712012-09-20 16:06:08 -0700647 /** {@hide} */
648 @Override
Svetoslav976e8bd2014-07-16 15:12:03 -0700649 public Context createApplicationContext(ApplicationInfo application, int flags)
650 throws PackageManager.NameNotFoundException {
651 return null;
652 }
653
654 /** {@hide} */
655 @Override
Jeff Sharkey6d515712012-09-20 16:06:08 -0700656 public Context createPackageContextAsUser(String packageName, int flags, UserHandle user)
657 throws PackageManager.NameNotFoundException {
658 throw new UnsupportedOperationException();
659 }
660
Jim Millera75a8832013-02-07 16:53:32 -0800661 /** {@hide} */
662 @Override
663 public int getUserId() {
664 throw new UnsupportedOperationException();
665 }
666
Romain Guy870e09f2009-07-06 16:35:25 -0700667 @Override
Dianne Hackborn756220b2012-08-14 16:45:30 -0700668 public Context createConfigurationContext(Configuration overrideConfiguration) {
669 throw new UnsupportedOperationException();
670 }
671
672 @Override
Jeff Browna492c3a2012-08-23 19:48:44 -0700673 public Context createDisplayContext(Display display) {
674 throw new UnsupportedOperationException();
675 }
676
677 @Override
Romain Guy870e09f2009-07-06 16:35:25 -0700678 public boolean isRestricted() {
Svetoslav976e8bd2014-07-16 15:12:03 -0700679 throw new UnsupportedOperationException();
Romain Guy870e09f2009-07-06 16:35:25 -0700680 }
Jeff Brown98365d72012-08-19 20:30:52 -0700681
682 /** @hide */
683 @Override
Craig Mautner48d0d182013-06-11 07:53:06 -0700684 public DisplayAdjustments getDisplayAdjustments(int displayId) {
Jeff Brown98365d72012-08-19 20:30:52 -0700685 throw new UnsupportedOperationException();
686 }
Jeff Sharkey7f392de2013-08-11 17:42:17 -0700687
688 @Override
689 public File[] getExternalFilesDirs(String type) {
690 throw new UnsupportedOperationException();
691 }
692
693 @Override
694 public File[] getObbDirs() {
695 throw new UnsupportedOperationException();
696 }
697
698 @Override
699 public File[] getExternalCacheDirs() {
700 throw new UnsupportedOperationException();
701 }
Jeff Sharkey2ee3c1e2014-05-30 15:38:35 -0700702
703 @Override
704 public File[] getExternalMediaDirs() {
705 throw new UnsupportedOperationException();
706 }
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700707
708 @Override
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700709 public Context createDeviceEncryptedStorageContext() {
710 throw new UnsupportedOperationException();
711 }
712
713 /** {@hide} */
714 @SystemApi
715 @Override
716 public Context createCredentialEncryptedStorageContext() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700717 throw new UnsupportedOperationException();
718 }
719
720 @Override
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700721 public boolean isDeviceEncryptedStorage() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700722 throw new UnsupportedOperationException();
723 }
724
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700725 /** {@hide} */
726 @SystemApi
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700727 @Override
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700728 public boolean isCredentialEncryptedStorage() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700729 throw new UnsupportedOperationException();
730 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800731}