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