@Implements(value=android.app.Service.class) public class ShadowService extends ShadowContextWrapper
Service.| Constructor and Description |
|---|
ShadowService() |
| Modifier and Type | Method and Description |
|---|---|
void |
assertNoBroadcastListenersRegistered()
Utility method that throws a
RuntimeException if any BroadcastListeners are still registered. |
android.app.Application |
getApplication() |
android.content.Context |
getApplicationContext() |
android.app.Notification |
getLastForegroundNotification() |
int |
getLastForegroundNotificationId() |
boolean |
getNotificationShouldRemoved() |
boolean |
isForegroundStopped() |
boolean |
isStoppedBySelf()
Non-Android accessor, to use in assertions.
|
void |
onDestroy() |
void |
setUnbindServiceShouldThrowIllegalArgument(boolean flag) |
void |
startForeground(int id,
android.app.Notification notification) |
void |
stopForeground(boolean removeNotification) |
void |
stopSelf() |
void |
stopSelf(int id) |
void |
unbindService(android.content.ServiceConnection conn) |
bindService, checkCallingOrSelfPermission, checkCallingPermission, checkPermission, clearStartedServices, denyPermissions, getApplicationInfo, getAssets, getBroadcastIntents, getClassLoader, getContentResolver, getExternalCacheDir, getExternalFilesDir, getMainLooper, getNextStartedActivity, getNextStartedService, getNextStoppedService, getPackageManager, getPackageName, getResourceLoader, getResources, getShadowApplication, getSharedPreferences, getString, getString, getText, getUserId, grantPermissions, isRestricted, peekNextStartedActivity, peekNextStartedService, registerReceiver, registerReceiver, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendStickyBroadcast, setPackageName, startActivities, startActivities, startActivity, startActivity, startService, stopService, unregisterReceivercallAttachBaseContext, createAttributeSet, getResName, isStrictI18n@Implementation public final android.app.Application getApplication()
@Implementation public android.content.Context getApplicationContext()
getApplicationContext in class ShadowContextWrapper@Implementation public void onDestroy()
@Implementation public void unbindService(android.content.ServiceConnection conn)
unbindService in class ShadowContextWrapper@Implementation public void stopSelf()
@Implementation public void stopSelf(int id)
public void setUnbindServiceShouldThrowIllegalArgument(boolean flag)
@Implementation
public final void startForeground(int id,
android.app.Notification notification)
@Implementation public void stopForeground(boolean removeNotification)
public int getLastForegroundNotificationId()
public android.app.Notification getLastForegroundNotification()
public void assertNoBroadcastListenersRegistered()
RuntimeException if any BroadcastListeners are still registered.public boolean isStoppedBySelf()
public boolean isForegroundStopped()
public boolean getNotificationShouldRemoved()
Copyright © 2015. All rights reserved.