public class RoutineService extends Service
| Modifier and Type | Field and Description |
|---|---|
static int |
MSG_ABORT |
static int |
MSG_COMPLETE |
static int |
MSG_DATA |
static int |
MSG_INIT |
START_CONTINUATION_MASK, START_FLAG_REDELIVERY, START_FLAG_RETRY, START_NOT_STICKY, START_REDELIVER_INTENT, START_STICKY, START_STICKY_COMPATIBILITYACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICETRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN| Constructor and Description |
|---|
RoutineService()
Constructor.
|
RoutineService(Log log,
Log.LogLevel logLevel)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static Throwable |
getAbortError(Message message)
Extracts the abort exception from the specified message.
|
ContextInvocationFactory<?,?> |
getInvocationFactory(InvocationFactoryTarget<?,?> target)
Returns a context invocation factory instance creating invocations of the specified type.
|
static Object |
getValue(Message message)
Extracts the value object from the specified message.
|
IBinder |
onBind(Intent intent) |
void |
onDestroy() |
static void |
putAsyncInvocation(Bundle bundle,
String invocationId,
InvocationFactoryTarget<?,?> target,
InvocationConfiguration invocationConfiguration,
Class<? extends Runner> runnerClass,
Class<? extends Log> logClass)
Puts the specified asynchronous invocation info into the passed bundle.
|
static void |
putError(Bundle bundle,
String invocationId,
Throwable error)
Puts the specified abort exception into the passed bundle.
|
static void |
putInvocationId(Bundle bundle,
String invocationId)
Puts the specified invocation ID into the passed bundle.
|
static void |
putParallelInvocation(Bundle bundle,
String invocationId,
InvocationFactoryTarget<?,?> target,
InvocationConfiguration invocationConfiguration,
Class<? extends Runner> runnerClass,
Class<? extends Log> logClass)
Puts the specified parallel invocation info into the passed bundle.
|
static void |
putValue(Bundle bundle,
String invocationId,
Object value)
Puts the specified value object into the passed bundle.
|
getApplication, onConfigurationChanged, onCreate, onLowMemory, onRebind, onStart, onStartCommand, onTaskRemoved, onTrimMemory, onUnbind, startForeground, stopForeground, stopSelf, stopSelf, stopSelfResultbindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getSystemService, getTheme, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setTheme, setWallpaper, setWallpaper, startActivities, startActivities, startActivity, startActivity, startInstrumentation, startIntentSender, startIntentSender, startService, stopService, unbindService, unregisterReceivergetDrawable, getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbackspublic static final int MSG_ABORT
public static final int MSG_COMPLETE
public static final int MSG_DATA
public static final int MSG_INIT
public RoutineService()
public RoutineService(@Nullable Log log, @Nullable Log.LogLevel logLevel)
log - the log instance.logLevel - the log level.@Nullable public static Throwable getAbortError(@Nonnull Message message)
message - the message.@Nullable public static Object getValue(@Nonnull Message message)
message - the message.public static void putAsyncInvocation(@Nonnull Bundle bundle, @Nonnull String invocationId, @Nonnull InvocationFactoryTarget<?,?> target, @Nonnull InvocationConfiguration invocationConfiguration, @Nullable Class<? extends Runner> runnerClass, @Nullable Class<? extends Log> logClass)
bundle - the bundle to fill.invocationId - the invocation ID.target - the invocation target.invocationConfiguration - the invocation configuration.runnerClass - the invocation runner class.logClass - the invocation log class.public static void putError(@Nonnull Bundle bundle, @Nonnull String invocationId, @Nullable Throwable error)
bundle - the bundle to fill.invocationId - the invocation ID.error - the exception instance.public static void putInvocationId(@Nonnull Bundle bundle, @Nonnull String invocationId)
bundle - the bundle to fill.invocationId - the invocation ID.public static void putParallelInvocation(@Nonnull Bundle bundle, @Nonnull String invocationId, @Nonnull InvocationFactoryTarget<?,?> target, @Nonnull InvocationConfiguration invocationConfiguration, @Nullable Class<? extends Runner> runnerClass, @Nullable Class<? extends Log> logClass)
bundle - the bundle to fill.invocationId - the invocation ID.target - the invocation target.invocationConfiguration - the invocation configuration.runnerClass - the invocation runner class.logClass - the invocation log class.public static void putValue(@Nonnull Bundle bundle, @Nonnull String invocationId, @Nullable Object value)
bundle - the bundle to fill.invocationId - the invocation ID.value - the value instance.@Nonnull public ContextInvocationFactory<?,?> getInvocationFactory(@Nonnull InvocationFactoryTarget<?,?> target)
target - the invocation target.