/** * Non-Android accessor that delegates to the application to consume and return the next {@code Intent} on the * started services stack. * * @return the next started {@code Intent} for a service */ public Intent getNextStartedService() { return getShadowApplication().getNextStartedService(); }
/** * Return (without consuming) the next {@code Intent} on the started services stack. * * @return the next started {@code Intent} for a service */ public Intent peekNextStartedService() { return getShadowApplication().peekNextStartedService(); }
/** * Non-Android accessor that delegates to the application to consume and return the next {@code Intent} on the * started activities stack. * * @return the next started {@code Intent} for an activity */ public Intent getNextStartedActivity() { return getShadowApplication().getNextStartedActivity(); }
/** * Non-Android accessor that delegates to the application to return (without consuming) the next {@code Intent} on * the started activities stack. * * @return the next started {@code Intent} for an activity */ public Intent peekNextStartedActivity() { return getShadowApplication().peekNextStartedActivity(); }
/** * Non-Android accessor that delegates to the application to return the next {@code Intent} to stop * a service (irrespective of if the service was running) * * @return {@code Intent} for the next service requested to be stopped */ public Intent getNextStoppedService() { return getShadowApplication().getNextStoppedService(); }
/** * Non-android accessor that delefates to the application to clear the stack of started * service intents. */ public void clearStartedServices() { getShadowApplication().clearStartedServices(); }
@Implementation public Looper getMainLooper() { return getShadowApplication().getMainLooper(); }
@Implementation public boolean bindService(Intent intent, final ServiceConnection serviceConnection, int i) { return getShadowApplication().bindService(intent, serviceConnection, i); }
@Implementation public SharedPreferences getSharedPreferences(String name, int mode) { return new TestSharedPreferences(getShadowApplication().getSharedPreferenceMap(), name, mode); }