| Class and Description |
|---|
| org.robolectric.util.AccessibilityUtil
Use
AccessibilityUtil instead. |
| org.robolectric.util.concurrent.RoboExecutorService
Use
RoboExecutorService instead. |
| org.robolectric.shadows.ShadowConfiguration
This will be removed in Robolectric 3.4 -
Configuration is pure Java so there is no need for a
shadow to exist. The methods have been preserved but marked deprecated to prevent build breakages but in this
version implementation has been modified to simply call through to the Framework code which may in some cases cause
test failures due to the way the shadow diverged in behaviour from the Framework code. Some notes have been added
to help you migrate in these cases.
Some notes to help you migrate:-
|
| org.robolectric.shadows.ShadowHandler
There is no special shadow implementation for the
Handler class. The special
handling is all done by ShadowLooper and ShadowMessageQueue. This class has been retained
for backward compatibility with the various static method implementations. |
| org.robolectric.android.StubPackageManager
Use
ShadowPackageManager instead.
ShadowPackageManager shadowPackageManager = shadowOf(context.getPackageManager());If there is functionality you are missing you can extend ShadowPackageManager. |
| org.robolectric.res.builder.XmlResourceParserImpl
Use
XmlResourceParserImpl instead. |
| Method and Description |
|---|
| org.robolectric.shadows.ShadowPackageManager.checkPermission(String, String)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.checkPermission(String, String) instead. |
| org.robolectric.shadows.ShadowTelecomManager.clearAccounts() |
| org.robolectric.shadows.ShadowHandler.flush()
use
ShadowLooper.idleMainLooper() instead |
| org.robolectric.shadows.ShadowAccountManager.get(Context)
This method will be removed in Robolectric 3.4 Use
AccountManager.get(Context) instead. |
| org.robolectric.shadows.ShadowPackageManager.getActivityInfo(ComponentName, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.getActivityInfo(ComponentName, int) instead. |
| org.robolectric.shadows.ShadowPackageManager.getApplicationIcon(String)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.getApplicationIcon(String) instead. |
| org.robolectric.shadows.ShadowPackageManager.getApplicationInfo(String, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.getApplicationInfo(String, int) instead. |
| org.robolectric.shadows.ShadowPackageManager.getApplicationLabel(ApplicationInfo)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.getApplicationLabel(ApplicationInfo) instead. |
| org.robolectric.shadows.ShadowView.getBackgroundColor()
Use FEST assertions instead.
|
| org.robolectric.shadows.ShadowView.getBackgroundResourceId()
Use FEST assertions instead.
|
| org.robolectric.shadows.ShadowBitmapDrawable.getCreatedFromResId()
use ShadowBitmap#getCreatedFromResId() instead.
|
| org.robolectric.shadows.ShadowTelecomManager.getDefaultPhoneApp() |
| org.robolectric.shadows.ShadowPackageManager.getInstalledPackages(int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.getInstalledPackages(int) instead. |
| org.robolectric.shadows.ShadowPackageManager.getLaunchIntentForPackage(String)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.getLaunchIntentForPackage(String) instead. |
| org.robolectric.shadows.ShadowPackageManager.getPackageInfo(String, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.getPackageInfo(String, int) instead. |
| org.robolectric.RuntimeEnvironment.getPackageManager()
Prefer Android API
Context.getPackageManager() instead. |
| org.robolectric.shadows.ShadowConfiguration.getQualifiers()
Use
RuntimeEnvironment.getQualifiers() although there should be no reason to obtain this
since it is typically set in tests through Config.qualifiers() so you should use a constant in these cases. |
| org.robolectric.shadows.ShadowView.getQualifiers() |
| org.robolectric.shadows.ShadowPackageManager.getReceiverInfo(ComponentName, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.getReceiverInfo(ComponentName, int) instead. |
| org.robolectric.RuntimeEnvironment.getRobolectricPackageManager()
Use
ShadowPackageManager instead.
ShadowPackageManager shadowPackageManager = shadowOf(context.getPackageManager()); |
| org.robolectric.shadows.ShadowPackageManager.getServiceInfo(ComponentName, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.getServiceInfo(ComponentName, int) instead. |
| org.robolectric.shadows.ShadowPackageManager.hasSystemFeature(String)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.hasSystemFeature(String) instead. |
| org.robolectric.shadows.ShadowLooper.idle(long) |
| org.robolectric.shadows.ShadowHandler.idleMainLooper() |
| org.robolectric.shadows.ShadowLooper.idleMainLooper(long) |
| org.robolectric.shadows.ShadowConfiguration.overrideQualifiers(String) |
| org.robolectric.android.AccessibilityUtil.passesAccessibilityChecksIfEnabled(View) |
| org.robolectric.shadows.ShadowLooper.post(Runnable, long)
Use a
Handler instance to post to a looper. |
| org.robolectric.shadows.ShadowLooper.postAtFrontOfQueue(Runnable)
Use a
Handler instance to post to a looper. |
| org.robolectric.shadows.ShadowAppWidgetManager.putWidgetInfo(int, AppWidgetProviderInfo) |
| org.robolectric.shadows.ShadowPackageManager.queryBroadcastReceivers(Intent, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.queryBroadcastReceivers(Intent, int) instead. |
| org.robolectric.shadows.ShadowPackageManager.queryIntentActivities(Intent, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.queryIntentActivities(Intent, int) instead. |
| org.robolectric.shadows.ShadowPackageManager.queryIntentServices(Intent, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.queryIntentServices(Intent, int) instead. |
| org.robolectric.shadows.ShadowPackageManager.resolveActivity(Intent, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.resolveActivity(Intent, int) instead. |
| org.robolectric.shadows.ShadowPackageManager.resolveService(Intent, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.resolveService(Intent, int) instead. |
| org.robolectric.shadows.ShadowHandler.runMainLooperOneTask() |
| org.robolectric.shadows.ShadowHandler.runMainLooperToEndOfTasks() |
| org.robolectric.shadows.ShadowHandler.runMainLooperToNextTask() |
| org.robolectric.shadows.ShadowPackageManager.setComponentEnabledSetting(ComponentName, int, int)
We're forced to implement this because we're implementing
RobolectricPackageManager which will
be removed in the next release. Prefer PackageManager.setComponentEnabledSetting(ComponentName, int, int) instead. |
| org.robolectric.shadows.ShadowConfiguration.setLocale(Locale) |
| org.robolectric.RuntimeEnvironment.setRobolectricPackageManager(RobolectricPackageManager)
Use
ShadowPackageManager instead.
ShadowPackageManager shadowPackageManager = shadowOf(context.getPackageManager());If there is functionality you are missing you can extend ShadowPackageManager. |
| org.robolectric.shadows.ShadowApplication.setSystemService(String, Object)
Do not depend on this method to override services as it will be removed in a future update.
The preferered method is use the shadow of the corresponding service.
|
| org.robolectric.shadows.ShadowConfiguration.setTo(Configuration) |
| org.robolectric.shadows.ShadowConfiguration.setToDefaults() |
| org.robolectric.Shadows.shadowOf(Configuration) |
| org.robolectric.Shadows.shadowOf(Handler) |