| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2008 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 | |
| Christopher Tate | f1977b4 | 2014-03-24 16:25:51 -0700 | [diff] [blame] | 19 | import android.app.PackageInstallObserver; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 20 | import android.content.ComponentName; |
| 21 | import android.content.Intent; |
| 22 | import android.content.IntentFilter; |
| Suchi Amalapurapu | 1ccac75 | 2009-06-12 10:09:58 -0700 | [diff] [blame] | 23 | import android.content.IntentSender; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 24 | import android.content.pm.ActivityInfo; |
| 25 | import android.content.pm.ApplicationInfo; |
| Anonymous Coward | ceb1b0b | 2012-04-24 10:35:16 -0700 | [diff] [blame] | 26 | import android.content.pm.ContainerEncryptionParams; |
| Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 27 | import android.content.pm.FeatureInfo; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 28 | import android.content.pm.IPackageDataObserver; |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 29 | import android.content.pm.IPackageDeleteObserver; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | import android.content.pm.IPackageInstallObserver; |
| Suchi Amalapurapu | 8946dd3 | 2010-02-19 09:19:34 -0800 | [diff] [blame] | 31 | import android.content.pm.IPackageMoveObserver; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 32 | import android.content.pm.IPackageStatsObserver; |
| 33 | import android.content.pm.InstrumentationInfo; |
| dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 34 | import android.content.pm.KeySet; |
| Anonymous Coward | ceb1b0b | 2012-04-24 10:35:16 -0700 | [diff] [blame] | 35 | import android.content.pm.ManifestDigest; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 36 | import android.content.pm.PackageInfo; |
| Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 37 | import android.content.pm.PackageInstaller; |
| Nicolas Prevot | 7f7b0c7 | 2014-06-23 15:59:38 +0100 | [diff] [blame] | 38 | import android.content.pm.PackageItemInfo; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 39 | import android.content.pm.PackageManager; |
| 40 | import android.content.pm.PermissionGroupInfo; |
| 41 | import android.content.pm.PermissionInfo; |
| 42 | import android.content.pm.ProviderInfo; |
| 43 | import android.content.pm.ResolveInfo; |
| 44 | import android.content.pm.ServiceInfo; |
| rich cannings | 706e8ba | 2012-08-20 13:20:14 -0700 | [diff] [blame] | 45 | import android.content.pm.VerificationParams; |
| Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 46 | import android.content.pm.VerifierDeviceIdentity; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 47 | import android.content.res.Resources; |
| 48 | import android.content.res.XmlResourceParser; |
| Nicolas Prevot | 88cc346 | 2014-05-14 14:51:48 +0100 | [diff] [blame] | 49 | import android.graphics.Bitmap; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 50 | import android.graphics.drawable.Drawable; |
| 51 | import android.net.Uri; |
| Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 52 | import android.os.UserHandle; |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 53 | |
| 54 | import java.util.List; |
| 55 | |
| 56 | /** |
| 57 | * A mock {@link android.content.pm.PackageManager} class. All methods are non-functional and throw |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 58 | * {@link java.lang.UnsupportedOperationException}. Override it to provide the operations that you |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 59 | * need. |
| 60 | */ |
| 61 | public class MockPackageManager extends PackageManager { |
| 62 | |
| 63 | @Override |
| 64 | public PackageInfo getPackageInfo(String packageName, int flags) |
| 65 | throws NameNotFoundException { |
| 66 | throw new UnsupportedOperationException(); |
| 67 | } |
| 68 | |
| 69 | @Override |
| Dianne Hackborn | 4709693 | 2010-02-11 15:57:09 -0800 | [diff] [blame] | 70 | public String[] currentToCanonicalPackageNames(String[] names) { |
| 71 | throw new UnsupportedOperationException(); |
| 72 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 73 | |
| Dianne Hackborn | 4709693 | 2010-02-11 15:57:09 -0800 | [diff] [blame] | 74 | @Override |
| 75 | public String[] canonicalToCurrentPackageNames(String[] names) { |
| 76 | throw new UnsupportedOperationException(); |
| 77 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 78 | |
| Dianne Hackborn | 4709693 | 2010-02-11 15:57:09 -0800 | [diff] [blame] | 79 | @Override |
| Mihai Preda | eae850c | 2009-05-13 10:13:48 +0200 | [diff] [blame] | 80 | public Intent getLaunchIntentForPackage(String packageName) { |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 81 | throw new UnsupportedOperationException(); |
| 82 | } |
| Mihai Preda | eae850c | 2009-05-13 10:13:48 +0200 | [diff] [blame] | 83 | |
| 84 | @Override |
| Jose Lima | 970417c | 2014-04-10 10:42:19 -0700 | [diff] [blame] | 85 | public Intent getLeanbackLaunchIntentForPackage(String packageName) { |
| 86 | throw new UnsupportedOperationException(); |
| 87 | } |
| 88 | |
| 89 | @Override |
| 90 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 91 | public int[] getPackageGids(String packageName) throws NameNotFoundException { |
| 92 | throw new UnsupportedOperationException(); |
| 93 | } |
| 94 | |
| Dianne Hackborn | a06de0f | 2012-12-11 16:34:47 -0800 | [diff] [blame] | 95 | /** @hide */ |
| 96 | @Override |
| 97 | public int getPackageUid(String packageName, int userHandle) |
| 98 | throws NameNotFoundException { |
| 99 | throw new UnsupportedOperationException(); |
| 100 | } |
| 101 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 102 | @Override |
| 103 | public PermissionInfo getPermissionInfo(String name, int flags) |
| 104 | throws NameNotFoundException { |
| 105 | throw new UnsupportedOperationException(); |
| 106 | } |
| 107 | |
| 108 | @Override |
| 109 | public List<PermissionInfo> queryPermissionsByGroup(String group, int flags) |
| 110 | throws NameNotFoundException { |
| 111 | throw new UnsupportedOperationException(); |
| 112 | } |
| 113 | |
| 114 | @Override |
| 115 | public PermissionGroupInfo getPermissionGroupInfo(String name, |
| 116 | int flags) throws NameNotFoundException { |
| 117 | throw new UnsupportedOperationException(); |
| 118 | } |
| 119 | |
| 120 | @Override |
| 121 | public List<PermissionGroupInfo> getAllPermissionGroups(int flags) { |
| 122 | throw new UnsupportedOperationException(); |
| 123 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 124 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 125 | @Override |
| 126 | public ApplicationInfo getApplicationInfo(String packageName, int flags) |
| 127 | throws NameNotFoundException { |
| 128 | throw new UnsupportedOperationException(); |
| 129 | } |
| 130 | |
| 131 | @Override |
| 132 | public ActivityInfo getActivityInfo(ComponentName className, int flags) |
| 133 | throws NameNotFoundException { |
| 134 | throw new UnsupportedOperationException(); |
| 135 | } |
| 136 | |
| 137 | @Override |
| 138 | public ActivityInfo getReceiverInfo(ComponentName className, int flags) |
| 139 | throws NameNotFoundException { |
| 140 | throw new UnsupportedOperationException(); |
| 141 | } |
| 142 | |
| 143 | @Override |
| 144 | public ServiceInfo getServiceInfo(ComponentName className, int flags) |
| 145 | throws NameNotFoundException { |
| 146 | throw new UnsupportedOperationException(); |
| 147 | } |
| 148 | |
| 149 | @Override |
| Dianne Hackborn | 361199b | 2010-08-30 17:42:07 -0700 | [diff] [blame] | 150 | public ProviderInfo getProviderInfo(ComponentName className, int flags) |
| 151 | throws NameNotFoundException { |
| 152 | throw new UnsupportedOperationException(); |
| 153 | } |
| 154 | |
| 155 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 156 | public List<PackageInfo> getInstalledPackages(int flags) { |
| 157 | throw new UnsupportedOperationException(); |
| 158 | } |
| 159 | |
| Dianne Hackborn | e799175 | 2013-01-16 17:56:46 -0800 | [diff] [blame] | 160 | @Override |
| 161 | public List<PackageInfo> getPackagesHoldingPermissions(String[] permissions, |
| 162 | int flags) { |
| 163 | throw new UnsupportedOperationException(); |
| 164 | } |
| 165 | |
| Amith Yamasani | 151ec4c | 2012-09-07 19:25:16 -0700 | [diff] [blame] | 166 | /** @hide */ |
| 167 | @Override |
| 168 | public List<PackageInfo> getInstalledPackages(int flags, int userId) { |
| 169 | throw new UnsupportedOperationException(); |
| 170 | } |
| 171 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 172 | @Override |
| 173 | public int checkPermission(String permName, String pkgName) { |
| 174 | throw new UnsupportedOperationException(); |
| 175 | } |
| 176 | |
| 177 | @Override |
| 178 | public boolean addPermission(PermissionInfo info) { |
| 179 | throw new UnsupportedOperationException(); |
| 180 | } |
| 181 | |
| 182 | @Override |
| Dianne Hackborn | d7c0968 | 2010-03-30 10:42:20 -0700 | [diff] [blame] | 183 | public boolean addPermissionAsync(PermissionInfo info) { |
| 184 | throw new UnsupportedOperationException(); |
| 185 | } |
| 186 | |
| 187 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 188 | public void removePermission(String name) { |
| 189 | throw new UnsupportedOperationException(); |
| 190 | } |
| 191 | |
| Dianne Hackborn | e639da7 | 2012-02-21 15:11:13 -0800 | [diff] [blame] | 192 | /** @hide */ |
| 193 | @Override |
| 194 | public void grantPermission(String packageName, String permissionName) { |
| 195 | throw new UnsupportedOperationException(); |
| 196 | } |
| 197 | |
| 198 | /** @hide */ |
| 199 | @Override |
| 200 | public void revokePermission(String packageName, String permissionName) { |
| 201 | throw new UnsupportedOperationException(); |
| 202 | } |
| 203 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 204 | @Override |
| 205 | public int checkSignatures(String pkg1, String pkg2) { |
| 206 | throw new UnsupportedOperationException(); |
| 207 | } |
| 208 | |
| 209 | @Override |
| Dianne Hackborn | 766cbfe | 2009-08-12 18:33:39 -0700 | [diff] [blame] | 210 | public int checkSignatures(int uid1, int uid2) { |
| 211 | throw new UnsupportedOperationException(); |
| 212 | } |
| 213 | |
| 214 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 215 | public String[] getPackagesForUid(int uid) { |
| 216 | throw new UnsupportedOperationException(); |
| 217 | } |
| 218 | |
| 219 | @Override |
| 220 | public String getNameForUid(int uid) { |
| 221 | throw new UnsupportedOperationException(); |
| 222 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 223 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 224 | /** |
| 225 | * @hide - to match hiding in superclass |
| 226 | */ |
| 227 | @Override |
| 228 | public int getUidForSharedUser(String sharedUserName) { |
| 229 | throw new UnsupportedOperationException(); |
| 230 | } |
| 231 | |
| 232 | @Override |
| 233 | public List<ApplicationInfo> getInstalledApplications(int flags) { |
| 234 | throw new UnsupportedOperationException(); |
| 235 | } |
| 236 | |
| 237 | @Override |
| 238 | public ResolveInfo resolveActivity(Intent intent, int flags) { |
| 239 | throw new UnsupportedOperationException(); |
| 240 | } |
| 241 | |
| Svetoslav Ganov | 58d37b5 | 2012-09-18 12:04:19 -0700 | [diff] [blame] | 242 | /** @hide */ |
| 243 | @Override |
| 244 | public ResolveInfo resolveActivityAsUser(Intent intent, int flags, int userId) { |
| 245 | throw new UnsupportedOperationException(); |
| 246 | } |
| 247 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 248 | @Override |
| 249 | public List<ResolveInfo> queryIntentActivities(Intent intent, int flags) { |
| 250 | throw new UnsupportedOperationException(); |
| 251 | } |
| 252 | |
| Amith Yamasani | 151ec4c | 2012-09-07 19:25:16 -0700 | [diff] [blame] | 253 | /** @hide */ |
| 254 | @Override |
| Svetoslav Ganov | 58d37b5 | 2012-09-18 12:04:19 -0700 | [diff] [blame] | 255 | public List<ResolveInfo> queryIntentActivitiesAsUser(Intent intent, |
| Amith Yamasani | 151ec4c | 2012-09-07 19:25:16 -0700 | [diff] [blame] | 256 | int flags, int userId) { |
| 257 | throw new UnsupportedOperationException(); |
| 258 | } |
| 259 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 260 | @Override |
| 261 | public List<ResolveInfo> queryIntentActivityOptions(ComponentName caller, |
| 262 | Intent[] specifics, Intent intent, int flags) { |
| 263 | throw new UnsupportedOperationException(); |
| 264 | } |
| 265 | |
| 266 | @Override |
| 267 | public List<ResolveInfo> queryBroadcastReceivers(Intent intent, int flags) { |
| 268 | throw new UnsupportedOperationException(); |
| 269 | } |
| 270 | |
| Amith Yamasani | f203aee | 2012-08-29 18:41:53 -0700 | [diff] [blame] | 271 | /** @hide */ |
| 272 | @Override |
| 273 | public List<ResolveInfo> queryBroadcastReceivers(Intent intent, int flags, int userId) { |
| 274 | throw new UnsupportedOperationException(); |
| 275 | } |
| 276 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 277 | @Override |
| 278 | public ResolveInfo resolveService(Intent intent, int flags) { |
| 279 | throw new UnsupportedOperationException(); |
| 280 | } |
| 281 | |
| 282 | @Override |
| 283 | public List<ResolveInfo> queryIntentServices(Intent intent, int flags) { |
| 284 | throw new UnsupportedOperationException(); |
| 285 | } |
| 286 | |
| Svetoslav Ganov | 58d37b5 | 2012-09-18 12:04:19 -0700 | [diff] [blame] | 287 | /** @hide */ |
| 288 | @Override |
| 289 | public List<ResolveInfo> queryIntentServicesAsUser(Intent intent, int flags, int userId) { |
| 290 | throw new UnsupportedOperationException(); |
| 291 | } |
| 292 | |
| Jeff Sharkey | 85f5f81 | 2013-10-07 10:16:12 -0700 | [diff] [blame] | 293 | /** @hide */ |
| 294 | @Override |
| 295 | public List<ResolveInfo> queryIntentContentProvidersAsUser( |
| 296 | Intent intent, int flags, int userId) { |
| 297 | throw new UnsupportedOperationException(); |
| 298 | } |
| 299 | |
| 300 | @Override |
| 301 | public List<ResolveInfo> queryIntentContentProviders(Intent intent, int flags) { |
| 302 | throw new UnsupportedOperationException(); |
| 303 | } |
| 304 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 305 | @Override |
| 306 | public ProviderInfo resolveContentProvider(String name, int flags) { |
| 307 | throw new UnsupportedOperationException(); |
| 308 | } |
| 309 | |
| Alexandra Gherghina | 0363c3e | 2014-06-23 13:34:59 +0100 | [diff] [blame] | 310 | /** @hide */ |
| 311 | @Override |
| 312 | public ProviderInfo resolveContentProviderAsUser(String name, int flags, int userId) { |
| 313 | throw new UnsupportedOperationException(); |
| 314 | } |
| 315 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 316 | @Override |
| 317 | public List<ProviderInfo> queryContentProviders(String processName, int uid, int flags) { |
| 318 | throw new UnsupportedOperationException(); |
| 319 | } |
| 320 | |
| 321 | @Override |
| 322 | public InstrumentationInfo getInstrumentationInfo(ComponentName className, int flags) |
| 323 | throws NameNotFoundException { |
| 324 | throw new UnsupportedOperationException(); |
| 325 | } |
| 326 | |
| 327 | @Override |
| 328 | public List<InstrumentationInfo> queryInstrumentation( |
| 329 | String targetPackage, int flags) { |
| 330 | throw new UnsupportedOperationException(); |
| 331 | } |
| 332 | |
| 333 | @Override |
| 334 | public Drawable getDrawable(String packageName, int resid, ApplicationInfo appInfo) { |
| 335 | throw new UnsupportedOperationException(); |
| 336 | } |
| 337 | |
| 338 | @Override |
| 339 | public Drawable getActivityIcon(ComponentName activityName) |
| 340 | throws NameNotFoundException { |
| 341 | throw new UnsupportedOperationException(); |
| 342 | } |
| 343 | |
| 344 | @Override |
| 345 | public Drawable getActivityIcon(Intent intent) throws NameNotFoundException { |
| 346 | throw new UnsupportedOperationException(); |
| 347 | } |
| 348 | |
| 349 | @Override |
| 350 | public Drawable getDefaultActivityIcon() { |
| 351 | throw new UnsupportedOperationException(); |
| 352 | } |
| 353 | |
| 354 | @Override |
| Jose Lima | f78e312 | 2014-03-06 12:13:15 -0800 | [diff] [blame] | 355 | public Drawable getActivityBanner(ComponentName activityName) |
| 356 | throws NameNotFoundException { |
| 357 | throw new UnsupportedOperationException(); |
| 358 | } |
| 359 | |
| 360 | @Override |
| 361 | public Drawable getActivityBanner(Intent intent) throws NameNotFoundException { |
| 362 | throw new UnsupportedOperationException(); |
| 363 | } |
| 364 | |
| 365 | @Override |
| 366 | public Drawable getApplicationBanner(ApplicationInfo info) { |
| 367 | throw new UnsupportedOperationException(); |
| 368 | } |
| 369 | |
| 370 | @Override |
| 371 | public Drawable getApplicationBanner(String packageName) throws NameNotFoundException { |
| 372 | throw new UnsupportedOperationException(); |
| 373 | } |
| 374 | |
| 375 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 376 | public Drawable getApplicationIcon(ApplicationInfo info) { |
| 377 | throw new UnsupportedOperationException(); |
| 378 | } |
| 379 | |
| 380 | @Override |
| 381 | public Drawable getApplicationIcon(String packageName) throws NameNotFoundException { |
| 382 | throw new UnsupportedOperationException(); |
| 383 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 384 | |
| Adam Powell | 81cd2e9 | 2010-04-21 16:35:18 -0700 | [diff] [blame] | 385 | @Override |
| 386 | public Drawable getActivityLogo(ComponentName activityName) throws NameNotFoundException { |
| 387 | throw new UnsupportedOperationException(); |
| 388 | } |
| 389 | |
| 390 | @Override |
| 391 | public Drawable getActivityLogo(Intent intent) throws NameNotFoundException { |
| 392 | throw new UnsupportedOperationException(); |
| 393 | } |
| 394 | |
| 395 | @Override |
| 396 | public Drawable getApplicationLogo(ApplicationInfo info) { |
| 397 | throw new UnsupportedOperationException(); |
| 398 | } |
| 399 | |
| 400 | @Override |
| 401 | public Drawable getApplicationLogo(String packageName) throws NameNotFoundException { |
| 402 | throw new UnsupportedOperationException(); |
| 403 | } |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 404 | |
| 405 | @Override |
| 406 | public CharSequence getText(String packageName, int resid, ApplicationInfo appInfo) { |
| 407 | throw new UnsupportedOperationException(); |
| 408 | } |
| 409 | |
| 410 | @Override |
| 411 | public XmlResourceParser getXml(String packageName, int resid, |
| 412 | ApplicationInfo appInfo) { |
| 413 | throw new UnsupportedOperationException(); |
| 414 | } |
| 415 | |
| 416 | @Override |
| 417 | public CharSequence getApplicationLabel(ApplicationInfo info) { |
| 418 | throw new UnsupportedOperationException(); |
| 419 | } |
| 420 | |
| 421 | @Override |
| 422 | public Resources getResourcesForActivity(ComponentName activityName) |
| 423 | throws NameNotFoundException { |
| 424 | throw new UnsupportedOperationException(); |
| 425 | } |
| 426 | |
| 427 | @Override |
| 428 | public Resources getResourcesForApplication(ApplicationInfo app) { |
| 429 | throw new UnsupportedOperationException(); |
| 430 | } |
| 431 | |
| 432 | @Override |
| 433 | public Resources getResourcesForApplication(String appPackageName) |
| 434 | throws NameNotFoundException { |
| 435 | throw new UnsupportedOperationException(); |
| 436 | } |
| 437 | |
| Amith Yamasani | 98edc95 | 2012-09-25 14:09:27 -0700 | [diff] [blame] | 438 | /** @hide */ |
| 439 | @Override |
| 440 | public Resources getResourcesForApplicationAsUser(String appPackageName, int userId) { |
| 441 | throw new UnsupportedOperationException(); |
| 442 | } |
| 443 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 444 | @Override |
| 445 | public PackageInfo getPackageArchiveInfo(String archiveFilePath, int flags) { |
| 446 | throw new UnsupportedOperationException(); |
| 447 | } |
| 448 | |
| Dianne Hackborn | ade3eca | 2009-05-11 18:54:45 -0700 | [diff] [blame] | 449 | /** |
| 450 | * @hide - to match hiding in superclass |
| 451 | */ |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 452 | @Override |
| 453 | public void installPackage(Uri packageURI, IPackageInstallObserver observer, |
| Jacek Surazski | 65e1317 | 2009-04-28 15:26:38 +0200 | [diff] [blame] | 454 | int flags, String installerPackageName) { |
| 455 | throw new UnsupportedOperationException(); |
| 456 | } |
| Suchi Amalapurapu | 8946dd3 | 2010-02-19 09:19:34 -0800 | [diff] [blame] | 457 | |
| Dianne Hackborn | 880119b | 2010-11-18 22:26:40 -0800 | [diff] [blame] | 458 | @Override |
| 459 | public void setInstallerPackageName(String targetPackage, |
| 460 | String installerPackageName) { |
| 461 | throw new UnsupportedOperationException(); |
| 462 | } |
| 463 | |
| Suchi Amalapurapu | 8946dd3 | 2010-02-19 09:19:34 -0800 | [diff] [blame] | 464 | /** |
| 465 | * @hide - to match hiding in superclass |
| 466 | */ |
| 467 | @Override |
| 468 | public void movePackage(String packageName, IPackageMoveObserver observer, int flags) { |
| 469 | throw new UnsupportedOperationException(); |
| 470 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 471 | |
| Jacek Surazski | 65e1317 | 2009-04-28 15:26:38 +0200 | [diff] [blame] | 472 | @Override |
| 473 | public String getInstallerPackageName(String packageName) { |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 474 | throw new UnsupportedOperationException(); |
| 475 | } |
| 476 | |
| 477 | /** |
| 478 | * @hide - to match hiding in superclass |
| 479 | */ |
| 480 | @Override |
| 481 | public void clearApplicationUserData( |
| 482 | String packageName, IPackageDataObserver observer) { |
| 483 | throw new UnsupportedOperationException(); |
| 484 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 485 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 486 | /** |
| 487 | * @hide - to match hiding in superclass |
| 488 | */ |
| 489 | @Override |
| 490 | public void deleteApplicationCacheFiles( |
| 491 | String packageName, IPackageDataObserver observer) { |
| 492 | throw new UnsupportedOperationException(); |
| 493 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 494 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 495 | /** |
| 496 | * @hide - to match hiding in superclass |
| 497 | */ |
| 498 | @Override |
| 499 | public void freeStorageAndNotify( |
| 500 | long idealStorageSize, IPackageDataObserver observer) { |
| 501 | throw new UnsupportedOperationException(); |
| 502 | } |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 503 | |
| 504 | /** |
| 505 | * @hide - to match hiding in superclass |
| 506 | */ |
| 507 | @Override |
| Suchi Amalapurapu | bc806f6 | 2009-06-17 15:18:19 -0700 | [diff] [blame] | 508 | public void freeStorage( |
| Suchi Amalapurapu | 1ccac75 | 2009-06-12 10:09:58 -0700 | [diff] [blame] | 509 | long idealStorageSize, IntentSender pi) { |
| 510 | throw new UnsupportedOperationException(); |
| 511 | } |
| 512 | |
| 513 | /** |
| 514 | * @hide - to match hiding in superclass |
| 515 | */ |
| 516 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 517 | public void deletePackage( |
| 518 | String packageName, IPackageDeleteObserver observer, int flags) { |
| 519 | throw new UnsupportedOperationException(); |
| 520 | } |
| 521 | |
| 522 | @Override |
| 523 | public void addPackageToPreferred(String packageName) { |
| 524 | throw new UnsupportedOperationException(); |
| 525 | } |
| 526 | |
| 527 | @Override |
| 528 | public void removePackageFromPreferred(String packageName) { |
| 529 | throw new UnsupportedOperationException(); |
| 530 | } |
| 531 | |
| 532 | @Override |
| 533 | public List<PackageInfo> getPreferredPackages(int flags) { |
| 534 | throw new UnsupportedOperationException(); |
| 535 | } |
| 536 | |
| 537 | @Override |
| 538 | public void setComponentEnabledSetting(ComponentName componentName, |
| 539 | int newState, int flags) { |
| 540 | throw new UnsupportedOperationException(); |
| 541 | } |
| 542 | |
| 543 | @Override |
| 544 | public int getComponentEnabledSetting(ComponentName componentName) { |
| 545 | throw new UnsupportedOperationException(); |
| 546 | } |
| 547 | |
| 548 | @Override |
| 549 | public void setApplicationEnabledSetting(String packageName, int newState, int flags) { |
| 550 | throw new UnsupportedOperationException(); |
| 551 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 552 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 553 | @Override |
| 554 | public int getApplicationEnabledSetting(String packageName) { |
| 555 | throw new UnsupportedOperationException(); |
| 556 | } |
| 557 | |
| 558 | @Override |
| 559 | public void addPreferredActivity(IntentFilter filter, |
| 560 | int match, ComponentName[] set, ComponentName activity) { |
| 561 | throw new UnsupportedOperationException(); |
| 562 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 563 | |
| Satish Sampath | 8dbe612 | 2009-06-02 23:35:54 +0100 | [diff] [blame] | 564 | /** |
| 565 | * @hide - to match hiding in superclass |
| 566 | */ |
| 567 | @Override |
| 568 | public void replacePreferredActivity(IntentFilter filter, |
| 569 | int match, ComponentName[] set, ComponentName activity) { |
| 570 | throw new UnsupportedOperationException(); |
| 571 | } |
| 572 | |
| 573 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 574 | @Override |
| 575 | public void clearPackagePreferredActivities(String packageName) { |
| 576 | throw new UnsupportedOperationException(); |
| 577 | } |
| 578 | |
| 579 | /** |
| 580 | * @hide - to match hiding in superclass |
| 581 | */ |
| 582 | @Override |
| Dianne Hackborn | 0c38049 | 2012-08-20 17:23:30 -0700 | [diff] [blame] | 583 | public void getPackageSizeInfo(String packageName, int userHandle, |
| 584 | IPackageStatsObserver observer) { |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 585 | throw new UnsupportedOperationException(); |
| 586 | } |
| 587 | |
| 588 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 589 | public int getPreferredActivities(List<IntentFilter> outFilters, |
| 590 | List<ComponentName> outActivities, String packageName) { |
| 591 | throw new UnsupportedOperationException(); |
| 592 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 593 | |
| Christopher Tate | a2a0850d | 2013-09-05 16:38:58 -0700 | [diff] [blame] | 594 | /** @hide - hidden in superclass */ |
| 595 | @Override |
| 596 | public ComponentName getHomeActivities(List<ResolveInfo> outActivities) { |
| 597 | throw new UnsupportedOperationException(); |
| 598 | } |
| 599 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 600 | @Override |
| 601 | public String[] getSystemSharedLibraryNames() { |
| 602 | throw new UnsupportedOperationException(); |
| 603 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 604 | |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 605 | @Override |
| Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 606 | public FeatureInfo[] getSystemAvailableFeatures() { |
| 607 | throw new UnsupportedOperationException(); |
| 608 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 609 | |
| Dianne Hackborn | 4923734 | 2009-08-27 20:08:01 -0700 | [diff] [blame] | 610 | @Override |
| Dianne Hackborn | 039c68e | 2009-09-26 16:39:23 -0700 | [diff] [blame] | 611 | public boolean hasSystemFeature(String name) { |
| 612 | throw new UnsupportedOperationException(); |
| 613 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 614 | |
| Dianne Hackborn | 039c68e | 2009-09-26 16:39:23 -0700 | [diff] [blame] | 615 | @Override |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 616 | public boolean isSafeMode() { |
| 617 | throw new UnsupportedOperationException(); |
| 618 | } |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 619 | |
| dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame^] | 620 | /** @hide */ |
| dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 621 | @Override |
| 622 | public KeySet getKeySetByAlias(String packageName, String alias) { |
| 623 | throw new UnsupportedOperationException(); |
| 624 | } |
| 625 | |
| dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame^] | 626 | /** @hide */ |
| dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 627 | @Override |
| 628 | public KeySet getSigningKeySet(String packageName) { |
| 629 | throw new UnsupportedOperationException(); |
| 630 | } |
| 631 | |
| dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame^] | 632 | /** @hide */ |
| dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 633 | @Override |
| 634 | public boolean isSignedBy(String packageName, KeySet ks) { |
| 635 | throw new UnsupportedOperationException(); |
| 636 | } |
| 637 | |
| dcashman | c6f2249 | 2014-08-14 09:54:51 -0700 | [diff] [blame^] | 638 | /** @hide */ |
| dcashman | 9d2f441 | 2014-06-09 09:27:54 -0700 | [diff] [blame] | 639 | @Override |
| 640 | public boolean isSignedByExactly(String packageName, KeySet ks) { |
| 641 | throw new UnsupportedOperationException(); |
| 642 | } |
| 643 | |
| Amith Yamasani | 4b2e934 | 2011-03-31 12:38:53 -0700 | [diff] [blame] | 644 | /** |
| 645 | * @hide |
| 646 | */ |
| 647 | @Override |
| Kenny Root | 5ab2157 | 2011-07-27 11:11:19 -0700 | [diff] [blame] | 648 | public void installPackageWithVerification(Uri packageURI, IPackageInstallObserver observer, |
| 649 | int flags, String installerPackageName, Uri verificationURI, |
| Rich Cannings | e1d7c71 | 2012-08-08 12:46:06 -0700 | [diff] [blame] | 650 | ManifestDigest manifestDigest, ContainerEncryptionParams encryptionParams) { |
| Kenny Root | 5ab2157 | 2011-07-27 11:11:19 -0700 | [diff] [blame] | 651 | throw new UnsupportedOperationException(); |
| 652 | } |
| 653 | |
| rich cannings | 706e8ba | 2012-08-20 13:20:14 -0700 | [diff] [blame] | 654 | /** |
| 655 | * @hide |
| 656 | */ |
| 657 | @Override |
| 658 | public void installPackageWithVerificationAndEncryption(Uri packageURI, |
| 659 | IPackageInstallObserver observer, int flags, String installerPackageName, |
| 660 | VerificationParams verificationParams, ContainerEncryptionParams encryptionParams) { |
| 661 | throw new UnsupportedOperationException(); |
| 662 | } |
| 663 | |
| Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 664 | /** |
| 665 | * @hide |
| 666 | */ |
| 667 | @Override |
| Amith Yamasani | e5bcff6 | 2014-07-19 15:44:09 -0700 | [diff] [blame] | 668 | public boolean setApplicationHiddenSettingAsUser(String packageName, boolean hidden, |
| Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 669 | UserHandle user) { |
| 670 | return false; |
| 671 | } |
| 672 | |
| 673 | /** |
| 674 | * @hide |
| 675 | */ |
| 676 | @Override |
| Amith Yamasani | e5bcff6 | 2014-07-19 15:44:09 -0700 | [diff] [blame] | 677 | public boolean getApplicationHiddenSettingAsUser(String packageName, UserHandle user) { |
| Amith Yamasani | 655d0e2 | 2013-06-12 14:19:10 -0700 | [diff] [blame] | 678 | return false; |
| 679 | } |
| 680 | |
| 681 | /** |
| 682 | * @hide |
| 683 | */ |
| 684 | @Override |
| Dianne Hackborn | 7767eac | 2012-08-23 18:25:40 -0700 | [diff] [blame] | 685 | public int installExistingPackage(String packageName) |
| 686 | throws NameNotFoundException { |
| 687 | throw new UnsupportedOperationException(); |
| 688 | } |
| 689 | |
| Kenny Root | 5ab2157 | 2011-07-27 11:11:19 -0700 | [diff] [blame] | 690 | @Override |
| Kenny Root | 3a9b5fb | 2011-09-20 14:15:38 -0700 | [diff] [blame] | 691 | public void verifyPendingInstall(int id, int verificationCode) { |
| Kenny Root | 5ab2157 | 2011-07-27 11:11:19 -0700 | [diff] [blame] | 692 | throw new UnsupportedOperationException(); |
| 693 | } |
| Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 694 | |
| rich cannings | d9ef3e5 | 2012-08-22 14:28:05 -0700 | [diff] [blame] | 695 | @Override |
| 696 | public void extendVerificationTimeout(int id, int verificationCodeAtTimeout, |
| 697 | long millisecondsToDelay) { |
| 698 | throw new UnsupportedOperationException(); |
| 699 | } |
| 700 | |
| Kenny Root | 0aaa0d9 | 2011-09-12 16:42:55 -0700 | [diff] [blame] | 701 | /** |
| 702 | * @hide |
| 703 | */ |
| 704 | @Override |
| 705 | public VerifierDeviceIdentity getVerifierDeviceIdentity() { |
| 706 | throw new UnsupportedOperationException(); |
| 707 | } |
| Christopher Tate | f1977b4 | 2014-03-24 16:25:51 -0700 | [diff] [blame] | 708 | |
| 709 | /** |
| 710 | * @hide |
| 711 | */ |
| 712 | @Override |
| 713 | public void installPackage(Uri packageURI, PackageInstallObserver observer, |
| 714 | int flags, String installerPackageName) { |
| 715 | throw new UnsupportedOperationException(); |
| 716 | } |
| 717 | |
| 718 | /** |
| 719 | * @hide |
| 720 | */ |
| 721 | @Override |
| 722 | public void installPackageWithVerification(Uri packageURI, |
| 723 | PackageInstallObserver observer, int flags, String installerPackageName, |
| 724 | Uri verificationURI, ManifestDigest manifestDigest, |
| 725 | ContainerEncryptionParams encryptionParams) { |
| 726 | throw new UnsupportedOperationException(); |
| 727 | } |
| 728 | |
| 729 | /** |
| 730 | * @hide |
| 731 | */ |
| 732 | @Override |
| 733 | public void installPackageWithVerificationAndEncryption(Uri packageURI, |
| 734 | PackageInstallObserver observer, int flags, String installerPackageName, |
| 735 | VerificationParams verificationParams, ContainerEncryptionParams encryptionParams) { |
| 736 | throw new UnsupportedOperationException(); |
| 737 | } |
| Nicolas Prevot | c79586e | 2014-05-06 12:47:57 +0100 | [diff] [blame] | 738 | |
| 739 | /** |
| 740 | * @hide |
| 741 | */ |
| 742 | @Override |
| Nicolas Prevot | 63798c5 | 2014-05-27 13:22:38 +0100 | [diff] [blame] | 743 | public void addCrossProfileIntentFilter(IntentFilter filter, int sourceUserId, int targetUserId, |
| 744 | int flags) { |
| Nicolas Prevot | 8194899 | 2014-05-16 18:25:26 +0100 | [diff] [blame] | 745 | throw new UnsupportedOperationException(); |
| 746 | } |
| 747 | |
| 748 | /** |
| 749 | * @hide |
| 750 | */ |
| 751 | @Override |
| 752 | public void clearCrossProfileIntentFilters(int sourceUserId) { |
| 753 | throw new UnsupportedOperationException(); |
| 754 | } |
| 755 | |
| Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 756 | /** {@hide} */ |
| Jeff Sharkey | 16c8e3f | 2014-07-24 17:08:17 -0700 | [diff] [blame] | 757 | public PackageInstaller getPackageInstaller() { |
| Jeff Sharkey | 6c833e0 | 2014-07-14 22:44:30 -0700 | [diff] [blame] | 758 | throw new UnsupportedOperationException(); |
| 759 | } |
| 760 | |
| 761 | /** {@hide} */ |
| 762 | @Override |
| 763 | public boolean isPackageAvailable(String packageName) { |
| Jeff Sharkey | 3a44f3f | 2014-04-28 17:36:31 -0700 | [diff] [blame] | 764 | throw new UnsupportedOperationException(); |
| 765 | } |
| Alexandra Gherghina | 6e2ae25 | 2014-06-12 16:03:58 +0100 | [diff] [blame] | 766 | |
| 767 | /** |
| 768 | * @hide |
| 769 | */ |
| 770 | @Override |
| 771 | public void addCrossProfileIntentsForPackage(String packageName, int sourceUserId, |
| 772 | int targetUserId) { |
| 773 | throw new UnsupportedOperationException(); |
| 774 | } |
| Nicolas Prevot | 88cc346 | 2014-05-14 14:51:48 +0100 | [diff] [blame] | 775 | |
| 776 | /** |
| 777 | * @hide |
| 778 | */ |
| Alexandra Gherghina | e41ce99 | 2014-07-29 15:08:31 +0100 | [diff] [blame] | 779 | @Override |
| 780 | public void removeCrossProfileIntentsForPackage(String packageName, int sourceUserId, |
| 781 | int targetUserId) { |
| 782 | throw new UnsupportedOperationException(); |
| 783 | } |
| 784 | |
| 785 | /** |
| 786 | * @hide |
| 787 | */ |
| Nicolas Prevot | 7f7b0c7 | 2014-06-23 15:59:38 +0100 | [diff] [blame] | 788 | public Drawable loadItemIcon(PackageItemInfo itemInfo, ApplicationInfo appInfo) { |
| Nicolas Prevot | 88cc346 | 2014-05-14 14:51:48 +0100 | [diff] [blame] | 789 | throw new UnsupportedOperationException(); |
| 790 | } |
| The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 791 | } |