blob: 64d29787f75fd5aa426b7f71ba47886ce7f9d0b9 [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/**
55 * A mock {@link android.content.Context} class. All methods are non-functional and throw
56 * {@link java.lang.UnsupportedOperationException}. You can use this to inject other dependencies,
57 * mocks, or monitors into the classes you are testing.
58 */
59public class MockContext extends Context {
60
61 @Override
62 public AssetManager getAssets() {
63 throw new UnsupportedOperationException();
64 }
65
66 @Override
67 public Resources getResources() {
68 throw new UnsupportedOperationException();
69 }
70
71 @Override
72 public PackageManager getPackageManager() {
73 throw new UnsupportedOperationException();
74 }
75
76 @Override
77 public ContentResolver getContentResolver() {
78 throw new UnsupportedOperationException();
79 }
80
81 @Override
82 public Looper getMainLooper() {
83 throw new UnsupportedOperationException();
84 }
85
86 @Override
87 public Context getApplicationContext() {
88 throw new UnsupportedOperationException();
89 }
90
91 @Override
92 public void setTheme(int resid) {
93 throw new UnsupportedOperationException();
94 }
95
96 @Override
97 public Resources.Theme getTheme() {
98 throw new UnsupportedOperationException();
99 }
100
101 @Override
102 public ClassLoader getClassLoader() {
103 throw new UnsupportedOperationException();
104 }
105
106 @Override
107 public String getPackageName() {
108 throw new UnsupportedOperationException();
109 }
110
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800111 /** @hide */
112 @Override
113 public String getBasePackageName() {
114 throw new UnsupportedOperationException();
115 }
116
Dianne Hackborn95d78532013-09-11 09:51:14 -0700117 /** @hide */
118 @Override
119 public String getOpPackageName() {
120 throw new UnsupportedOperationException();
121 }
122
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800123 @Override
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700124 public ApplicationInfo getApplicationInfo() {
125 throw new UnsupportedOperationException();
126 }
127
128 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800129 public String getPackageResourcePath() {
130 throw new UnsupportedOperationException();
131 }
132
Joe Onorato23ecae32009-06-10 17:07:15 -0700133 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800134 public String getPackageCodePath() {
135 throw new UnsupportedOperationException();
136 }
137
138 @Override
139 public SharedPreferences getSharedPreferences(String name, int mode) {
140 throw new UnsupportedOperationException();
141 }
142
143 @Override
Jeff Sharkey8fc29cf2015-11-30 17:51:00 -0700144 public SharedPreferences getSharedPreferences(File file, int mode) {
145 throw new UnsupportedOperationException();
146 }
147
148 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800149 public FileInputStream openFileInput(String name) throws FileNotFoundException {
150 throw new UnsupportedOperationException();
151 }
152
153 @Override
154 public FileOutputStream openFileOutput(String name, int mode) throws FileNotFoundException {
155 throw new UnsupportedOperationException();
156 }
157
158 @Override
159 public boolean deleteFile(String name) {
160 throw new UnsupportedOperationException();
161 }
162
163 @Override
164 public File getFileStreamPath(String name) {
165 throw new UnsupportedOperationException();
166 }
167
168 @Override
Jeff Sharkey6a6cdafa2015-12-07 19:25:19 -0700169 public File getSharedPreferencesPath(String name) {
170 throw new UnsupportedOperationException();
171 }
172
173 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800174 public String[] fileList() {
175 throw new UnsupportedOperationException();
176 }
177
178 @Override
179 public File getFilesDir() {
180 throw new UnsupportedOperationException();
181 }
182
183 @Override
Christopher Tatea7835b62014-07-11 17:25:57 -0700184 public File getNoBackupFilesDir() {
185 throw new UnsupportedOperationException();
186 }
187
188 @Override
Dianne Hackborne83cefce2010-02-04 17:38:14 -0800189 public File getExternalFilesDir(String type) {
190 throw new UnsupportedOperationException();
191 }
192
193 @Override
Dianne Hackborn805fd7e2011-01-16 18:30:29 -0800194 public File getObbDir() {
195 throw new UnsupportedOperationException();
196 }
197
198 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800199 public File getCacheDir() {
200 throw new UnsupportedOperationException();
201 }
202
203 @Override
Jeff Sharkey4ed745d2014-07-15 20:39:15 -0700204 public File getCodeCacheDir() {
205 throw new UnsupportedOperationException();
206 }
207
208 @Override
Dianne Hackborne83cefce2010-02-04 17:38:14 -0800209 public File getExternalCacheDir() {
210 throw new UnsupportedOperationException();
211 }
212
213 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800214 public File getDir(String name, int mode) {
215 throw new UnsupportedOperationException();
216 }
217
218 @Override
219 public SQLiteDatabase openOrCreateDatabase(String file, int mode,
220 SQLiteDatabase.CursorFactory factory) {
221 throw new UnsupportedOperationException();
222 }
223
224 @Override
Vasu Nori74f170f2010-06-01 18:06:18 -0700225 public SQLiteDatabase openOrCreateDatabase(String file, int mode,
226 SQLiteDatabase.CursorFactory factory, DatabaseErrorHandler errorHandler) {
227 throw new UnsupportedOperationException();
228 }
229
230 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800231 public File getDatabasePath(String name) {
232 throw new UnsupportedOperationException();
233 }
234
235 @Override
236 public String[] databaseList() {
237 throw new UnsupportedOperationException();
238 }
239
240 @Override
241 public boolean deleteDatabase(String name) {
242 throw new UnsupportedOperationException();
243 }
244
245 @Override
246 public Drawable getWallpaper() {
247 throw new UnsupportedOperationException();
248 }
249
250 @Override
251 public Drawable peekWallpaper() {
252 throw new UnsupportedOperationException();
253 }
254
255 @Override
256 public int getWallpaperDesiredMinimumWidth() {
257 throw new UnsupportedOperationException();
258 }
259
260 @Override
261 public int getWallpaperDesiredMinimumHeight() {
262 throw new UnsupportedOperationException();
263 }
264
265 @Override
266 public void setWallpaper(Bitmap bitmap) throws IOException {
267 throw new UnsupportedOperationException();
268 }
269
270 @Override
271 public void setWallpaper(InputStream data) throws IOException {
272 throw new UnsupportedOperationException();
273 }
274
275 @Override
276 public void clearWallpaper() {
277 throw new UnsupportedOperationException();
278 }
279
280 @Override
281 public void startActivity(Intent intent) {
282 throw new UnsupportedOperationException();
283 }
284
285 @Override
Dianne Hackborna4972e92012-03-14 10:38:05 -0700286 public void startActivity(Intent intent, Bundle options) {
287 startActivity(intent);
288 }
289
290 @Override
Dianne Hackborn621e17d2010-11-22 15:59:56 -0800291 public void startActivities(Intent[] intents) {
292 throw new UnsupportedOperationException();
293 }
294
295 @Override
Dianne Hackborna4972e92012-03-14 10:38:05 -0700296 public void startActivities(Intent[] intents, Bundle options) {
297 startActivities(intents);
298 }
299
300 @Override
Dianne Hackbornfa82f222009-09-17 15:14:12 -0700301 public void startIntentSender(IntentSender intent,
302 Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)
303 throws IntentSender.SendIntentException {
304 throw new UnsupportedOperationException();
305 }
Dianne Hackborna4972e92012-03-14 10:38:05 -0700306
307 @Override
308 public void startIntentSender(IntentSender intent,
309 Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags,
310 Bundle options) throws IntentSender.SendIntentException {
311 startIntentSender(intent, fillInIntent, flagsMask, flagsValues, extraFlags);
312 }
Dianne Hackbornfa82f222009-09-17 15:14:12 -0700313
314 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800315 public void sendBroadcast(Intent intent) {
316 throw new UnsupportedOperationException();
317 }
318
Amith Yamasani67cf7d32012-02-16 14:31:23 -0800319 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800320 public void sendBroadcast(Intent intent, String receiverPermission) {
321 throw new UnsupportedOperationException();
322 }
323
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800324 /** @hide */
Fyodor Kupolovd4fd8c72015-07-13 19:19:25 -0700325 @Override
326 public void sendBroadcastMultiplePermissions(Intent intent, String[] receiverPermissions) {
327 throw new UnsupportedOperationException();
328 }
329
330 /** @hide */
Dianne Hackborna750a632015-06-16 17:18:23 -0700331 @SystemApi
332 @Override
333 public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
334 throw new UnsupportedOperationException();
335 }
336
337 /** @hide */
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800338 @Override
339 public void sendBroadcast(Intent intent, String receiverPermission, int appOp) {
340 throw new UnsupportedOperationException();
341 }
342
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800343 @Override
344 public void sendOrderedBroadcast(Intent intent,
345 String receiverPermission) {
346 throw new UnsupportedOperationException();
347 }
348
349 @Override
350 public void sendOrderedBroadcast(Intent intent, String receiverPermission,
351 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
352 Bundle initialExtras) {
353 throw new UnsupportedOperationException();
354 }
355
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800356 /** @hide */
Dianne Hackborna750a632015-06-16 17:18:23 -0700357 @SystemApi
358 @Override
359 public void sendOrderedBroadcast(Intent intent, String receiverPermission,
360 Bundle options, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
361 Bundle initialExtras) {
362 throw new UnsupportedOperationException();
363 }
364
365 /** @hide */
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800366 @Override
367 public void sendOrderedBroadcast(Intent intent, String receiverPermission, int appOp,
368 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
369 Bundle initialExtras) {
370 throw new UnsupportedOperationException();
371 }
372
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800373 @Override
Dianne Hackborn79af1dd2012-08-16 16:42:52 -0700374 public void sendBroadcastAsUser(Intent intent, UserHandle user) {
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700375 throw new UnsupportedOperationException();
376 }
377
378 @Override
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700379 public void sendBroadcastAsUser(Intent intent, UserHandle user,
380 String receiverPermission) {
381 throw new UnsupportedOperationException();
382 }
383
Svet Ganov16a16892015-04-16 10:32:04 -0700384 /** @hide */
385 @Override
386 public void sendBroadcastAsUser(Intent intent, UserHandle user,
387 String receiverPermission, int appOp) {
388 throw new UnsupportedOperationException();
389 }
390
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700391 @Override
Dianne Hackborn79af1dd2012-08-16 16:42:52 -0700392 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700393 String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler,
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700394 int initialCode, String initialData, Bundle initialExtras) {
395 throw new UnsupportedOperationException();
396 }
397
Amith Yamasani3cf75722014-05-16 12:37:29 -0700398 /** @hide */
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700399 @Override
Amith Yamasani3cf75722014-05-16 12:37:29 -0700400 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
401 String receiverPermission, int appOp, BroadcastReceiver resultReceiver,
Dianne Hackbornfd854ee2015-07-13 18:00:37 -0700402 Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
403 throw new UnsupportedOperationException();
404 }
405
406 /** @hide */
407 @Override
408 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
409 String receiverPermission, int appOp, Bundle options, BroadcastReceiver resultReceiver,
410 Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
Amith Yamasani3cf75722014-05-16 12:37:29 -0700411 throw new UnsupportedOperationException();
412 }
413
414 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800415 public void sendStickyBroadcast(Intent intent) {
416 throw new UnsupportedOperationException();
417 }
418
419 @Override
Dianne Hackbornefa199f2009-09-19 12:03:15 -0700420 public void sendStickyOrderedBroadcast(Intent intent,
421 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
422 Bundle initialExtras) {
423 throw new UnsupportedOperationException();
424 }
425
426 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800427 public void removeStickyBroadcast(Intent intent) {
428 throw new UnsupportedOperationException();
429 }
430
431 @Override
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700432 public void sendStickyBroadcastAsUser(Intent intent, UserHandle user) {
433 throw new UnsupportedOperationException();
434 }
435
Dianne Hackborne0e413e2015-12-09 17:22:26 -0800436 /** @hide */
437 @Override
438 public void sendStickyBroadcastAsUser(Intent intent, UserHandle user, Bundle options) {
439 throw new UnsupportedOperationException();
440 }
441
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700442 @Override
443 public void sendStickyOrderedBroadcastAsUser(Intent intent,
444 UserHandle user, BroadcastReceiver resultReceiver,
445 Handler scheduler, int initialCode, String initialData,
446 Bundle initialExtras) {
447 throw new UnsupportedOperationException();
448 }
449
450 @Override
451 public void removeStickyBroadcastAsUser(Intent intent, UserHandle user) {
452 throw new UnsupportedOperationException();
453 }
454
455 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800456 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
457 throw new UnsupportedOperationException();
458 }
459
460 @Override
461 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter,
462 String broadcastPermission, Handler scheduler) {
463 throw new UnsupportedOperationException();
464 }
465
Dianne Hackborn20e80982012-08-31 19:00:44 -0700466 /** @hide */
467 @Override
468 public Intent registerReceiverAsUser(BroadcastReceiver receiver, UserHandle user,
469 IntentFilter filter, String broadcastPermission, Handler scheduler) {
470 throw new UnsupportedOperationException();
471 }
472
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800473 @Override
474 public void unregisterReceiver(BroadcastReceiver receiver) {
475 throw new UnsupportedOperationException();
476 }
477
478 @Override
479 public ComponentName startService(Intent service) {
480 throw new UnsupportedOperationException();
481 }
482
483 @Override
484 public boolean stopService(Intent service) {
485 throw new UnsupportedOperationException();
486 }
487
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700488 /** @hide */
489 @Override
490 public ComponentName startServiceAsUser(Intent service, UserHandle user) {
491 throw new UnsupportedOperationException();
492 }
493
494 /** @hide */
495 @Override
496 public boolean stopServiceAsUser(Intent service, UserHandle user) {
497 throw new UnsupportedOperationException();
498 }
499
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800500 @Override
501 public boolean bindService(Intent service, ServiceConnection conn, int flags) {
502 throw new UnsupportedOperationException();
503 }
504
Amith Yamasani37ce3a82012-02-06 12:04:42 -0800505 /** @hide */
506 @Override
Amith Yamasani27b89e62013-01-16 12:30:11 -0800507 public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags,
508 UserHandle user) {
Amith Yamasani37ce3a82012-02-06 12:04:42 -0800509 throw new UnsupportedOperationException();
510 }
511
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800512 @Override
513 public void unbindService(ServiceConnection conn) {
514 throw new UnsupportedOperationException();
515 }
516
517 @Override
518 public boolean startInstrumentation(ComponentName className,
519 String profileFile, Bundle arguments) {
520 throw new UnsupportedOperationException();
521 }
522
523 @Override
524 public Object getSystemService(String name) {
525 throw new UnsupportedOperationException();
526 }
527
528 @Override
Jeff Brown6e539312015-02-24 18:53:21 -0800529 public String getSystemServiceName(Class<?> serviceClass) {
530 throw new UnsupportedOperationException();
531 }
532
533 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800534 public int checkPermission(String permission, int pid, int uid) {
535 throw new UnsupportedOperationException();
536 }
537
Dianne Hackbornff170242014-11-19 10:59:01 -0800538 /** @hide */
539 @Override
540 public int checkPermission(String permission, int pid, int uid, IBinder callerToken) {
541 return checkPermission(permission, pid, uid);
542 }
543
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800544 @Override
545 public int checkCallingPermission(String permission) {
546 throw new UnsupportedOperationException();
547 }
548
549 @Override
550 public int checkCallingOrSelfPermission(String permission) {
551 throw new UnsupportedOperationException();
552 }
553
554 @Override
Svetoslavc6d1c342015-02-26 14:44:43 -0800555 public int checkSelfPermission(String permission) {
556 throw new UnsupportedOperationException();
557 }
558
559 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800560 public void enforcePermission(
561 String permission, int pid, int uid, String message) {
562 throw new UnsupportedOperationException();
563 }
564
565 @Override
566 public void enforceCallingPermission(String permission, String message) {
567 throw new UnsupportedOperationException();
568 }
569
570 @Override
571 public void enforceCallingOrSelfPermission(String permission, String message) {
572 throw new UnsupportedOperationException();
573 }
574
575 @Override
576 public void grantUriPermission(String toPackage, Uri uri, int modeFlags) {
577 throw new UnsupportedOperationException();
578 }
579
580 @Override
581 public void revokeUriPermission(Uri uri, int modeFlags) {
582 throw new UnsupportedOperationException();
583 }
584
585 @Override
586 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) {
587 throw new UnsupportedOperationException();
588 }
589
Dianne Hackbornff170242014-11-19 10:59:01 -0800590 /** @hide */
591 @Override
592 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags, IBinder callerToken) {
593 return checkUriPermission(uri, pid, uid, modeFlags);
594 }
595
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800596 @Override
597 public int checkCallingUriPermission(Uri uri, int modeFlags) {
598 throw new UnsupportedOperationException();
599 }
600
601 @Override
602 public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) {
603 throw new UnsupportedOperationException();
604 }
605
606 @Override
607 public int checkUriPermission(Uri uri, String readPermission,
608 String writePermission, int pid, int uid, int modeFlags) {
609 throw new UnsupportedOperationException();
610 }
611
612 @Override
613 public void enforceUriPermission(
614 Uri uri, int pid, int uid, int modeFlags, String message) {
615 throw new UnsupportedOperationException();
616 }
617
618 @Override
619 public void enforceCallingUriPermission(
620 Uri uri, int modeFlags, String message) {
621 throw new UnsupportedOperationException();
622 }
623
624 @Override
625 public void enforceCallingOrSelfUriPermission(
626 Uri uri, int modeFlags, String message) {
627 throw new UnsupportedOperationException();
628 }
629
630 public void enforceUriPermission(
631 Uri uri, String readPermission, String writePermission,
632 int pid, int uid, int modeFlags, String message) {
633 throw new UnsupportedOperationException();
634 }
635
636 @Override
637 public Context createPackageContext(String packageName, int flags)
638 throws PackageManager.NameNotFoundException {
639 throw new UnsupportedOperationException();
640 }
Romain Guy870e09f2009-07-06 16:35:25 -0700641
Jeff Sharkey6d515712012-09-20 16:06:08 -0700642 /** {@hide} */
643 @Override
Svetoslav976e8bd2014-07-16 15:12:03 -0700644 public Context createApplicationContext(ApplicationInfo application, int flags)
645 throws PackageManager.NameNotFoundException {
646 return null;
647 }
648
649 /** {@hide} */
650 @Override
Jeff Sharkey6d515712012-09-20 16:06:08 -0700651 public Context createPackageContextAsUser(String packageName, int flags, UserHandle user)
652 throws PackageManager.NameNotFoundException {
653 throw new UnsupportedOperationException();
654 }
655
Jim Millera75a8832013-02-07 16:53:32 -0800656 /** {@hide} */
657 @Override
658 public int getUserId() {
659 throw new UnsupportedOperationException();
660 }
661
Romain Guy870e09f2009-07-06 16:35:25 -0700662 @Override
Dianne Hackborn756220b2012-08-14 16:45:30 -0700663 public Context createConfigurationContext(Configuration overrideConfiguration) {
664 throw new UnsupportedOperationException();
665 }
666
667 @Override
Jeff Browna492c3a2012-08-23 19:48:44 -0700668 public Context createDisplayContext(Display display) {
669 throw new UnsupportedOperationException();
670 }
671
672 @Override
Romain Guy870e09f2009-07-06 16:35:25 -0700673 public boolean isRestricted() {
Svetoslav976e8bd2014-07-16 15:12:03 -0700674 throw new UnsupportedOperationException();
Romain Guy870e09f2009-07-06 16:35:25 -0700675 }
Jeff Brown98365d72012-08-19 20:30:52 -0700676
677 /** @hide */
678 @Override
Craig Mautner48d0d182013-06-11 07:53:06 -0700679 public DisplayAdjustments getDisplayAdjustments(int displayId) {
Jeff Brown98365d72012-08-19 20:30:52 -0700680 throw new UnsupportedOperationException();
681 }
Jeff Sharkey7f392de2013-08-11 17:42:17 -0700682
683 @Override
684 public File[] getExternalFilesDirs(String type) {
685 throw new UnsupportedOperationException();
686 }
687
688 @Override
689 public File[] getObbDirs() {
690 throw new UnsupportedOperationException();
691 }
692
693 @Override
694 public File[] getExternalCacheDirs() {
695 throw new UnsupportedOperationException();
696 }
Jeff Sharkey2ee3c1e2014-05-30 15:38:35 -0700697
698 @Override
699 public File[] getExternalMediaDirs() {
700 throw new UnsupportedOperationException();
701 }
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700702
703 @Override
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700704 public Context createDeviceEncryptedStorageContext() {
705 throw new UnsupportedOperationException();
706 }
707
708 /** {@hide} */
709 @SystemApi
710 @Override
711 public Context createCredentialEncryptedStorageContext() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700712 throw new UnsupportedOperationException();
713 }
714
715 @Override
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700716 public boolean isDeviceEncryptedStorage() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700717 throw new UnsupportedOperationException();
718 }
719
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700720 /** {@hide} */
721 @SystemApi
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700722 @Override
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700723 public boolean isCredentialEncryptedStorage() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700724 throw new UnsupportedOperationException();
725 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800726}