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