@Implements(value=android.app.Service.class) public class ShadowService extends ShadowContextWrapper
Constructor and Description |
---|
ShadowService() |
Modifier and Type | Method and Description |
---|---|
Notification |
getLastForegroundNotification() |
int |
getLastForegroundNotificationId() |
boolean |
getNotificationShouldRemoved() |
int |
getStopSelfId()
Returns id passed to
stopSelf(int) method. |
int |
getStopSelfResultId()
Returns id passed to
stopSelfResult(int) method. |
boolean |
isForegroundStopped() |
boolean |
isStoppedBySelf() |
protected void |
onDestroy() |
protected void |
startForeground(int id,
Notification notification) |
protected void |
stopForeground(boolean removeNotification) |
protected void |
stopSelf() |
protected void |
stopSelf(int id) |
protected boolean |
stopSelfResult(int id) |
clearNextStartedActivities, clearStartedServices, denyPermissions, denyPermissions, getBroadcastIntents, getNextStartedActivity, getNextStartedService, getNextStoppedService, grantPermissions, grantPermissions, peekNextStartedActivity, peekNextStartedService, removeSystemService
@Implementation protected void onDestroy()
@Implementation protected void stopSelf()
@Implementation protected void stopSelf(int id)
@Implementation protected boolean stopSelfResult(int id)
@Implementation protected final void startForeground(int id, Notification notification)
@Implementation protected void stopForeground(boolean removeNotification)
public int getLastForegroundNotificationId()
public Notification getLastForegroundNotification()
public boolean isStoppedBySelf()
public boolean isForegroundStopped()
public boolean getNotificationShouldRemoved()
public int getStopSelfId()
Returns id passed to stopSelf(int)
method. Make sure to check result of isStoppedBySelf()
first.
public int getStopSelfResultId()
Returns id passed to stopSelfResult(int)
method. Make sure to check result of isStoppedBySelf()
first.