blob: a8eb9862202dd53275383b6f87591b6b959faef0 [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;
Christopher Tate42a386b2016-11-07 12:21:21 -080022import android.app.Notification;
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;
28import android.content.BroadcastReceiver;
Dianne Hackbornfa82f222009-09-17 15:14:12 -070029import android.content.IntentSender;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080030import android.content.ServiceConnection;
31import android.content.SharedPreferences;
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -070032import android.content.pm.ApplicationInfo;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080033import android.content.pm.PackageManager;
34import android.content.res.AssetManager;
Dianne Hackborn756220b2012-08-14 16:45:30 -070035import android.content.res.Configuration;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080036import android.content.res.Resources;
Vasu Nori74f170f2010-06-01 18:06:18 -070037import android.database.DatabaseErrorHandler;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080038import android.database.sqlite.SQLiteDatabase;
39import android.graphics.Bitmap;
40import android.graphics.drawable.Drawable;
41import android.net.Uri;
42import android.os.Bundle;
43import android.os.Handler;
Dianne Hackbornff170242014-11-19 10:59:01 -080044import android.os.IBinder;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080045import android.os.Looper;
Dianne Hackborn79af1dd2012-08-16 16:42:52 -070046import android.os.UserHandle;
Craig Mautner48d0d182013-06-11 07:53:06 -070047import android.view.DisplayAdjustments;
Jeff Browna492c3a2012-08-23 19:48:44 -070048import android.view.Display;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080049
50import java.io.File;
51import java.io.FileInputStream;
52import java.io.FileNotFoundException;
53import java.io.FileOutputStream;
54import java.io.IOException;
55import java.io.InputStream;
56
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
90 public Context getApplicationContext() {
91 throw new UnsupportedOperationException();
92 }
Stephan Linznerb51617f2016-01-27 18:09:50 -080093
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080094 @Override
95 public void setTheme(int resid) {
96 throw new UnsupportedOperationException();
97 }
98
99 @Override
100 public Resources.Theme getTheme() {
101 throw new UnsupportedOperationException();
102 }
103
104 @Override
105 public ClassLoader getClassLoader() {
106 throw new UnsupportedOperationException();
107 }
108
109 @Override
110 public String getPackageName() {
111 throw new UnsupportedOperationException();
112 }
113
Dianne Hackbornd8e1dbb2013-01-17 17:47:37 -0800114 /** @hide */
115 @Override
116 public String getBasePackageName() {
117 throw new UnsupportedOperationException();
118 }
119
Dianne Hackborn95d78532013-09-11 09:51:14 -0700120 /** @hide */
121 @Override
122 public String getOpPackageName() {
123 throw new UnsupportedOperationException();
124 }
125
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800126 @Override
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700127 public ApplicationInfo getApplicationInfo() {
128 throw new UnsupportedOperationException();
129 }
Stephan Linznerb51617f2016-01-27 18:09:50 -0800130
Dianne Hackborn5c1e00b2009-06-18 17:10:57 -0700131 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800132 public String getPackageResourcePath() {
133 throw new UnsupportedOperationException();
134 }
135
Joe Onorato23ecae32009-06-10 17:07:15 -0700136 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800137 public String getPackageCodePath() {
138 throw new UnsupportedOperationException();
139 }
140
141 @Override
142 public SharedPreferences getSharedPreferences(String name, int mode) {
143 throw new UnsupportedOperationException();
144 }
145
Jeff Sharkey70168dd2016-03-30 21:47:16 -0600146 /** @removed */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800147 @Override
Jeff Sharkey8fc29cf2015-11-30 17:51:00 -0700148 public SharedPreferences getSharedPreferences(File file, int mode) {
149 throw new UnsupportedOperationException();
150 }
151
152 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600153 public boolean moveSharedPreferencesFrom(Context sourceContext, String name) {
Jeff Sharkey35871f22016-01-29 17:13:29 -0700154 throw new UnsupportedOperationException();
155 }
156
157 @Override
158 public boolean deleteSharedPreferences(String name) {
159 throw new UnsupportedOperationException();
160 }
161
162 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800163 public FileInputStream openFileInput(String name) throws FileNotFoundException {
164 throw new UnsupportedOperationException();
165 }
166
167 @Override
168 public FileOutputStream openFileOutput(String name, int mode) throws FileNotFoundException {
169 throw new UnsupportedOperationException();
170 }
171
172 @Override
173 public boolean deleteFile(String name) {
174 throw new UnsupportedOperationException();
175 }
176
177 @Override
178 public File getFileStreamPath(String name) {
179 throw new UnsupportedOperationException();
180 }
181
Jeff Sharkey70168dd2016-03-30 21:47:16 -0600182 /** @removed */
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800183 @Override
Jeff Sharkey6a6cdafa2015-12-07 19:25:19 -0700184 public File getSharedPreferencesPath(String name) {
185 throw new UnsupportedOperationException();
186 }
187
188 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800189 public String[] fileList() {
190 throw new UnsupportedOperationException();
191 }
192
193 @Override
Jeff Sharkey2c1ba9a2016-02-17 15:29:38 -0700194 public File getDataDir() {
195 throw new UnsupportedOperationException();
196 }
197
198 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800199 public File getFilesDir() {
200 throw new UnsupportedOperationException();
201 }
202
203 @Override
Christopher Tatea7835b62014-07-11 17:25:57 -0700204 public File getNoBackupFilesDir() {
205 throw new UnsupportedOperationException();
206 }
207
208 @Override
Dianne Hackborne83cefce2010-02-04 17:38:14 -0800209 public File getExternalFilesDir(String type) {
210 throw new UnsupportedOperationException();
211 }
212
213 @Override
Dianne Hackborn805fd7e2011-01-16 18:30:29 -0800214 public File getObbDir() {
215 throw new UnsupportedOperationException();
216 }
Stephan Linznerb51617f2016-01-27 18:09:50 -0800217
Dianne Hackborn805fd7e2011-01-16 18:30:29 -0800218 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800219 public File getCacheDir() {
220 throw new UnsupportedOperationException();
221 }
222
223 @Override
Jeff Sharkey4ed745d2014-07-15 20:39:15 -0700224 public File getCodeCacheDir() {
225 throw new UnsupportedOperationException();
226 }
227
228 @Override
Dianne Hackborne83cefce2010-02-04 17:38:14 -0800229 public File getExternalCacheDir() {
230 throw new UnsupportedOperationException();
231 }
232
233 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800234 public File getDir(String name, int mode) {
235 throw new UnsupportedOperationException();
236 }
237
238 @Override
Stephan Linznerb51617f2016-01-27 18:09:50 -0800239 public SQLiteDatabase openOrCreateDatabase(String file, int mode,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800240 SQLiteDatabase.CursorFactory factory) {
241 throw new UnsupportedOperationException();
242 }
243
244 @Override
Vasu Nori74f170f2010-06-01 18:06:18 -0700245 public SQLiteDatabase openOrCreateDatabase(String file, int mode,
246 SQLiteDatabase.CursorFactory factory, DatabaseErrorHandler errorHandler) {
247 throw new UnsupportedOperationException();
248 }
249
250 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800251 public File getDatabasePath(String name) {
252 throw new UnsupportedOperationException();
253 }
254
255 @Override
256 public String[] databaseList() {
257 throw new UnsupportedOperationException();
258 }
259
260 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600261 public boolean moveDatabaseFrom(Context sourceContext, String name) {
Jeff Sharkey35871f22016-01-29 17:13:29 -0700262 throw new UnsupportedOperationException();
263 }
264
265 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800266 public boolean deleteDatabase(String name) {
267 throw new UnsupportedOperationException();
268 }
269
270 @Override
271 public Drawable getWallpaper() {
272 throw new UnsupportedOperationException();
273 }
274
275 @Override
276 public Drawable peekWallpaper() {
277 throw new UnsupportedOperationException();
278 }
279
280 @Override
281 public int getWallpaperDesiredMinimumWidth() {
282 throw new UnsupportedOperationException();
283 }
284
285 @Override
286 public int getWallpaperDesiredMinimumHeight() {
287 throw new UnsupportedOperationException();
288 }
289
290 @Override
291 public void setWallpaper(Bitmap bitmap) throws IOException {
292 throw new UnsupportedOperationException();
293 }
294
295 @Override
296 public void setWallpaper(InputStream data) throws IOException {
297 throw new UnsupportedOperationException();
298 }
299
300 @Override
301 public void clearWallpaper() {
302 throw new UnsupportedOperationException();
303 }
304
305 @Override
306 public void startActivity(Intent intent) {
307 throw new UnsupportedOperationException();
308 }
309
310 @Override
Dianne Hackborna4972e92012-03-14 10:38:05 -0700311 public void startActivity(Intent intent, Bundle options) {
312 startActivity(intent);
313 }
314
315 @Override
Dianne Hackborn621e17d2010-11-22 15:59:56 -0800316 public void startActivities(Intent[] intents) {
317 throw new UnsupportedOperationException();
318 }
319
320 @Override
Dianne Hackborna4972e92012-03-14 10:38:05 -0700321 public void startActivities(Intent[] intents, Bundle options) {
322 startActivities(intents);
323 }
324
325 @Override
Dianne Hackbornfa82f222009-09-17 15:14:12 -0700326 public void startIntentSender(IntentSender intent,
327 Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags)
328 throws IntentSender.SendIntentException {
329 throw new UnsupportedOperationException();
330 }
Dianne Hackborna4972e92012-03-14 10:38:05 -0700331
332 @Override
333 public void startIntentSender(IntentSender intent,
334 Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags,
335 Bundle options) throws IntentSender.SendIntentException {
336 startIntentSender(intent, fillInIntent, flagsMask, flagsValues, extraFlags);
337 }
Stephan Linznerb51617f2016-01-27 18:09:50 -0800338
Dianne Hackbornfa82f222009-09-17 15:14:12 -0700339 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800340 public void sendBroadcast(Intent intent) {
341 throw new UnsupportedOperationException();
342 }
343
Amith Yamasani67cf7d32012-02-16 14:31:23 -0800344 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800345 public void sendBroadcast(Intent intent, String receiverPermission) {
346 throw new UnsupportedOperationException();
347 }
348
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800349 /** @hide */
Fyodor Kupolovd4fd8c72015-07-13 19:19:25 -0700350 @Override
351 public void sendBroadcastMultiplePermissions(Intent intent, String[] receiverPermissions) {
352 throw new UnsupportedOperationException();
353 }
354
355 /** @hide */
Dianne Hackborna750a632015-06-16 17:18:23 -0700356 @SystemApi
357 @Override
358 public void sendBroadcast(Intent intent, String receiverPermission, Bundle options) {
359 throw new UnsupportedOperationException();
360 }
361
362 /** @hide */
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800363 @Override
364 public void sendBroadcast(Intent intent, String receiverPermission, int appOp) {
365 throw new UnsupportedOperationException();
366 }
367
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800368 @Override
369 public void sendOrderedBroadcast(Intent intent,
370 String receiverPermission) {
371 throw new UnsupportedOperationException();
372 }
373
374 @Override
375 public void sendOrderedBroadcast(Intent intent, String receiverPermission,
376 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
377 Bundle initialExtras) {
378 throw new UnsupportedOperationException();
379 }
380
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800381 /** @hide */
Dianne Hackborna750a632015-06-16 17:18:23 -0700382 @SystemApi
383 @Override
384 public void sendOrderedBroadcast(Intent intent, String receiverPermission,
385 Bundle options, BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
386 Bundle initialExtras) {
387 throw new UnsupportedOperationException();
388 }
389
390 /** @hide */
Dianne Hackbornf51f6122013-02-04 18:23:34 -0800391 @Override
392 public void sendOrderedBroadcast(Intent intent, String receiverPermission, int appOp,
393 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
394 Bundle initialExtras) {
395 throw new UnsupportedOperationException();
396 }
397
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800398 @Override
Dianne Hackborn79af1dd2012-08-16 16:42:52 -0700399 public void sendBroadcastAsUser(Intent intent, UserHandle user) {
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700400 throw new UnsupportedOperationException();
401 }
402
403 @Override
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700404 public void sendBroadcastAsUser(Intent intent, UserHandle user,
405 String receiverPermission) {
406 throw new UnsupportedOperationException();
407 }
408
Svet Ganov16a16892015-04-16 10:32:04 -0700409 /** @hide */
Chad Brubaker52c8edc2016-07-25 14:30:26 -0700410 @SystemApi
411 @Override
412 public void sendBroadcastAsUser(Intent intent, UserHandle user,
413 String receiverPermission, Bundle options) {
414 throw new UnsupportedOperationException();
415 }
416
417 /** @hide */
Svet Ganov16a16892015-04-16 10:32:04 -0700418 @Override
419 public void sendBroadcastAsUser(Intent intent, UserHandle user,
420 String receiverPermission, int appOp) {
421 throw new UnsupportedOperationException();
422 }
423
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700424 @Override
Dianne Hackborn79af1dd2012-08-16 16:42:52 -0700425 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700426 String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler,
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700427 int initialCode, String initialData, Bundle initialExtras) {
428 throw new UnsupportedOperationException();
429 }
430
Amith Yamasani3cf75722014-05-16 12:37:29 -0700431 /** @hide */
Dianne Hackborn7d19e022012-08-07 19:12:33 -0700432 @Override
Amith Yamasani3cf75722014-05-16 12:37:29 -0700433 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
434 String receiverPermission, int appOp, BroadcastReceiver resultReceiver,
Dianne Hackbornfd854ee2015-07-13 18:00:37 -0700435 Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
436 throw new UnsupportedOperationException();
437 }
438
439 /** @hide */
440 @Override
441 public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user,
442 String receiverPermission, int appOp, Bundle options, BroadcastReceiver resultReceiver,
443 Handler scheduler, int initialCode, String initialData, Bundle initialExtras) {
Amith Yamasani3cf75722014-05-16 12:37:29 -0700444 throw new UnsupportedOperationException();
445 }
446
447 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800448 public void sendStickyBroadcast(Intent intent) {
449 throw new UnsupportedOperationException();
450 }
451
452 @Override
Dianne Hackbornefa199f2009-09-19 12:03:15 -0700453 public void sendStickyOrderedBroadcast(Intent intent,
454 BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData,
455 Bundle initialExtras) {
456 throw new UnsupportedOperationException();
457 }
458
459 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800460 public void removeStickyBroadcast(Intent intent) {
461 throw new UnsupportedOperationException();
462 }
463
464 @Override
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700465 public void sendStickyBroadcastAsUser(Intent intent, UserHandle user) {
466 throw new UnsupportedOperationException();
467 }
468
Dianne Hackborne0e413e2015-12-09 17:22:26 -0800469 /** @hide */
470 @Override
471 public void sendStickyBroadcastAsUser(Intent intent, UserHandle user, Bundle options) {
472 throw new UnsupportedOperationException();
473 }
474
Dianne Hackborn5ac72a22012-08-29 18:32:08 -0700475 @Override
476 public void sendStickyOrderedBroadcastAsUser(Intent intent,
477 UserHandle user, BroadcastReceiver resultReceiver,
478 Handler scheduler, int initialCode, String initialData,
479 Bundle initialExtras) {
480 throw new UnsupportedOperationException();
481 }
482
483 @Override
484 public void removeStickyBroadcastAsUser(Intent intent, UserHandle user) {
485 throw new UnsupportedOperationException();
486 }
487
488 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800489 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
490 throw new UnsupportedOperationException();
491 }
492
493 @Override
494 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter,
Chad Brubaker816c83b2017-03-02 10:27:59 -0800495 boolean visibleToInstantApps) {
496 throw new UnsupportedOperationException();
497 }
498
499 @Override
500 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800501 String broadcastPermission, Handler scheduler) {
502 throw new UnsupportedOperationException();
503 }
504
Chad Brubaker816c83b2017-03-02 10:27:59 -0800505 @Override
506 public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter,
507 String broadcastPermission, Handler scheduler, boolean visibleToInstantApps) {
508 throw new UnsupportedOperationException();
509 }
510
Dianne Hackborn20e80982012-08-31 19:00:44 -0700511 /** @hide */
512 @Override
513 public Intent registerReceiverAsUser(BroadcastReceiver receiver, UserHandle user,
514 IntentFilter filter, String broadcastPermission, Handler scheduler) {
515 throw new UnsupportedOperationException();
516 }
517
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800518 @Override
519 public void unregisterReceiver(BroadcastReceiver receiver) {
520 throw new UnsupportedOperationException();
521 }
522
523 @Override
524 public ComponentName startService(Intent service) {
525 throw new UnsupportedOperationException();
526 }
527
528 @Override
Christopher Tate08992ac2017-03-21 11:37:06 -0700529 public ComponentName startForegroundService(Intent service) {
530 throw new UnsupportedOperationException();
531 }
532
533 /** STOPSHIP remove when trial API is turned down */
534 @Override
Christopher Tate42a386b2016-11-07 12:21:21 -0800535 public ComponentName startServiceInForeground(Intent service,
536 int id, Notification notification) {
537 throw new UnsupportedOperationException();
538 }
539
540 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800541 public boolean stopService(Intent service) {
542 throw new UnsupportedOperationException();
543 }
544
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700545 /** @hide */
546 @Override
547 public ComponentName startServiceAsUser(Intent service, UserHandle user) {
548 throw new UnsupportedOperationException();
549 }
550
551 /** @hide */
552 @Override
Christopher Tate08992ac2017-03-21 11:37:06 -0700553 public ComponentName startForegroundServiceAsUser(Intent service, UserHandle user) {
554 throw new UnsupportedOperationException();
555 }
556
557 /** @hide STOPSHIP removed when trial API is turned down */
558 @Override
Christopher Tate42a386b2016-11-07 12:21:21 -0800559 public ComponentName startServiceInForegroundAsUser(Intent service,
560 int id, Notification notification, UserHandle user) {
561 throw new UnsupportedOperationException();
562 }
563
564 /** @hide */
565 @Override
Dianne Hackborn7767eac2012-08-23 18:25:40 -0700566 public boolean stopServiceAsUser(Intent service, UserHandle user) {
567 throw new UnsupportedOperationException();
568 }
569
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800570 @Override
571 public boolean bindService(Intent service, ServiceConnection conn, int flags) {
572 throw new UnsupportedOperationException();
573 }
574
Amith Yamasani37ce3a82012-02-06 12:04:42 -0800575 /** @hide */
576 @Override
Amith Yamasani27b89e62013-01-16 12:30:11 -0800577 public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags,
578 UserHandle user) {
Amith Yamasani37ce3a82012-02-06 12:04:42 -0800579 throw new UnsupportedOperationException();
580 }
581
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800582 @Override
583 public void unbindService(ServiceConnection conn) {
584 throw new UnsupportedOperationException();
585 }
586
587 @Override
588 public boolean startInstrumentation(ComponentName className,
589 String profileFile, Bundle arguments) {
590 throw new UnsupportedOperationException();
591 }
592
593 @Override
594 public Object getSystemService(String name) {
595 throw new UnsupportedOperationException();
596 }
597
598 @Override
Jeff Brown6e539312015-02-24 18:53:21 -0800599 public String getSystemServiceName(Class<?> serviceClass) {
600 throw new UnsupportedOperationException();
601 }
602
603 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800604 public int checkPermission(String permission, int pid, int uid) {
605 throw new UnsupportedOperationException();
606 }
607
Dianne Hackbornff170242014-11-19 10:59:01 -0800608 /** @hide */
609 @Override
610 public int checkPermission(String permission, int pid, int uid, IBinder callerToken) {
611 return checkPermission(permission, pid, uid);
612 }
613
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800614 @Override
615 public int checkCallingPermission(String permission) {
616 throw new UnsupportedOperationException();
617 }
618
619 @Override
620 public int checkCallingOrSelfPermission(String permission) {
621 throw new UnsupportedOperationException();
622 }
623
624 @Override
Svetoslavc6d1c342015-02-26 14:44:43 -0800625 public int checkSelfPermission(String permission) {
626 throw new UnsupportedOperationException();
627 }
628
629 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800630 public void enforcePermission(
631 String permission, int pid, int uid, String message) {
632 throw new UnsupportedOperationException();
633 }
634
635 @Override
636 public void enforceCallingPermission(String permission, String message) {
637 throw new UnsupportedOperationException();
638 }
639
640 @Override
641 public void enforceCallingOrSelfPermission(String permission, String message) {
642 throw new UnsupportedOperationException();
643 }
644
645 @Override
646 public void grantUriPermission(String toPackage, Uri uri, int modeFlags) {
647 throw new UnsupportedOperationException();
648 }
649
650 @Override
651 public void revokeUriPermission(Uri uri, int modeFlags) {
652 throw new UnsupportedOperationException();
653 }
654
655 @Override
Dianne Hackborna47223f2017-03-30 13:49:13 -0700656 public void revokeUriPermission(String targetPackage, Uri uri, int modeFlags) {
657 throw new UnsupportedOperationException();
658 }
659
660 @Override
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800661 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) {
662 throw new UnsupportedOperationException();
663 }
664
Dianne Hackbornff170242014-11-19 10:59:01 -0800665 /** @hide */
666 @Override
667 public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags, IBinder callerToken) {
668 return checkUriPermission(uri, pid, uid, modeFlags);
669 }
670
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800671 @Override
672 public int checkCallingUriPermission(Uri uri, int modeFlags) {
673 throw new UnsupportedOperationException();
674 }
675
676 @Override
677 public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) {
678 throw new UnsupportedOperationException();
679 }
680
681 @Override
682 public int checkUriPermission(Uri uri, String readPermission,
683 String writePermission, int pid, int uid, int modeFlags) {
684 throw new UnsupportedOperationException();
685 }
686
687 @Override
688 public void enforceUriPermission(
689 Uri uri, int pid, int uid, int modeFlags, String message) {
690 throw new UnsupportedOperationException();
691 }
692
693 @Override
694 public void enforceCallingUriPermission(
695 Uri uri, int modeFlags, String message) {
696 throw new UnsupportedOperationException();
697 }
698
699 @Override
700 public void enforceCallingOrSelfUriPermission(
701 Uri uri, int modeFlags, String message) {
702 throw new UnsupportedOperationException();
703 }
704
705 public void enforceUriPermission(
706 Uri uri, String readPermission, String writePermission,
707 int pid, int uid, int modeFlags, String message) {
708 throw new UnsupportedOperationException();
709 }
710
711 @Override
712 public Context createPackageContext(String packageName, int flags)
713 throws PackageManager.NameNotFoundException {
714 throw new UnsupportedOperationException();
715 }
Romain Guy870e09f2009-07-06 16:35:25 -0700716
Jeff Sharkey6d515712012-09-20 16:06:08 -0700717 /** {@hide} */
718 @Override
Svetoslav976e8bd2014-07-16 15:12:03 -0700719 public Context createApplicationContext(ApplicationInfo application, int flags)
720 throws PackageManager.NameNotFoundException {
721 return null;
722 }
723
Adam Lesinski4e862812016-11-21 16:02:24 -0800724 /** @hide */
725 @Override
726 public Context createContextForSplit(String splitName)
727 throws PackageManager.NameNotFoundException {
728 throw new UnsupportedOperationException();
729 }
730
Svetoslav976e8bd2014-07-16 15:12:03 -0700731 /** {@hide} */
732 @Override
Jeff Sharkey6d515712012-09-20 16:06:08 -0700733 public Context createPackageContextAsUser(String packageName, int flags, UserHandle user)
734 throws PackageManager.NameNotFoundException {
735 throw new UnsupportedOperationException();
736 }
737
Jim Millera75a8832013-02-07 16:53:32 -0800738 /** {@hide} */
739 @Override
740 public int getUserId() {
741 throw new UnsupportedOperationException();
742 }
743
Romain Guy870e09f2009-07-06 16:35:25 -0700744 @Override
Dianne Hackborn756220b2012-08-14 16:45:30 -0700745 public Context createConfigurationContext(Configuration overrideConfiguration) {
746 throw new UnsupportedOperationException();
747 }
748
749 @Override
Jeff Browna492c3a2012-08-23 19:48:44 -0700750 public Context createDisplayContext(Display display) {
751 throw new UnsupportedOperationException();
752 }
753
754 @Override
Romain Guy870e09f2009-07-06 16:35:25 -0700755 public boolean isRestricted() {
Svetoslav976e8bd2014-07-16 15:12:03 -0700756 throw new UnsupportedOperationException();
Romain Guy870e09f2009-07-06 16:35:25 -0700757 }
Jeff Brown98365d72012-08-19 20:30:52 -0700758
759 /** @hide */
760 @Override
Craig Mautner48d0d182013-06-11 07:53:06 -0700761 public DisplayAdjustments getDisplayAdjustments(int displayId) {
Jeff Brown98365d72012-08-19 20:30:52 -0700762 throw new UnsupportedOperationException();
763 }
Jeff Sharkey7f392de2013-08-11 17:42:17 -0700764
Adam Lesinski4ece3d62016-06-16 18:05:41 -0700765 /** @hide */
766 @Override
767 public Display getDisplay() {
768 throw new UnsupportedOperationException();
769 }
770
Andrii Kulianb047b8b2017-02-08 18:38:26 -0800771 /** @hide */
772 @Override
773 public void updateDisplay(int displayId) {
774 throw new UnsupportedOperationException();
775 }
776
Jeff Sharkey7f392de2013-08-11 17:42:17 -0700777 @Override
778 public File[] getExternalFilesDirs(String type) {
779 throw new UnsupportedOperationException();
780 }
781
782 @Override
783 public File[] getObbDirs() {
784 throw new UnsupportedOperationException();
785 }
786
787 @Override
788 public File[] getExternalCacheDirs() {
789 throw new UnsupportedOperationException();
790 }
Jeff Sharkey2ee3c1e2014-05-30 15:38:35 -0700791
792 @Override
793 public File[] getExternalMediaDirs() {
794 throw new UnsupportedOperationException();
795 }
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700796
Fyodor Kupolov61221292016-09-02 15:21:03 -0700797 /** @hide **/
798 @Override
799 public File getPreloadsFileCache() { throw new UnsupportedOperationException(); }
800
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700801 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600802 public Context createDeviceProtectedStorageContext() {
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700803 throw new UnsupportedOperationException();
804 }
805
806 /** {@hide} */
807 @SystemApi
808 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600809 public Context createCredentialProtectedStorageContext() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700810 throw new UnsupportedOperationException();
811 }
812
813 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600814 public boolean isDeviceProtectedStorage() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700815 throw new UnsupportedOperationException();
816 }
817
Jeff Sharkeye13529a2015-12-09 14:15:27 -0700818 /** {@hide} */
819 @SystemApi
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700820 @Override
Jeff Sharkey8a372a02016-03-16 16:25:45 -0600821 public boolean isCredentialProtectedStorage() {
Jeff Sharkey7a30a302015-12-08 14:20:06 -0700822 throw new UnsupportedOperationException();
823 }
Tony Mak46aabe52016-11-14 12:53:06 +0000824
825 /** {@hide} */
826 @Override
827 public IBinder getActivityToken() {
828 throw new UnsupportedOperationException();
829 }
830
831 /** {@hide} */
832 @Override
833 public IServiceConnection getServiceDispatcher(ServiceConnection conn, Handler handler,
834 int flags) {
835 throw new UnsupportedOperationException();
836 }
837
838 /** {@hide} */
839 @Override
840 public IApplicationThread getIApplicationThread() {
841 throw new UnsupportedOperationException();
842 }
Tony Makbf9928d2016-12-22 11:02:45 +0000843
844 /** {@hide} */
845 @Override
846 public Handler getMainThreadHandler() {
847 throw new UnsupportedOperationException();
848 }
The Android Open Source Project9066cfe2009-03-03 19:31:44 -0800849}