ShadowAccessibilityService
, ShadowInCallService
, ShadowIntentService
, ShadowJobService
, ShadowQuickAccessWalletService
, ShadowVoiceInteractionService
, ShadowVpnService
@Implements(android.app.Service.class) public class ShadowService extends ShadowContextWrapper
Constructor | Description |
---|---|
ShadowService() |
Modifier and Type | Method | 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 |
isLastForegroundNotificationAttached() |
Returns whether the last foreground notification is still "attached" to the service,
meaning it will be removed when the service is destroyed.
|
boolean |
isStoppedBySelf() |
|
protected void |
onDestroy() |
|
protected void |
startForeground(int id,
Notification notification) |
|
protected void |
stopForeground(boolean removeNotification) |
|
protected void |
stopForeground(int flags) |
|
protected void |
stopSelf() |
|
protected void |
stopSelf(int id) |
|
protected boolean |
stopSelfResult(int id) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearBroadcastIntents, clearNextStartedActivities, clearStartedServices, denyPermissions, denyPermissions, getBroadcastIntents, getBroadcastIntentsForUser, getBroadcastOptions, getNextStartedActivity, getNextStartedActivityForResult, getNextStartedService, getNextStoppedService, grantPermissions, grantPermissions, peekNextStartedActivity, peekNextStartedActivityForResult, 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)
protected void stopForeground(boolean removeNotification)
@Implementation(minSdk=24) protected void stopForeground(int flags)
public int getLastForegroundNotificationId()
public Notification getLastForegroundNotification()
public boolean isLastForegroundNotificationAttached()
public boolean isStoppedBySelf()
public boolean isForegroundStopped()
public boolean getNotificationShouldRemoved()
public int getStopSelfId()
stopSelf(int)
method. Make sure to check result of isStoppedBySelf()
first.public int getStopSelfResultId()
stopSelfResult(int)
method. Make sure to check result of isStoppedBySelf()
first.