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