java.lang.Object
com.ibm.wala.dalvik.util.androidEntryPoints.ActivityEP

public final class ActivityEP extends Object
Hardcoded EntryPoint-specifications for an Android-Activity.

The specifications are read and handled by AndroidEntryPointLocator.

Author:
Tobias Blaschke <code@tobiasblaschke.de>
See Also:
  • Field Details

    • onCreate

      Called after App.onCreate - assumed to be before Service.onCreate.

      This does not have to be called before Service.onCreate but the user assumably starts most apps with an activity we place it slightly before the Services

    • onStart

      Called a view steps before the Activity gets visible.

      Called after onCreate(Bundle) — or after onRestart() when the activity had been stopped, but is now again being displayed to the user. It will be followed by onResume().

    • onRestoreInstanceState

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onRestoreInstanceState
      Restores the View-State (and may do other stuff).

      This method is called after onStart() when the activity is being re-initialized from a previously saved state, given here in savedInstanceState.

      The default implementation of this method performs a restore of any view state that had previously been frozen by onSaveInstanceState(Bundle).

      This method is called between onStart() and onPostCreate(Bundle).

    • onPostCreate

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onPostCreate
      Called when activity start-up is complete.

      Called after onStart() and onRestoreInstanceState(Bundle)

    • onResume

      Activity starts interacting with the user.

      Called after onRestoreInstanceState(Bundle), onRestart(), or onPause() Use onWindowFocusChanged(boolean) to know for certain that your activity is visible to the user.

    • onPostResume

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onPostResume
      Called when activity resume is complete.
    • onNewIntent

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onNewIntent
      Activity is re-launched while at the top of the activity stack instead of a new instance of the activity being started. onNewIntent() will be called on the existing instance with the Intent that was used to re-launch it.

      An activity will always be paused before receiving a new intent, so you can count on onResume() being called after this method.

    • onStop

      Called when you are no longer visible to the user.

      Next call will be either onRestart(), onDestroy(), or nothing, depending on later user activity.

    • onRestart

      Current activity is being re-displayed to the user.

      Called after onStop(), followed by onStart() and then onResume().

    • onSaveInstanceState

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onSaveInstanceState
      Called to retrieve per-instance state from an activity before being killed.

      It will get restored by onCreate(Bundle) or onRestoreInstanceState(Bundle).

      If called, this method will occur before onStop(). There are no guarantees about whether it will occur before or after onPause().

    • onPause

      Activity is going to the background.

      Activity has not (yet) been killed. The counterpart to onResume().

      In situations where the system needs more memory it may kill paused processes to reclaim resources. In general onSaveInstanceState(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 onStop() however in some cases there will be a direct call back to onResume() without going through the stopped state.

    • onDestroy

      Perform any final cleanup before an activity is destroyed.

      Someone called finish() on the Activity, or the system is temporarily destroying this Activity to save space. There are situations where the system will simply kill the activity's hosting process without calling this method.

    • onActivityResult

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onActivityResult
      Called when an Activity started by this one returns its result.
    • dispatchPopulateAccessibilityEvent

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint dispatchPopulateAccessibilityEvent
      Accessibility events that are sent by the system when something notable happens in the user interface. For example, when a Button is clicked, a View is focused, etc.

      TODO: Assert included everywhere

    • onCreateDialog

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onCreateDialog
      Callback for creating dialogs that are managed (saved and restored) for you by the activity.

      If you would like an opportunity to prepare your dialog before it is shown, override onPrepareDialog.

      This method was deprecated in API level 13.

    • onPrepareDialog

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onPrepareDialog
      Provides an opportunity to prepare a managed dialog before it is being shown.

      This method was deprecated in API level 13.

    • onCreateView

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onCreateView
      used when inflating with the LayoutInflater returned by getSystemService(String).

      TODO: More info This implementation handles tags to embed fragments inside of the activity.

    • onAttachFragment

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onAttachFragment
      Called when a Fragment is being attached to this activity, immediately after the call to its Fragment.onAttach() method and before Fragment.onCreate().
    • onAttachedToWindow

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onAttachedToWindow
      Called when the main window associated with the activity has been attached to the window manager. See View.onAttachedToWindow() for more information. # TODO: See

      Note that this function is guaranteed to be called before View.onDraw including before or after onMeasure(int, int).

    • onDetachedFromWindow

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onDetachedFromWindow
      Called when the main window associated with the activity has been detached from the window manager. See View.onDetachedFromWindow() for more information. # TODO See
    • onContentChanged

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onContentChanged
      This hook is called whenever the content view of the screen changes.

      Due to a call to Window.setContentView or Window.addContentView

    • onApplyThemeResource

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onApplyThemeResource
      Called by setTheme(int) and getTheme() to apply a theme resource to the current Theme object.

      TODO: Do we have to register an entrypoint for this?

    • onCreatePanelView

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onCreatePanelView
      TODO: GET MORE INFO ON THIS!.

      This simply returns null so that all panel sub-windows will have the default menu behavior.

    • onCreatePanelMenu

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onCreatePanelMenu
      TODO: GET MORE INFO ON THIS!.

      This calls through to the new onCreateOptionsMenu(Menu) method for the FEATURE_OPTIONS_PANEL panel

    • onPreparePanel

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onPreparePanel
      TODO: GET MORE INFO ON THIS!.

      This calls through to the new onPrepareOptionsMenu(Menu) method for the FEATURE_OPTIONS_PANEL

    • onPanelClosed

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onPanelClosed
      TODO: GET MORE INFO ON THIS!.

      This calls through to onOptionsMenuClosed(Menu) method for the FEATURE_OPTIONS_PANEL. For context menus (FEATURE_CONTEXT_MENU), the onContextMenuClosed(Menu) will be called.

    • onCreateContextMenu

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onCreateContextMenu
      Called when a context menu for the view is about to be shown.

      Unlike onCreateOptionsMenu(Menu), this will be called every time the context menu is about to be shown.

      Use onContextItemSelected(android.view.MenuItem) to know when an item has been selected.

    • onContextItemSelected

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onContextItemSelected
      TODO: How does this correlate to onMenuItemSelected.

      You can use this method for any items for which you would like to do processing without those other facilities.

    • onContextMenuClosed

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onContextMenuClosed
      This hook is called whenever the context menu is being closed.

      either by the user canceling the menu with the back/menu button, or when an item is selected.

    • onCreateOptionsMenu

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onCreateOptionsMenu
    • onOptionsItemSelected

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onOptionsItemSelected
    • onPrepareOptionsMenu

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onPrepareOptionsMenu
    • onOptionsMenuClosed

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onOptionsMenuClosed
    • onMenuOpened

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onMenuOpened
      TODO: More Info
    • onMenuItemSelected

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onMenuItemSelected
      TODO More info.

      This calls through to the new onOptionsItemSelected(MenuItem)

    • onTitleChanged

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onTitleChanged
    • onChildTitleChanged

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onChildTitleChanged
    • onUserInteraction

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onUserInteraction
      Called whenever a key, touch, or trackball event is dispatched to the activity.

      This callback and onUserLeaveHint() are intended to help activities manage status bar notifications intelligently; specifically, for helping activities determine the proper time to cancel a notification.

      All calls to your activity's onUserLeaveHint() callback will be accompanied by calls to onUserInteraction().

      Note that this callback will be invoked for the touch down action that begins a touch gesture, but may not be invoked for the touch-moved and touch-up actions that follow.

    • dispatchTouchEvent

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint dispatchTouchEvent
    • onTouchEvent

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onTouchEvent
      Called when a touch screen event was not handled by any of the views under it.

      This is most useful to process touch events that happen outside of your window bounds, where there is no view to receive it.

    • dispatchGenericMotionEvent

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint dispatchGenericMotionEvent
      You can override this to intercept all generic motion events before they are dispatched to the window.

      TODO: Verify before on... stuff

    • onGenericMotionEvent

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onGenericMotionEvent
      Called when a generic motion event was not handled by any of the views inside of the activity.

      Generic motion events with source class SOURCE_CLASS_POINTER are delivered to the view under the pointer. All other generic motion events are delivered to the focused view.

      TODO: After onUserInteraction?

    • dispatchTrackballEvent

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint dispatchTrackballEvent
    • onTrackballEvent

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onTrackballEvent
      Called when the trackball was moved and not handled by any of the views inside of the activity.

      The call here happens before trackball movements are converted to DPAD key events, which then get sent back to the view hierarchy, and will be processed at the point for things like focus navigation.

    • dispatchKeyEvent

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint dispatchKeyEvent
      You can override this to intercept all key events before they are dispatched to the window. TODO: Verify before on... stuff
    • dispatchKeyShortcutEvent

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint dispatchKeyShortcutEvent
    • onKeyDown

      The default implementation takes care of KEYCODE_BACK by calling onBackPressed(), though the behavior varies based on the application compatibility mode: for ECLAIR or later applications, it will set up the dispatch to call onKeyUp(int, KeyEvent) where the action will be performed; for earlier applications, it will perform the action immediately in on-down, as those versions of the platform behaved.

      TODO: After onUserInteraction?

    • onKeyLongPress

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onKeyLongPress
    • onKeyMultiple

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onKeyMultiple
    • onKeyShortcut

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onKeyShortcut
    • onKeyUp

      The default implementation handles KEYCODE_BACK to stop the activity and go back.
    • onBackPressed

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onBackPressed
    • onCreateNavigateUpTaskStack

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onCreateNavigateUpTaskStack
      This method will be invoked by the default implementation of onNavigateUp()
    • onPrepareNavigateUpTaskStack

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onPrepareNavigateUpTaskStack
      Prepare the synthetic task stack that will be generated during Up navigation from a different task.
    • onNavigateUpFromChild

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onNavigateUpFromChild
      This is called when a child activity of this one attempts to navigate up. The default implementation simply calls onNavigateUp() on this activity (the parent).
    • onNavigateUp

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onNavigateUp
      This method is called whenever the user chooses to navigate Up within your application's activity hierarchy from the action bar.
    • onSearchRequested

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onSearchRequested
      This hook is called when the user signals the desire to start a search.

      ..in response to a menu item, search button, or other widgets within your activity.

    • onActionModeStarted

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onActionModeStarted
      Menus may depend on it..
    • onActionModeFinished

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onActionModeFinished
    • onWindowStartingActionMode

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onWindowStartingActionMode
      Give the Activity a chance to control the UI for an action mode requested by the system.
    • onConfigurationChanged

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onConfigurationChanged
      Will be called if you have selected configurations you would like to handle with the configChanges attribute in your manifest. If any configuration change occurs that is not selected to be reported by that attribute, then instead of reporting it the system will stop and restart the activity
    • onSharedPreferenceChanged

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onSharedPreferenceChanged
    • onCreateDescription

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onCreateDescription
      This method is called before pausing
    • onCreateThumbnail

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onCreateThumbnail
      This method is called before pausing
    • onProvideAssistData

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onProvideAssistData
      This function will be called after any global assist callbacks.

      Assit is requested by the user. TODO: WTF is this?

    • onRetainNonConfigurationInstance

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onRetainNonConfigurationInstance
      Called by the system, as part of destroying an activity due to a configuration change, when it is known that a new instance will immediately be created for the new configuration.

      The function will be called between onStop() and onDestroy(). A new instance of the activity will always be immediately created after this one's onDestroy() is called.

    • onLowMemory

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onLowMemory
      While the exact point at which this will be called is not defined, generally it will happen when all background process have been killed. That is, before reaching the point of killing processes hosting service and foreground UI that we would like to avoid killing.
    • onTrimMemory

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onTrimMemory
      This will happen for example when it goes in the background and there is not enough memory to keep as many background processes running as desired.
    • onUserLeaveHint

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onUserLeaveHint
      Called as part of the activity lifecycle when an activity is about to go into the background as the result of user choice. For example, when the user presses the Home key.

      this method is called right before the activity's onPause() callback.

    • onWindowAttributesChanged

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onWindowAttributesChanged
      This is called whenever the current window attributes change.
    • onWindowFocusChanged

      public static final AndroidEntryPointLocator.AndroidPossibleEntryPoint onWindowFocusChanged
      Called when the current Window of the activity gains or loses focus.

      Note that this provides information about global focus state, which is managed independently of activity lifecycles. As such, while focus changes will generally have some relation to lifecycle changes, you should not rely on any particular order between the callbacks here and those in the other lifecycle methods such as onResume().

  • Constructor Details

    • ActivityEP

      public ActivityEP()
  • Method Details