public final class SelectPrinterActivity extends Activity implements LoaderManager.LoaderCallbacks<List<PrintServiceInfo>>
Activity.TranslucentConversionListener
Context.BindServiceFlags, Context.CreatePackageOptions, Context.ServiceName
Modifier and Type | Field and Description |
---|---|
static String |
INTENT_EXTRA_PRINTER |
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, DONT_FINISH_TASK_WITH_ACTIVITY, FINISH_TASK_WITH_ACTIVITY, FINISH_TASK_WITH_ROOT_ACTIVITY, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BACKUP_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_ALLOW_WHITELIST_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_FOREGROUND_SERVICE, BIND_FOREGROUND_SERVICE_WHILE_AWAKE, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_NOT_VISIBLE, BIND_SHOWING_UI, BIND_TREAT_LIKE_ACTIVITY, BIND_VISIBLE, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_CREDENTIAL_PROTECTED_STORAGE, CONTEXT_DEVICE_PROTECTED_STORAGE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_REGISTER_PACKAGE, CONTEXT_RESTRICTED, CONTEXTHUB_SERVICE, COUNTRY_DETECTOR, DEVICE_IDLE_CONTROLLER, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, ETHERNET_SERVICE, FINGERPRINT_SERVICE, GATEKEEPER_SERVICE, HARDWARE_PROPERTIES_SERVICE, HDMI_CONTROL_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, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_POLICY_SERVICE, NETWORK_SCORE_SERVICE, NETWORK_STATS_SERVICE, NETWORKMANAGEMENT_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, PERSISTENT_DATA_BLOCK_SERVICE, POWER_SERVICE, PRINT_SERVICE, RADIO_SERVICE, RECOVERY_SERVICE, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SERIAL_SERVICE, SHORTCUT_SERVICE, SIP_SERVICE, SOUND_TRIGGER_SERVICE, STATUS_BAR_SERVICE, STORAGE_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TRUST_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, UPDATE_LOCK_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, VOICE_INTERACTION_MANAGER_SERVICE, WALLPAPER_SERVICE, WIFI_NAN_SERVICE, WIFI_P2P_SERVICE, WIFI_RTT_SERVICE, WIFI_SCANNING_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
TRIM_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 |
---|
SelectPrinterActivity() |
Modifier and Type | Method and Description |
---|---|
boolean |
onContextItemSelected(MenuItem item)
This hook is called whenever an item in a context menu is selected.
|
void |
onCreate(Bundle savedInstanceState)
Called when the activity is starting.
|
void |
onCreateContextMenu(ContextMenu menu,
View view,
ContextMenu.ContextMenuInfo menuInfo)
Called when a context menu for the
view is about to be shown. |
Loader<List<PrintServiceInfo>> |
onCreateLoader(int id,
Bundle args)
Instantiate and return a new Loader for the given ID.
|
boolean |
onCreateOptionsMenu(Menu menu)
Initialize the contents of the Activity's standard options menu.
|
void |
onLoaderReset(Loader<List<PrintServiceInfo>> loader)
Called when a previously created loader is being reset, and thus
making its data unavailable.
|
void |
onLoadFinished(Loader<List<PrintServiceInfo>> loader,
List<PrintServiceInfo> services)
Called when a previously created loader has finished its load.
|
void |
onPause()
Called as part of the activity lifecycle when an activity is going into
the background, but has not (yet) been killed.
|
protected void |
onSaveInstanceState(Bundle outState)
Called to retrieve per-instance state from an activity before being killed
so that the state can be restored in
Activity.onCreate(android.os.Bundle) or
Activity.onRestoreInstanceState(android.os.Bundle) (the Bundle populated by this method
will be passed to both). |
void |
onStart()
Called after
Activity.onCreate(android.os.Bundle) — or after Activity.onRestart() when
the activity had been stopped, but is now again being displayed to the
user. |
void |
onStop()
Called when you are no longer visible to the user.
|
void |
updateEmptyView(com.android.printspooler.ui.SelectPrinterActivity.DestinationAdapter adapter) |
addContentView, canStartActivityForResult, closeContextMenu, closeOptionsMenu, convertFromTranslucent, convertToTranslucent, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchEnterAnimationComplete, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, enterPictureInPictureMode, enterPictureInPictureModeIfPossible, exitFreeformMode, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getActivityToken, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, getWindowStackId, hasWindowFocus, invalidateOptionsMenu, isBackgroundVisibleBehind, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLocalVoiceInteractionSupported, isOverlayWithDecorCaptionEnabled, isResumed, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onActivityResult, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onBackgroundVisibleBehindChanged, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextMenuClosed, onCreate, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDestroy, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onLowMemory, onMenuItemSelected, onMenuOpened, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onNewActivityOptions, onNewIntent, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPictureInPictureModeChanged, onPostCreate, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRequestPermissionsResult, onRestart, onRestoreInstanceState, onRestoreInstanceState, onResume, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, onSearchRequested, onStateNotSaved, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowDismissed, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, runOnUiThread, setActionBar, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setOverlayWithDecorCaptionEnabled, setPersistent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTheme, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, setVrModeEnabled, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityAsCaller, startActivityAsUser, startActivityAsUser, startActivityForResult, startActivityForResult, startActivityForResult, startActivityForResultAsUser, startActivityForResultAsUser, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startIntentSenderFromChildFragment, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
applyOverrideConfiguration, attachBaseContext, getAssets, getOverrideConfiguration, getResources, getTheme, getThemeResId
bindService, bindServiceAsUser, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, checkUriPermission, clearWallpaper, createApplicationContext, createConfigurationContext, createCredentialProtectedStorageContext, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, createPackageContextAsUser, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getBaseContext, getBasePackageName, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getDisplay, getDisplayAdjustments, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getOpPackageName, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSharedPreferences, getSharedPreferencesPath, getSystemServiceName, getUserId, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isCredentialProtectedStorage, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, registerReceiverAsUser, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendBroadcastAsUser, sendBroadcastMultiplePermissions, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendOrderedBroadcastAsUser, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startActivitiesAsUser, startInstrumentation, startService, startServiceAsUser, stopService, stopServiceAsUser, unbindService, unregisterReceiver
bindServiceAsUser, createCredentialEncryptedStorageContext, createDeviceEncryptedStorageContext, getColor, getColorStateList, getDrawable, getSharedPrefsFile, getString, getString, getSystemService, getText, isCredentialEncryptedStorage, isDeviceEncryptedStorage, migrateDatabaseFrom, migrateSharedPreferencesFrom, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
public static final String INTENT_EXTRA_PRINTER
public void onCreate(Bundle savedInstanceState)
Activity
Activity.setContentView(int)
to inflate the
activity's UI, using Activity.findViewById(int)
to programmatically interact
with widgets in the UI, calling
Activity.managedQuery(android.net.Uri , String[], String, String[], String)
to retrieve
cursors for data being displayed, etc.
You can call Activity.finish(int)
from within this function, in
which case onDestroy() will be immediately called without any of the rest
of the activity lifecycle (Activity.onStart()
, Activity.onResume()
,
Activity.onPause()
, etc) executing.
Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.
onCreate
in class Activity
savedInstanceState
- If the activity is being re-initialized after
previously being shut down then this Bundle contains the data it most
recently supplied in Activity.onSaveInstanceState(android.os.Bundle)
. Note: Otherwise it is null.Activity.onStart()
,
Activity.onSaveInstanceState(android.os.Bundle)
,
Activity.onRestoreInstanceState(android.os.Bundle)
,
Activity.onPostCreate(android.os.Bundle)
protected void onSaveInstanceState(Bundle outState)
Activity
Activity.onCreate(android.os.Bundle)
or
Activity.onRestoreInstanceState(android.os.Bundle)
(the Bundle
populated by this method
will be passed to both).
This method is called before an activity may be killed so that when it
comes back some time in the future it can restore its state. For example,
if activity B is launched in front of activity A, and at some point activity
A is killed to reclaim resources, activity A will have a chance to save the
current state of its user interface via this method so that when the user
returns to activity A, the state of the user interface can be restored
via Activity.onCreate(android.os.Bundle)
or Activity.onRestoreInstanceState(android.os.Bundle)
.
Do not confuse this method with activity lifecycle callbacks such as
Activity.onPause()
, which is always called when an activity is being placed
in the background or on its way to destruction, or Activity.onStop()
which
is called before destruction. One example of when Activity.onPause()
and
Activity.onStop()
is called and not this method is when a user navigates back
from activity B to activity A: there is no need to call Activity.onSaveInstanceState(android.os.Bundle)
on B because that particular instance will never be restored, so the
system avoids calling it. An example when Activity.onPause()
is called and
not Activity.onSaveInstanceState(android.os.Bundle)
is when activity B is launched in front of activity A:
the system may avoid calling Activity.onSaveInstanceState(android.os.Bundle)
on activity A if it isn't
killed during the lifetime of B since the state of the user interface of
A will stay intact.
The default implementation takes care of most of the UI per-instance
state for you by calling View.onSaveInstanceState()
on each
view in the hierarchy that has an id, and by saving the id of the currently
focused view (all of which is restored by the default implementation of
Activity.onRestoreInstanceState(android.os.Bundle)
). If you override this method to save additional
information not captured by each individual view, you will likely want to
call through to the default implementation, otherwise be prepared to save
all of the state of each view yourself.
If called, this method will occur before Activity.onStop()
. There are
no guarantees about whether it will occur before or after Activity.onPause()
.
onSaveInstanceState
in class Activity
outState
- Bundle in which to place your saved state.Activity.onCreate(android.os.Bundle)
,
Activity.onRestoreInstanceState(android.os.Bundle)
,
Activity.onPause()
public boolean onCreateOptionsMenu(Menu menu)
Activity
This is only called once, the first time the options menu is
displayed. To update the menu every time it is displayed, see
Activity.onPrepareOptionsMenu(android.view.Menu)
.
The default implementation populates the menu with standard system
menu items. These are placed in the Menu.CATEGORY_SYSTEM
group so that
they will be correctly ordered with application-defined menu items.
Deriving classes should always call through to the base implementation.
You can safely hold on to menu (and any items created from it), making modifications to it as desired, until the next time onCreateOptionsMenu() is called.
When you add items to the menu, you can implement the Activity's
Activity.onOptionsItemSelected(android.view.MenuItem)
method to handle them there.
onCreateOptionsMenu
in class Activity
menu
- The options menu in which you place your items.Activity.onPrepareOptionsMenu(android.view.Menu)
,
Activity.onOptionsItemSelected(android.view.MenuItem)
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenu.ContextMenuInfo menuInfo)
Activity
view
is about to be shown.
Unlike Activity.onCreateOptionsMenu(Menu)
, this will be called every
time the context menu is about to be shown and should be populated for
the view (or item inside the view for AdapterView
subclasses,
this can be found in the menuInfo
)).
Use Activity.onContextItemSelected(android.view.MenuItem)
to know when an
item has been selected.
It is not safe to hold onto the context menu after this method returns.
onCreateContextMenu
in interface View.OnCreateContextMenuListener
onCreateContextMenu
in class Activity
menu
- The context menu that is being builtview
- The view for which the context menu is being builtmenuInfo
- Extra information about the item for which the
context menu should be shown. This information will vary
depending on the class of v.public boolean onContextItemSelected(MenuItem item)
Activity
Use MenuItem.getMenuInfo()
to get extra information set by the
View that added this menu item.
Derived classes should call through to the base class for it to perform the default menu handling.
onContextItemSelected
in class Activity
item
- The context menu item that was selected.public void onStart()
Activity
Activity.onCreate(android.os.Bundle)
— or after Activity.onRestart()
when
the activity had been stopped, but is now again being displayed to the
user. It will be followed by Activity.onResume()
.
Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.
onStart
in class Activity
Activity.onCreate(android.os.Bundle)
,
Activity.onStop()
,
Activity.onResume()
public void onPause()
Activity
Activity.onResume()
.
When activity B is launched in front of activity A, this callback will
be invoked on A. B will not be created until A's Activity.onPause()
returns,
so be sure to not do anything lengthy here.
This callback is mostly used for saving any persistent state the activity is editing, to present a "edit in place" model to the user and making sure nothing is lost if there are not enough resources to start the new activity without first killing this one. This is also a good place to do things like stop animations and other things that consume a noticeable amount of CPU in order to make the switch to the next activity as fast as possible, or to close resources that are exclusive access such as the camera.
In situations where the system needs more memory it may kill paused
processes to reclaim resources. Because of this, you should be sure
that all of your state is saved by the time you return from
this function. In general Activity.onSaveInstanceState(android.os.Bundle)
is used to save
per-instance state in the activity and this method is used to store
global persistent data (in content providers, files, etc.)
After receiving this call you will usually receive a following call
to Activity.onStop()
(after the next activity has been resumed and
displayed), however in some cases there will be a direct call back to
Activity.onResume()
without going through the stopped state.
Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.
onPause
in class Activity
Activity.onResume()
,
Activity.onSaveInstanceState(android.os.Bundle)
,
Activity.onStop()
public void onStop()
Activity
Activity.onRestart()
, Activity.onDestroy()
, or nothing,
depending on later user activity.
Derived classes must call through to the super class's implementation of this method. If they do not, an exception will be thrown.
onStop
in class Activity
Activity.onRestart()
,
Activity.onResume()
,
Activity.onSaveInstanceState(android.os.Bundle)
,
Activity.onDestroy()
public void updateEmptyView(com.android.printspooler.ui.SelectPrinterActivity.DestinationAdapter adapter)
public Loader<List<PrintServiceInfo>> onCreateLoader(int id, Bundle args)
LoaderManager.LoaderCallbacks
onCreateLoader
in interface LoaderManager.LoaderCallbacks<List<PrintServiceInfo>>
id
- The ID whose loader is to be created.args
- Any arguments supplied by the caller.public void onLoadFinished(Loader<List<PrintServiceInfo>> loader, List<PrintServiceInfo> services)
LoaderManager.LoaderCallbacks
FragmentManager.openTransaction()
for further discussion on this.
This function is guaranteed to be called prior to the release of the last data that was supplied for this Loader. At this point you should remove all use of the old data (since it will be released soon), but should not do your own release of the data since its Loader owns it and will take care of that. The Loader will take care of management of its data so you don't have to. In particular:
The Loader will monitor for changes to the data, and report
them to you through new calls here. You should not monitor the
data yourself. For example, if the data is a Cursor
and you place it in a CursorAdapter
, use
the CursorAdapter.CursorAdapter(android.content.Context,
android.database.Cursor, int)
constructor without passing
in either CursorAdapter.FLAG_AUTO_REQUERY
or CursorAdapter.FLAG_REGISTER_CONTENT_OBSERVER
(that is, use 0 for the flags argument). This prevents the CursorAdapter
from doing its own observing of the Cursor, which is not needed since
when a change happens you will get a new Cursor throw another call
here.
Cursor
from a CursorLoader
,
you should not call close() on it yourself. If the Cursor is being placed in a
CursorAdapter
, you should use the
CursorAdapter.swapCursor(android.database.Cursor)
method so that the old Cursor is not closed.
onLoadFinished
in interface LoaderManager.LoaderCallbacks<List<PrintServiceInfo>>
loader
- The Loader that has finished.services
- The data generated by the Loader.public void onLoaderReset(Loader<List<PrintServiceInfo>> loader)
LoaderManager.LoaderCallbacks
onLoaderReset
in interface LoaderManager.LoaderCallbacks<List<PrintServiceInfo>>
loader
- The Loader that is being reset.