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