| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.test.mock; |
| 18 | |
| 19 | import android.content.ComponentName; |
| 20 | import android.content.ContentResolver; |
| 21 | import android.content.Context; |
| 22 | import android.content.Intent; |
| 23 | import android.content.IntentFilter; |
| 24 | import android.content.BroadcastReceiver; |
| Dianne Hackborn | fa82f22 | 2009-09-17 15:14:12 -0700 | [diff] [blame] | 25 | import android.content.IntentSender; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 26 | import android.content.ServiceConnection; |
| 27 | import android.content.SharedPreferences; |
| Dianne Hackborn | 5c1e00b | 2009-06-18 17:10:57 -0700 | [diff] [blame] | 28 | import android.content.pm.ApplicationInfo; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 29 | import android.content.pm.PackageManager; |
| 30 | import android.content.res.AssetManager; |
| Dianne Hackborn | 756220b | 2012-08-14 16:45:30 -0700 | [diff] [blame] | 31 | import android.content.res.Configuration; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 32 | import android.content.res.Resources; |
| Vasu Nori | 74f170f | 2010-06-01 18:06:18 -0700 | [diff] [blame] | 33 | import android.database.DatabaseErrorHandler; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 34 | import android.database.sqlite.SQLiteDatabase; |
| 35 | import android.graphics.Bitmap; |
| 36 | import android.graphics.drawable.Drawable; |
| 37 | import android.net.Uri; |
| 38 | import android.os.Bundle; |
| 39 | import android.os.Handler; |
| 40 | import android.os.Looper; |
| Dianne Hackborn | 79af1dd | 2012-08-16 16:42:52 -0700 | [diff] [blame] | 41 | import android.os.UserHandle; |
| Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 42 | import android.view.CompatibilityInfoHolder; |
| Jeff Brown | a492c3a | 2012-08-23 19:48:44 -0700 | [diff] [blame] | 43 | import android.view.Display; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 44 | |
| 45 | import java.io.File; |
| 46 | import java.io.FileInputStream; |
| 47 | import java.io.FileNotFoundException; |
| 48 | import java.io.FileOutputStream; |
| 49 | import java.io.IOException; |
| 50 | import java.io.InputStream; |
| 51 | |
| 52 | /** |
| 53 | * A mock {@link android.content.Context} class. All methods are non-functional and throw |
| 54 | * {@link java.lang.UnsupportedOperationException}. You can use this to inject other dependencies, |
| 55 | * mocks, or monitors into the classes you are testing. |
| 56 | */ |
| 57 | public class MockContext extends Context { |
| 58 | |
| 59 | @Override |
| 60 | public AssetManager getAssets() { |
| 61 | throw new UnsupportedOperationException(); |
| 62 | } |
| 63 | |
| 64 | @Override |
| 65 | public Resources getResources() { |
| 66 | throw new UnsupportedOperationException(); |
| 67 | } |
| 68 | |
| 69 | @Override |
| 70 | public PackageManager getPackageManager() { |
| 71 | throw new UnsupportedOperationException(); |
| 72 | } |
| 73 | |
| 74 | @Override |
| 75 | public ContentResolver getContentResolver() { |
| 76 | throw new UnsupportedOperationException(); |
| 77 | } |
| 78 | |
| 79 | @Override |
| 80 | public Looper getMainLooper() { |
| 81 | throw new UnsupportedOperationException(); |
| 82 | } |
| 83 | |
| 84 | @Override |
| 85 | public Context getApplicationContext() { |
| 86 | throw new UnsupportedOperationException(); |
| 87 | } |
| 88 | |
| 89 | @Override |
| 90 | public void setTheme(int resid) { |
| 91 | throw new UnsupportedOperationException(); |
| 92 | } |
| 93 | |
| 94 | @Override |
| 95 | public Resources.Theme getTheme() { |
| 96 | throw new UnsupportedOperationException(); |
| 97 | } |
| 98 | |
| 99 | @Override |
| 100 | public ClassLoader getClassLoader() { |
| 101 | throw new UnsupportedOperationException(); |
| 102 | } |
| 103 | |
| 104 | @Override |
| 105 | public String getPackageName() { |
| 106 | throw new UnsupportedOperationException(); |
| 107 | } |
| 108 | |
| Dianne Hackborn | d8e1dbb | 2013-01-17 17:47:37 -0800 | [diff] [blame^] | 109 | /** @hide */ |
| 110 | @Override |
| 111 | public String getBasePackageName() { |
| 112 | throw new UnsupportedOperationException(); |
| 113 | } |
| 114 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 115 | @Override |
| Dianne Hackborn | 5c1e00b | 2009-06-18 17:10:57 -0700 | [diff] [blame] | 116 | public ApplicationInfo getApplicationInfo() { |
| 117 | throw new UnsupportedOperationException(); |
| 118 | } |
| 119 | |
| 120 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 121 | public String getPackageResourcePath() { |
| 122 | throw new UnsupportedOperationException(); |
| 123 | } |
| 124 | |
| Dianne Hackborn | 7f20543 | 2009-07-28 00:13:47 -0700 | [diff] [blame] | 125 | /** @hide */ |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 126 | @Override |
| Joe Onorato | 23ecae3 | 2009-06-10 17:07:15 -0700 | [diff] [blame] | 127 | public File getSharedPrefsFile(String name) { |
| 128 | throw new UnsupportedOperationException(); |
| 129 | } |
| 130 | |
| 131 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 132 | public String getPackageCodePath() { |
| 133 | throw new UnsupportedOperationException(); |
| 134 | } |
| 135 | |
| 136 | @Override |
| 137 | public SharedPreferences getSharedPreferences(String name, int mode) { |
| 138 | throw new UnsupportedOperationException(); |
| 139 | } |
| 140 | |
| 141 | @Override |
| 142 | public FileInputStream openFileInput(String name) throws FileNotFoundException { |
| 143 | throw new UnsupportedOperationException(); |
| 144 | } |
| 145 | |
| 146 | @Override |
| 147 | public FileOutputStream openFileOutput(String name, int mode) throws FileNotFoundException { |
| 148 | throw new UnsupportedOperationException(); |
| 149 | } |
| 150 | |
| 151 | @Override |
| 152 | public boolean deleteFile(String name) { |
| 153 | throw new UnsupportedOperationException(); |
| 154 | } |
| 155 | |
| 156 | @Override |
| 157 | public File getFileStreamPath(String name) { |
| 158 | throw new UnsupportedOperationException(); |
| 159 | } |
| 160 | |
| 161 | @Override |
| 162 | public String[] fileList() { |
| 163 | throw new UnsupportedOperationException(); |
| 164 | } |
| 165 | |
| 166 | @Override |
| 167 | public File getFilesDir() { |
| 168 | throw new UnsupportedOperationException(); |
| 169 | } |
| 170 | |
| 171 | @Override |
| Dianne Hackborn | e83cefce | 2010-02-04 17:38:14 -0800 | [diff] [blame] | 172 | public File getExternalFilesDir(String type) { |
| 173 | throw new UnsupportedOperationException(); |
| 174 | } |
| 175 | |
| 176 | @Override |
| Dianne Hackborn | 805fd7e | 2011-01-16 18:30:29 -0800 | [diff] [blame] | 177 | public File getObbDir() { |
| 178 | throw new UnsupportedOperationException(); |
| 179 | } |
| 180 | |
| 181 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 182 | public File getCacheDir() { |
| 183 | throw new UnsupportedOperationException(); |
| 184 | } |
| 185 | |
| 186 | @Override |
| Dianne Hackborn | e83cefce | 2010-02-04 17:38:14 -0800 | [diff] [blame] | 187 | public File getExternalCacheDir() { |
| 188 | throw new UnsupportedOperationException(); |
| 189 | } |
| 190 | |
| 191 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 192 | public File getDir(String name, int mode) { |
| 193 | throw new UnsupportedOperationException(); |
| 194 | } |
| 195 | |
| 196 | @Override |
| 197 | public SQLiteDatabase openOrCreateDatabase(String file, int mode, |
| 198 | SQLiteDatabase.CursorFactory factory) { |
| 199 | throw new UnsupportedOperationException(); |
| 200 | } |
| 201 | |
| 202 | @Override |
| Vasu Nori | 74f170f | 2010-06-01 18:06:18 -0700 | [diff] [blame] | 203 | public SQLiteDatabase openOrCreateDatabase(String file, int mode, |
| 204 | SQLiteDatabase.CursorFactory factory, DatabaseErrorHandler errorHandler) { |
| 205 | throw new UnsupportedOperationException(); |
| 206 | } |
| 207 | |
| 208 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 209 | public File getDatabasePath(String name) { |
| 210 | throw new UnsupportedOperationException(); |
| 211 | } |
| 212 | |
| 213 | @Override |
| 214 | public String[] databaseList() { |
| 215 | throw new UnsupportedOperationException(); |
| 216 | } |
| 217 | |
| 218 | @Override |
| 219 | public boolean deleteDatabase(String name) { |
| 220 | throw new UnsupportedOperationException(); |
| 221 | } |
| 222 | |
| 223 | @Override |
| 224 | public Drawable getWallpaper() { |
| 225 | throw new UnsupportedOperationException(); |
| 226 | } |
| 227 | |
| 228 | @Override |
| 229 | public Drawable peekWallpaper() { |
| 230 | throw new UnsupportedOperationException(); |
| 231 | } |
| 232 | |
| 233 | @Override |
| 234 | public int getWallpaperDesiredMinimumWidth() { |
| 235 | throw new UnsupportedOperationException(); |
| 236 | } |
| 237 | |
| 238 | @Override |
| 239 | public int getWallpaperDesiredMinimumHeight() { |
| 240 | throw new UnsupportedOperationException(); |
| 241 | } |
| 242 | |
| 243 | @Override |
| 244 | public void setWallpaper(Bitmap bitmap) throws IOException { |
| 245 | throw new UnsupportedOperationException(); |
| 246 | } |
| 247 | |
| 248 | @Override |
| 249 | public void setWallpaper(InputStream data) throws IOException { |
| 250 | throw new UnsupportedOperationException(); |
| 251 | } |
| 252 | |
| 253 | @Override |
| 254 | public void clearWallpaper() { |
| 255 | throw new UnsupportedOperationException(); |
| 256 | } |
| 257 | |
| 258 | @Override |
| 259 | public void startActivity(Intent intent) { |
| 260 | throw new UnsupportedOperationException(); |
| 261 | } |
| 262 | |
| 263 | @Override |
| Dianne Hackborn | a4972e9 | 2012-03-14 10:38:05 -0700 | [diff] [blame] | 264 | public void startActivity(Intent intent, Bundle options) { |
| 265 | startActivity(intent); |
| 266 | } |
| 267 | |
| 268 | @Override |
| Dianne Hackborn | 621e17d | 2010-11-22 15:59:56 -0800 | [diff] [blame] | 269 | public void startActivities(Intent[] intents) { |
| 270 | throw new UnsupportedOperationException(); |
| 271 | } |
| 272 | |
| 273 | @Override |
| Dianne Hackborn | a4972e9 | 2012-03-14 10:38:05 -0700 | [diff] [blame] | 274 | public void startActivities(Intent[] intents, Bundle options) { |
| 275 | startActivities(intents); |
| 276 | } |
| 277 | |
| 278 | @Override |
| Dianne Hackborn | fa82f22 | 2009-09-17 15:14:12 -0700 | [diff] [blame] | 279 | public void startIntentSender(IntentSender intent, |
| 280 | Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags) |
| 281 | throws IntentSender.SendIntentException { |
| 282 | throw new UnsupportedOperationException(); |
| 283 | } |
| Dianne Hackborn | a4972e9 | 2012-03-14 10:38:05 -0700 | [diff] [blame] | 284 | |
| 285 | @Override |
| 286 | public void startIntentSender(IntentSender intent, |
| 287 | Intent fillInIntent, int flagsMask, int flagsValues, int extraFlags, |
| 288 | Bundle options) throws IntentSender.SendIntentException { |
| 289 | startIntentSender(intent, fillInIntent, flagsMask, flagsValues, extraFlags); |
| 290 | } |
| Dianne Hackborn | fa82f22 | 2009-09-17 15:14:12 -0700 | [diff] [blame] | 291 | |
| 292 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 293 | public void sendBroadcast(Intent intent) { |
| 294 | throw new UnsupportedOperationException(); |
| 295 | } |
| 296 | |
| Amith Yamasani | 67cf7d3 | 2012-02-16 14:31:23 -0800 | [diff] [blame] | 297 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 298 | public void sendBroadcast(Intent intent, String receiverPermission) { |
| 299 | throw new UnsupportedOperationException(); |
| 300 | } |
| 301 | |
| 302 | @Override |
| 303 | public void sendOrderedBroadcast(Intent intent, |
| 304 | String receiverPermission) { |
| 305 | throw new UnsupportedOperationException(); |
| 306 | } |
| 307 | |
| 308 | @Override |
| 309 | public void sendOrderedBroadcast(Intent intent, String receiverPermission, |
| 310 | BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, |
| 311 | Bundle initialExtras) { |
| 312 | throw new UnsupportedOperationException(); |
| 313 | } |
| 314 | |
| 315 | @Override |
| Dianne Hackborn | 79af1dd | 2012-08-16 16:42:52 -0700 | [diff] [blame] | 316 | public void sendBroadcastAsUser(Intent intent, UserHandle user) { |
| Dianne Hackborn | 7d19e02 | 2012-08-07 19:12:33 -0700 | [diff] [blame] | 317 | throw new UnsupportedOperationException(); |
| 318 | } |
| 319 | |
| 320 | @Override |
| Dianne Hackborn | 5ac72a2 | 2012-08-29 18:32:08 -0700 | [diff] [blame] | 321 | public void sendBroadcastAsUser(Intent intent, UserHandle user, |
| 322 | String receiverPermission) { |
| 323 | throw new UnsupportedOperationException(); |
| 324 | } |
| 325 | |
| 326 | @Override |
| Dianne Hackborn | 79af1dd | 2012-08-16 16:42:52 -0700 | [diff] [blame] | 327 | public void sendOrderedBroadcastAsUser(Intent intent, UserHandle user, |
| Dianne Hackborn | 5ac72a2 | 2012-08-29 18:32:08 -0700 | [diff] [blame] | 328 | String receiverPermission, BroadcastReceiver resultReceiver, Handler scheduler, |
| Dianne Hackborn | 7d19e02 | 2012-08-07 19:12:33 -0700 | [diff] [blame] | 329 | int initialCode, String initialData, Bundle initialExtras) { |
| 330 | throw new UnsupportedOperationException(); |
| 331 | } |
| 332 | |
| 333 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 334 | public void sendStickyBroadcast(Intent intent) { |
| 335 | throw new UnsupportedOperationException(); |
| 336 | } |
| 337 | |
| 338 | @Override |
| Dianne Hackborn | efa199f | 2009-09-19 12:03:15 -0700 | [diff] [blame] | 339 | public void sendStickyOrderedBroadcast(Intent intent, |
| 340 | BroadcastReceiver resultReceiver, Handler scheduler, int initialCode, String initialData, |
| 341 | Bundle initialExtras) { |
| 342 | throw new UnsupportedOperationException(); |
| 343 | } |
| 344 | |
| 345 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 346 | public void removeStickyBroadcast(Intent intent) { |
| 347 | throw new UnsupportedOperationException(); |
| 348 | } |
| 349 | |
| 350 | @Override |
| Dianne Hackborn | 5ac72a2 | 2012-08-29 18:32:08 -0700 | [diff] [blame] | 351 | public void sendStickyBroadcastAsUser(Intent intent, UserHandle user) { |
| 352 | throw new UnsupportedOperationException(); |
| 353 | } |
| 354 | |
| 355 | @Override |
| 356 | public void sendStickyOrderedBroadcastAsUser(Intent intent, |
| 357 | UserHandle user, BroadcastReceiver resultReceiver, |
| 358 | Handler scheduler, int initialCode, String initialData, |
| 359 | Bundle initialExtras) { |
| 360 | throw new UnsupportedOperationException(); |
| 361 | } |
| 362 | |
| 363 | @Override |
| 364 | public void removeStickyBroadcastAsUser(Intent intent, UserHandle user) { |
| 365 | throw new UnsupportedOperationException(); |
| 366 | } |
| 367 | |
| 368 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 369 | public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) { |
| 370 | throw new UnsupportedOperationException(); |
| 371 | } |
| 372 | |
| 373 | @Override |
| 374 | public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter, |
| 375 | String broadcastPermission, Handler scheduler) { |
| 376 | throw new UnsupportedOperationException(); |
| 377 | } |
| 378 | |
| Dianne Hackborn | 20e8098 | 2012-08-31 19:00:44 -0700 | [diff] [blame] | 379 | /** @hide */ |
| 380 | @Override |
| 381 | public Intent registerReceiverAsUser(BroadcastReceiver receiver, UserHandle user, |
| 382 | IntentFilter filter, String broadcastPermission, Handler scheduler) { |
| 383 | throw new UnsupportedOperationException(); |
| 384 | } |
| 385 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 386 | @Override |
| 387 | public void unregisterReceiver(BroadcastReceiver receiver) { |
| 388 | throw new UnsupportedOperationException(); |
| 389 | } |
| 390 | |
| 391 | @Override |
| 392 | public ComponentName startService(Intent service) { |
| 393 | throw new UnsupportedOperationException(); |
| 394 | } |
| 395 | |
| 396 | @Override |
| 397 | public boolean stopService(Intent service) { |
| 398 | throw new UnsupportedOperationException(); |
| 399 | } |
| 400 | |
| Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 401 | /** @hide */ |
| 402 | @Override |
| 403 | public ComponentName startServiceAsUser(Intent service, UserHandle user) { |
| 404 | throw new UnsupportedOperationException(); |
| 405 | } |
| 406 | |
| 407 | /** @hide */ |
| 408 | @Override |
| 409 | public boolean stopServiceAsUser(Intent service, UserHandle user) { |
| 410 | throw new UnsupportedOperationException(); |
| 411 | } |
| 412 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 413 | @Override |
| 414 | public boolean bindService(Intent service, ServiceConnection conn, int flags) { |
| 415 | throw new UnsupportedOperationException(); |
| 416 | } |
| 417 | |
| Amith Yamasani | 37ce3a8 | 2012-02-06 12:04:42 -0800 | [diff] [blame] | 418 | /** @hide */ |
| 419 | @Override |
| Amith Yamasani | 27b89e6 | 2013-01-16 12:30:11 -0800 | [diff] [blame] | 420 | public boolean bindServiceAsUser(Intent service, ServiceConnection conn, int flags, |
| 421 | UserHandle user) { |
| Amith Yamasani | 37ce3a8 | 2012-02-06 12:04:42 -0800 | [diff] [blame] | 422 | throw new UnsupportedOperationException(); |
| 423 | } |
| 424 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 425 | @Override |
| 426 | public void unbindService(ServiceConnection conn) { |
| 427 | throw new UnsupportedOperationException(); |
| 428 | } |
| 429 | |
| 430 | @Override |
| 431 | public boolean startInstrumentation(ComponentName className, |
| 432 | String profileFile, Bundle arguments) { |
| 433 | throw new UnsupportedOperationException(); |
| 434 | } |
| 435 | |
| 436 | @Override |
| 437 | public Object getSystemService(String name) { |
| 438 | throw new UnsupportedOperationException(); |
| 439 | } |
| 440 | |
| 441 | @Override |
| 442 | public int checkPermission(String permission, int pid, int uid) { |
| 443 | throw new UnsupportedOperationException(); |
| 444 | } |
| 445 | |
| 446 | @Override |
| 447 | public int checkCallingPermission(String permission) { |
| 448 | throw new UnsupportedOperationException(); |
| 449 | } |
| 450 | |
| 451 | @Override |
| 452 | public int checkCallingOrSelfPermission(String permission) { |
| 453 | throw new UnsupportedOperationException(); |
| 454 | } |
| 455 | |
| 456 | @Override |
| 457 | public void enforcePermission( |
| 458 | String permission, int pid, int uid, String message) { |
| 459 | throw new UnsupportedOperationException(); |
| 460 | } |
| 461 | |
| 462 | @Override |
| 463 | public void enforceCallingPermission(String permission, String message) { |
| 464 | throw new UnsupportedOperationException(); |
| 465 | } |
| 466 | |
| 467 | @Override |
| 468 | public void enforceCallingOrSelfPermission(String permission, String message) { |
| 469 | throw new UnsupportedOperationException(); |
| 470 | } |
| 471 | |
| 472 | @Override |
| 473 | public void grantUriPermission(String toPackage, Uri uri, int modeFlags) { |
| 474 | throw new UnsupportedOperationException(); |
| 475 | } |
| 476 | |
| 477 | @Override |
| 478 | public void revokeUriPermission(Uri uri, int modeFlags) { |
| 479 | throw new UnsupportedOperationException(); |
| 480 | } |
| 481 | |
| 482 | @Override |
| 483 | public int checkUriPermission(Uri uri, int pid, int uid, int modeFlags) { |
| 484 | throw new UnsupportedOperationException(); |
| 485 | } |
| 486 | |
| 487 | @Override |
| 488 | public int checkCallingUriPermission(Uri uri, int modeFlags) { |
| 489 | throw new UnsupportedOperationException(); |
| 490 | } |
| 491 | |
| 492 | @Override |
| 493 | public int checkCallingOrSelfUriPermission(Uri uri, int modeFlags) { |
| 494 | throw new UnsupportedOperationException(); |
| 495 | } |
| 496 | |
| 497 | @Override |
| 498 | public int checkUriPermission(Uri uri, String readPermission, |
| 499 | String writePermission, int pid, int uid, int modeFlags) { |
| 500 | throw new UnsupportedOperationException(); |
| 501 | } |
| 502 | |
| 503 | @Override |
| 504 | public void enforceUriPermission( |
| 505 | Uri uri, int pid, int uid, int modeFlags, String message) { |
| 506 | throw new UnsupportedOperationException(); |
| 507 | } |
| 508 | |
| 509 | @Override |
| 510 | public void enforceCallingUriPermission( |
| 511 | Uri uri, int modeFlags, String message) { |
| 512 | throw new UnsupportedOperationException(); |
| 513 | } |
| 514 | |
| 515 | @Override |
| 516 | public void enforceCallingOrSelfUriPermission( |
| 517 | Uri uri, int modeFlags, String message) { |
| 518 | throw new UnsupportedOperationException(); |
| 519 | } |
| 520 | |
| 521 | public void enforceUriPermission( |
| 522 | Uri uri, String readPermission, String writePermission, |
| 523 | int pid, int uid, int modeFlags, String message) { |
| 524 | throw new UnsupportedOperationException(); |
| 525 | } |
| 526 | |
| 527 | @Override |
| 528 | public Context createPackageContext(String packageName, int flags) |
| 529 | throws PackageManager.NameNotFoundException { |
| 530 | throw new UnsupportedOperationException(); |
| 531 | } |
| Romain Guy | 870e09f | 2009-07-06 16:35:25 -0700 | [diff] [blame] | 532 | |
| Jeff Sharkey | 6d51571 | 2012-09-20 16:06:08 -0700 | [diff] [blame] | 533 | /** {@hide} */ |
| 534 | @Override |
| 535 | public Context createPackageContextAsUser(String packageName, int flags, UserHandle user) |
| 536 | throws PackageManager.NameNotFoundException { |
| 537 | throw new UnsupportedOperationException(); |
| 538 | } |
| 539 | |
| Romain Guy | 870e09f | 2009-07-06 16:35:25 -0700 | [diff] [blame] | 540 | @Override |
| Dianne Hackborn | 756220b | 2012-08-14 16:45:30 -0700 | [diff] [blame] | 541 | public Context createConfigurationContext(Configuration overrideConfiguration) { |
| 542 | throw new UnsupportedOperationException(); |
| 543 | } |
| 544 | |
| 545 | @Override |
| Jeff Brown | a492c3a | 2012-08-23 19:48:44 -0700 | [diff] [blame] | 546 | public Context createDisplayContext(Display display) { |
| 547 | throw new UnsupportedOperationException(); |
| 548 | } |
| 549 | |
| 550 | @Override |
| Romain Guy | 870e09f | 2009-07-06 16:35:25 -0700 | [diff] [blame] | 551 | public boolean isRestricted() { |
| 552 | throw new UnsupportedOperationException(); |
| 553 | } |
| Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 554 | |
| 555 | /** @hide */ |
| 556 | @Override |
| Jeff Brown | a492c3a | 2012-08-23 19:48:44 -0700 | [diff] [blame] | 557 | public CompatibilityInfoHolder getCompatibilityInfo(int displayId) { |
| Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 558 | throw new UnsupportedOperationException(); |
| 559 | } |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 560 | } |