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