From 4cd12d0aa16bbbb84058d6153efea54b93e8765f Mon Sep 17 00:00:00 2001 From: Pascal Welsch Date: Fri, 27 Oct 2017 09:57:41 +0100 Subject: [PATCH] Generate new sources for 27.0.0 --- .../activity/ActivityDelegate.java | 44 + .../activity/ActivityPlugin.java | 1908 +------- .../activity/CompositeActivity.java | 3923 +---------------- .../activity/ICompositeActivity.java | 8 + .../fragment/CompositeDialogFragment.java | 76 +- .../fragment/CompositeFragment.java | 76 +- .../fragment/DialogFragmentDelegate.java | 30 +- .../fragment/FragmentDelegate.java | 30 +- .../fragment/FragmentPlugin.java | 61 +- .../fragment/ICompositeFragment.java | 58 +- 10 files changed, 437 insertions(+), 5777 deletions(-) diff --git a/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ActivityDelegate.java b/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ActivityDelegate.java index 3130243..5df9d49 100644 --- a/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ActivityDelegate.java +++ b/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ActivityDelegate.java @@ -6602,6 +6602,28 @@ public void call(final Integer requestedOrientation) { superCall.call(requestedOrientation); } + public void setShowWhenLocked(final boolean showWhenLocked) { + if (mPlugins.isEmpty()) { + getOriginal().super_setShowWhenLocked(showWhenLocked); + return; + } + + final ListIterator iterator = mPlugins.listIterator(mPlugins.size()); + + final CallVoid1 superCall = new CallVoid1("setShowWhenLocked(Boolean)") { + + @Override + public void call(final Boolean showWhenLocked) { + if (iterator.hasPrevious()) { + iterator.previous().setShowWhenLocked(this, showWhenLocked); + } else { + getOriginal().super_setShowWhenLocked(showWhenLocked); + } + } + }; + superCall.call(showWhenLocked); + } + public void setSupportActionBar(@Nullable final Toolbar toolbar) { if (mPlugins.isEmpty()) { getOriginal().super_setSupportActionBar(toolbar); @@ -6829,6 +6851,28 @@ public void call(final Integer textColor) { superCall.call(textColor); } + public void setTurnScreenOn(final boolean turnScreenOn) { + if (mPlugins.isEmpty()) { + getOriginal().super_setTurnScreenOn(turnScreenOn); + return; + } + + final ListIterator iterator = mPlugins.listIterator(mPlugins.size()); + + final CallVoid1 superCall = new CallVoid1("setTurnScreenOn(Boolean)") { + + @Override + public void call(final Boolean turnScreenOn) { + if (iterator.hasPrevious()) { + iterator.previous().setTurnScreenOn(this, turnScreenOn); + } else { + getOriginal().super_setTurnScreenOn(turnScreenOn); + } + } + }; + superCall.call(turnScreenOn); + } + public void setVisible(final boolean visible) { if (mPlugins.isEmpty()) { getOriginal().super_setVisible(visible); diff --git a/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ActivityPlugin.java b/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ActivityPlugin.java index 7f23b70..fda4a29 100644 --- a/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ActivityPlugin.java +++ b/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ActivityPlugin.java @@ -20,27 +20,22 @@ import android.app.Activity; import android.app.ActivityManager; -import android.app.ActivityOptions; import android.app.Dialog; import android.app.PendingIntent; import android.app.PictureInPictureParams; -import android.app.SearchManager; import android.app.VoiceInteractor; import android.app.assist.AssistContent; import android.arch.lifecycle.Lifecycle; -import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; import android.content.ComponentCallbacks; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; -import android.content.CursorLoader; import android.content.Intent; import android.content.IntentFilter; import android.content.IntentSender; import android.content.ServiceConnection; import android.content.SharedPreferences; -import android.content.pm.ActivityInfo; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.res.AssetManager; @@ -53,16 +48,11 @@ import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; -import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.PersistableBundle; import android.os.UserHandle; -import android.provider.Settings; -import android.service.voice.VoiceInteractionService; -import android.service.voice.VoiceInteractionSession; -import android.service.vr.VrListenerService; import android.support.annotation.IdRes; import android.support.annotation.LayoutRes; import android.support.annotation.NonNull; @@ -83,12 +73,10 @@ import android.transition.Scene; import android.transition.TransitionManager; import android.util.AttributeSet; -import android.util.Pair; import android.view.ContextMenu; import android.view.Display; import android.view.DragAndDropPermissions; import android.view.DragEvent; -import android.view.InputDevice; import android.view.KeyEvent; import android.view.KeyboardShortcutGroup; import android.view.LayoutInflater; @@ -128,16 +116,6 @@ public void addContentView(final View view, final ViewGroup.LayoutParams params) ((CallVoid2) mSuperListeners.pop()).call(view, params); } - /** - * Call to set an "override configuration" on this context -- this is - * a configuration that replies one or more values of the standard - * configuration that is applied to the context. See - * {@link Context#createConfigurationContext(Configuration)} for more - * information. - * - *

This method can only be called once, and must be called before any - * calls to {@link #getResources()} or {@link #getAssets()} are made. - */ public void applyOverrideConfiguration(final Configuration overrideConfiguration) { verifyMethodCalledFromDelegate("applyOverrideConfiguration(Configuration)"); ((CallVoid1) mSuperListeners.pop()).call(overrideConfiguration); @@ -201,14 +179,14 @@ public int checkUriPermission(final Uri uri, final String readPermission, .pop()).call(uri, readPermission, writePermission, pid, uid, modeFlags); } + /** + * @deprecated + */ public void clearWallpaper() throws IOException { verifyMethodCalledFromDelegate("clearWallpaper()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Programmatically closes the most recently opened context menu, if showing. - */ public void closeContextMenu() { verifyMethodCalledFromDelegate("closeContextMenu()"); ((CallVoid0) mSuperListeners.pop()).call(); @@ -248,31 +226,6 @@ public Context createPackageContext(final String packageName, final int flags) .call(packageName, flags); } - /** - * Create a new PendingIntent object which you can hand to others - * for them to use to send result data back to your - * {@link #onActivityResult} callback. The created object will be either - * one-shot (becoming invalid after a result is sent back) or multiple - * (allowing any number of results to be sent through it). - * - * @param requestCode Private request code for the sender that will be - * associated with the result data when it is returned. The sender can not - * modify this value, allowing you to identify incoming results. - * @param data Default data to supply in the result, which may be modified - * by the sender. - * @param flags May be {@link PendingIntent#FLAG_ONE_SHOT PendingIntent.FLAG_ONE_SHOT}, - * {@link PendingIntent#FLAG_NO_CREATE PendingIntent.FLAG_NO_CREATE}, - * {@link PendingIntent#FLAG_CANCEL_CURRENT PendingIntent.FLAG_CANCEL_CURRENT}, - * {@link PendingIntent#FLAG_UPDATE_CURRENT PendingIntent.FLAG_UPDATE_CURRENT}, - * or any of the flags as supported by - * {@link Intent#fillIn Intent.fillIn()} to control which unspecified parts - * of the intent that can be supplied when the actual send happens. - * @return Returns an existing or new PendingIntent matching the given - * parameters. May return null only if - * {@link PendingIntent#FLAG_NO_CREATE PendingIntent.FLAG_NO_CREATE} has been - * supplied. - * @see PendingIntent - */ public PendingIntent createPendingResult(final int requestCode, @NonNull final Intent data, final int flags) { verifyMethodCalledFromDelegate("createPendingResult(Integer, Intent, Integer)"); @@ -300,15 +253,6 @@ public boolean deleteSharedPreferences(final String name) { return ((CallFun1) mSuperListeners.pop()).call(name); } - /** - * Called to process generic motion events. You can override this to - * intercept all generic motion events before they are dispatched to the - * window. Be sure to call this implementation for generic motion events - * that should be handled normally. - * - * @param ev The generic motion event. - * @return boolean Return true if this event was consumed. - */ public boolean dispatchGenericMotionEvent(final MotionEvent ev) { verifyMethodCalledFromDelegate("dispatchGenericMotionEvent(MotionEvent)"); return ((CallFun1) mSuperListeners.pop()).call(ev); @@ -319,15 +263,6 @@ public boolean dispatchKeyEvent(final KeyEvent event) { return ((CallFun1) mSuperListeners.pop()).call(event); } - /** - * Called to process a key shortcut event. - * You can override this to intercept all key shortcut events before they are - * dispatched to the window. Be sure to call this implementation for key shortcut - * events that should be handled normally. - * - * @param event The key shortcut event. - * @return True if this event was consumed. - */ public boolean dispatchKeyShortcutEvent(final KeyEvent event) { verifyMethodCalledFromDelegate("dispatchKeyShortcutEvent(KeyEvent)"); return ((CallFun1) mSuperListeners.pop()).call(event); @@ -338,29 +273,11 @@ public boolean dispatchPopulateAccessibilityEvent(final AccessibilityEvent event return ((CallFun1) mSuperListeners.pop()).call(event); } - /** - * Called to process touch screen events. You can override this to - * intercept all touch screen events before they are dispatched to the - * window. Be sure to call this implementation for touch screen events - * that should be handled normally. - * - * @param ev The touch screen event. - * @return boolean Return true if this event was consumed. - */ public boolean dispatchTouchEvent(final MotionEvent ev) { verifyMethodCalledFromDelegate("dispatchTouchEvent(MotionEvent)"); return ((CallFun1) mSuperListeners.pop()).call(ev); } - /** - * Called to process trackball events. You can override this to - * intercept all trackball events before they are dispatched to the - * window. Be sure to call this implementation for trackball events - * that should be handled normally. - * - * @param ev The trackball event. - * @return boolean Return true if this event was consumed. - */ public boolean dispatchTrackballEvent(final MotionEvent ev) { verifyMethodCalledFromDelegate("dispatchTrackballEvent(MotionEvent)"); return ((CallFun1) mSuperListeners.pop()).call(ev); @@ -420,9 +337,7 @@ public void enforceUriPermission(final Uri uri, final String readPermission, } /** - * Puts the activity in picture-in-picture mode. - * - * @see android.R.attr#supportsPictureInPicture + * @deprecated */ public void enterPictureInPictureMode() { verifyMethodCalledFromDelegate("enterPictureInPictureMode()"); @@ -444,101 +359,41 @@ public T findViewById(@IdRes final int id) { return ((CallFun1) mSuperListeners.pop()).call(id); } - /** - * Call this when your activity is done and should be closed. The - * ActivityResult is propagated back to whoever launched you via - * onActivityResult(). - */ public void finish() { verifyMethodCalledFromDelegate("finish()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Force finish another activity that you had previously started with - * {@link #startActivityForResult}. - * - * @param requestCode The request code of the activity that you had - * given to startActivityForResult(). If there are multiple - * activities started with this request code, they - * will all be finished. - */ public void finishActivity(final int requestCode) { verifyMethodCalledFromDelegate("finishActivity(Integer)"); ((CallVoid1) mSuperListeners.pop()).call(requestCode); } - /** - * This is called when a child activity of this one calls its - * finishActivity(). - * - * @param child The activity making the call. - * @param requestCode Request code that had been used to start the - */ public void finishActivityFromChild(@NonNull final Activity child, final int requestCode) { verifyMethodCalledFromDelegate("finishActivityFromChild(Activity, Integer)"); ((CallVoid2) mSuperListeners.pop()).call(child, requestCode); } - /** - * Finish this activity as well as all activities immediately below it - * in the current task that have the same affinity. This is typically - * used when an application can be launched on to another task (such as - * from an ACTION_VIEW of a content type it understands) and the user - * has used the up navigation to switch out of the current task and in - * to its own task. In this case, if the user has navigated down into - * any other activities of the second application, all of those should - * be removed from the original task as part of the task switch. - * - *

Note that this finish does not allow you to deliver results - * to the previous activity, and an exception will be thrown if you are trying - * to do so.

- */ public void finishAffinity() { verifyMethodCalledFromDelegate("finishAffinity()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Reverses the Activity Scene entry Transition and triggers the calling Activity - * to reverse its exit Transition. When the exit Transition completes, - * {@link #finish()} is called. If no entry Transition was used, finish() is called - * immediately and the Activity exit Transition is run. - * - * @see ActivityOptions#makeSceneTransitionAnimation(Activity, Pair[]) - */ public void finishAfterTransition() { verifyMethodCalledFromDelegate("finishAfterTransition()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Call this when your activity is done and should be closed and the task should be completely - * removed as a part of finishing the root activity of the task. - */ public void finishAndRemoveTask() { verifyMethodCalledFromDelegate("finishAndRemoveTask()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * This is called when a child activity of this one calls its - * {@link #finish} method. The default implementation simply calls - * finish() on this activity (the parent), finishing the entire group. - * - * @param child The activity making the call. - * @see #finish - */ public void finishFromChild(final Activity child) { verifyMethodCalledFromDelegate("finishFromChild(Activity)"); ((CallVoid1) mSuperListeners.pop()).call(child); } - /** - * Retrieve a reference to this activity's ActionBar. - * - * @return The Activity's ActionBar, or null if it does not have one. - */ public android.app.ActionBar getActionBar() { verifyMethodCalledFromDelegate("getActionBar()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -563,9 +418,6 @@ public AssetManager getAssets() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * @return the base context as set by the constructor or setBaseContext - */ public Context getBaseContext() { verifyMethodCalledFromDelegate("getBaseContext()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -576,64 +428,16 @@ public File getCacheDir() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Return the name of the activity that invoked this activity. This is - * who the data in {@link #setResult setResult()} will be sent to. You - * can use this information to validate that the recipient is allowed to - * receive the data. - * - *

Note: if the calling activity is not expecting a result (that is it - * did not use the {@link #startActivityForResult} - * form that includes a request code), then the calling package will be - * null. - * - * @return The ComponentName of the activity that will receive your - * reply, or null if none. - */ public ComponentName getCallingActivity() { verifyMethodCalledFromDelegate("getCallingActivity()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Return the name of the package that invoked this activity. This is who - * the data in {@link #setResult setResult()} will be sent to. You can - * use this information to validate that the recipient is allowed to - * receive the data. - * - *

Note: if the calling activity is not expecting a result (that is it - * did not use the {@link #startActivityForResult} - * form that includes a request code), then the calling package will be - * null.

- * - *

Note: prior to {@link Build.VERSION_CODES#JELLY_BEAN_MR2}, - * the result from this method was unstable. If the process hosting the calling - * package was no longer running, it would return null instead of the proper package - * name. You can use {@link #getCallingActivity()} and retrieve the package name - * from that instead.

- * - * @return The package of the activity that will receive your - * reply, or null if none. - */ public String getCallingPackage() { verifyMethodCalledFromDelegate("getCallingPackage()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * If this activity is being destroyed because it can not handle a - * configuration parameter being changed (and thus its - * {@link #onConfigurationChanged(Configuration)} method is - * not being called), then you can use this method to discover - * the set of changes that have occurred while in the process of being - * destroyed. Note that there is no guarantee that these will be - * accurate (other changes could have happened at any time), so you should - * only use this as an optimization hint. - * - * @return Returns a bit field of the configuration parameters that are - * changing, as defined by the {@link Configuration} - * class. - */ public int getChangingConfigurations() { verifyMethodCalledFromDelegate("getChangingConfigurations()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -649,11 +453,6 @@ public File getCodeCacheDir() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Returns complete component name of this activity. - * - * @return Returns the complete component name for this activity - */ public ComponentName getComponentName() { verifyMethodCalledFromDelegate("getComponentName()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -664,41 +463,16 @@ public ContentResolver getContentResolver() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Retrieve the {@link Scene} representing this window's current content. - * Requires {@link Window#FEATURE_CONTENT_TRANSITIONS}. - * - *

This method will return null if the current content is not represented by a Scene.

- * - * @return Current Scene being shown or null - */ public Scene getContentScene() { verifyMethodCalledFromDelegate("getContentScene()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Retrieve the {@link TransitionManager} responsible for default transitions in this window. - * Requires {@link Window#FEATURE_CONTENT_TRANSITIONS}. - * - *

This method will return non-null after content has been initialized (e.g. by using - * {@link #setContentView}) if {@link Window#FEATURE_CONTENT_TRANSITIONS} has been granted.

- * - * @return This window's content TransitionManager or null if none is set. - */ public TransitionManager getContentTransitionManager() { verifyMethodCalledFromDelegate("getContentTransitionManager()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Calls {@link Window#getCurrentFocus} on the - * Window of this Activity to return the currently focused view. - * - * @return View The current View with focus or null. - * @see #getWindow - * @see Window#getCurrentFocus - */ public View getCurrentFocus() { verifyMethodCalledFromDelegate("getCurrentFocus()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -769,18 +543,11 @@ public File getFilesDir() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Return the FragmentManager for interacting with fragments associated - * with this activity. - */ public android.app.FragmentManager getFragmentManager() { verifyMethodCalledFromDelegate("getFragmentManager()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Return the intent that started this activity. - */ public Intent getIntent() { verifyMethodCalledFromDelegate("getIntent()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -790,10 +557,6 @@ public Object getLastNonConfigurationInstance(final String key) { return getCompositeDelegate().getLastNonConfigurationInstance(key); } - /** - * Convenience for calling - * {@link Window#getLayoutInflater}. - */ public LayoutInflater getLayoutInflater() { verifyMethodCalledFromDelegate("getLayoutInflater()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -804,20 +567,11 @@ public Lifecycle getLifecycle() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Return the LoaderManager for this activity, creating it if needed. - */ public android.app.LoaderManager getLoaderManager() { verifyMethodCalledFromDelegate("getLoaderManager()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Returns class name for this activity with the package prefix removed. - * This is the default name used to read and write settings. - * - * @return The local class name. - */ public String getLocalClassName() { verifyMethodCalledFromDelegate("getLocalClassName()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -873,68 +627,21 @@ public String getPackageResourcePath() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Obtain an {@link Intent} that will launch an explicit target activity specified by - * this activity's logical parent. The logical parent is named in the application's manifest - * by the {@link android.R.attr#parentActivityName parentActivityName} attribute. - * Activity subclasses may override this method to modify the Intent returned by - * super.getParentActivityIntent() or to implement a different mechanism of retrieving - * the parent intent entirely. - * - * @return a new Intent targeting the defined parent of this activity or null if - * there is no valid parent. - */ public Intent getParentActivityIntent() { verifyMethodCalledFromDelegate("getParentActivityIntent()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Retrieve a {@link SharedPreferences} object for accessing preferences - * that are private to this activity. This simply calls the underlying - * {@link #getSharedPreferences(String, int)} method by passing in this activity's - * class name as the preferences name. - * - * @param mode Operating mode. Use {@link #MODE_PRIVATE} for the default - * operation. - * @return Returns the single SharedPreferences instance that can be used - * to retrieve and modify the preference values. - */ public SharedPreferences getPreferences(final int mode) { verifyMethodCalledFromDelegate("getPreferences(Integer)"); return ((CallFun1) mSuperListeners.pop()).call(mode); } - /** - * Return information about who launched this activity. If the launching Intent - * contains an {@link Intent#EXTRA_REFERRER Intent.EXTRA_REFERRER}, - * that will be returned as-is; otherwise, if known, an - * {@link Intent#URI_ANDROID_APP_SCHEME android-app:} referrer URI containing the - * package name that started the Intent will be returned. This may return null if no - * referrer can be identified -- it is neither explicitly specified, nor is it known which - * application package was involved. - * - *

If called while inside the handling of {@link #onNewIntent}, this function will - * return the referrer that submitted that new intent to the activity. Otherwise, it - * always returns the referrer of the original Intent.

- * - *

Note that this is not a security feature -- you can not trust the - * referrer information, applications can spoof it.

- */ public Uri getReferrer() { verifyMethodCalledFromDelegate("getReferrer()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Return the current requested orientation of the activity. This will - * either be the orientation requested in its component's manifest, or - * the last requested orientation given to - * {@link #setRequestedOrientation(int)}. - * - * @return Returns an orientation constant as used in - * {@link ActivityInfo#screenOrientation ActivityInfo.screenOrientation}. - */ public int getRequestedOrientation() { verifyMethodCalledFromDelegate("getRequestedOrientation()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -981,12 +688,6 @@ public String getSystemServiceName(final Class serviceClass) { return ((CallFun1>) mSuperListeners.pop()).call(serviceClass); } - /** - * Return the identifier of the task this activity is in. This identifier - * will remain the same for the lifetime of the activity. - * - * @return Task identifier, an opaque integer. - */ public int getTaskId() { verifyMethodCalledFromDelegate("getTaskId()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -997,46 +698,40 @@ public Resources.Theme getTheme() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Retrieve the active {@link VoiceInteractor} that the user is going through to - * interact with this activity. - */ public VoiceInteractor getVoiceInteractor() { verifyMethodCalledFromDelegate("getVoiceInteractor()"); return ((CallFun0) mSuperListeners.pop()).call(); } + /** + * @deprecated + */ public Drawable getWallpaper() { verifyMethodCalledFromDelegate("getWallpaper()"); return ((CallFun0) mSuperListeners.pop()).call(); } + /** + * @deprecated + */ public int getWallpaperDesiredMinimumHeight() { verifyMethodCalledFromDelegate("getWallpaperDesiredMinimumHeight()"); return ((CallFun0) mSuperListeners.pop()).call(); } + /** + * @deprecated + */ public int getWallpaperDesiredMinimumWidth() { verifyMethodCalledFromDelegate("getWallpaperDesiredMinimumWidth()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Retrieve the current {@link Window} for the activity. - * This can be used to directly access parts of the Window API that - * are not available through Activity/Screen. - * - * @return Window The current window, or null if the activity is not - * visual. - */ public Window getWindow() { verifyMethodCalledFromDelegate("getWindow()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Retrieve the window manager for showing custom windows. - */ public WindowManager getWindowManager() { verifyMethodCalledFromDelegate("getWindowManager()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -1047,13 +742,6 @@ public void grantUriPermission(final String toPackage, final Uri uri, final int ((CallVoid3) mSuperListeners.pop()).call(toPackage, uri, modeFlags); } - /** - * Returns true if this activity's main window currently has window focus. - * Note that this is not the same as the view itself having focus. - * - * @return True if this activity's main window currently has window focus. - * @see #onWindowAttributesChanged(WindowManager.LayoutParams) - */ public boolean hasWindowFocus() { verifyMethodCalledFromDelegate("hasWindowFocus()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -1069,24 +757,11 @@ public boolean isActivityTransitionRunning() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Check to see whether this activity is in the process of being destroyed in order to be - * recreated with a new configuration. This is often used in - * {@link #onStop} to determine whether the state needs to be cleaned up or will be passed - * on to the next instance of the activity via {@link #onRetainNonConfigurationInstance()}. - * - * @return If the activity is being torn down in order to be recreated with a new configuration, - * returns true; else returns false. - */ public boolean isChangingConfigurations() { verifyMethodCalledFromDelegate("isChangingConfigurations()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Returns true if the final {@link #onDestroy()} call has been made - * on the Activity, so this instance is now dead. - */ public boolean isDestroyed() { verifyMethodCalledFromDelegate("isDestroyed()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -1097,66 +772,26 @@ public boolean isDeviceProtectedStorage() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Check to see whether this activity is in the process of finishing, - * either because you called {@link #finish} on it or someone else - * has requested that it finished. This is often used in - * {@link #onPause} to determine whether the activity is simply pausing or - * completely finishing. - * - * @return If the activity is finishing, returns true; else returns false. - * @see #finish - */ public boolean isFinishing() { verifyMethodCalledFromDelegate("isFinishing()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Bit indicating that this activity is "immersive" and should not be - * interrupted by notifications if possible. - * - * This value is initially set by the manifest property - * android:immersive but may be changed at runtime by - * {@link #setImmersive}. - * - * @see #setImmersive(boolean) - * @see ActivityInfo#FLAG_IMMERSIVE - */ public boolean isImmersive() { verifyMethodCalledFromDelegate("isImmersive()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Returns true if the activity is currently in multi-window mode. - * - * @return True if the activity is in multi-window mode. - * @see android.R.attr#resizeableActivity - */ public boolean isInMultiWindowMode() { verifyMethodCalledFromDelegate("isInMultiWindowMode()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Returns true if the activity is currently in picture-in-picture mode. - * - * @return True if the activity is in picture-in-picture mode. - * @see android.R.attr#supportsPictureInPicture - */ public boolean isInPictureInPictureMode() { verifyMethodCalledFromDelegate("isInPictureInPictureMode()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Queries whether the currently enabled voice interaction service supports returning - * a voice interactor for use by the activity. This is valid only for the duration of the - * activity. - * - * @return whether the current voice interaction service supports local voice interaction - */ public boolean isLocalVoiceInteractionSupported() { verifyMethodCalledFromDelegate("isLocalVoiceInteractionSupported()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -1167,34 +802,16 @@ public boolean isRestricted() { return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Return whether this activity is the root of a task. The root is the - * first activity in a task. - * - * @return True if this is the root activity, else false. - */ public boolean isTaskRoot() { verifyMethodCalledFromDelegate("isTaskRoot()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Check whether this activity is running as part of a voice interaction with the user. - * If true, it should perform its interaction with the user through the - * {@link VoiceInteractor} returned by {@link #getVoiceInteractor}. - */ public boolean isVoiceInteraction() { verifyMethodCalledFromDelegate("isVoiceInteraction()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Like {@link #isVoiceInteraction}, but only returns true if this is also the root - * of a voice interaction. That is, returns true if this activity was directly - * started by the voice interaction service as the initiation of a voice interaction. - * Otherwise, for example if it was started by another activity while under voice - * interaction, returns false. - */ public boolean isVoiceInteractionRoot() { verifyMethodCalledFromDelegate("isVoiceInteractionRoot()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -1212,102 +829,31 @@ public boolean moveSharedPreferencesFrom(final Context sourceContext, final Stri .call(sourceContext, name); } - /** - * Move the task containing this activity to the back of the activity - * stack. The activity's order within the task is unchanged. - * - * @param nonRoot If false then this only works if the activity is the root - * of a task; if true it will work for any activity in - * a task. - * @return If the task was moved (or it was already at the - * back) true is returned, else false. - */ public boolean moveTaskToBack(final boolean nonRoot) { verifyMethodCalledFromDelegate("moveTaskToBack(Boolean)"); return ((CallFun1) mSuperListeners.pop()).call(nonRoot); } - /** - * Navigate from this activity to the activity specified by upIntent, finishing this activity - * in the process. If the activity indicated by upIntent already exists in the task's history, - * this activity and all others before the indicated activity in the history stack will be - * finished. - * - *

If the indicated activity does not appear in the history stack, this will finish - * each activity in this task until the root activity of the task is reached, resulting in - * an "in-app home" behavior. This can be useful in apps with a complex navigation hierarchy - * when an activity may be reached by a path not passing through a canonical parent - * activity.

- * - *

This method should be used when performing up navigation from within the same task - * as the destination. If up navigation should cross tasks in some cases, see - * {@link #shouldUpRecreateTask(Intent)}.

- * - * @param upIntent An intent representing the target destination for up navigation - * @return true if up navigation successfully reached the activity indicated by upIntent and - * upIntent was delivered to it. false if an instance of the indicated activity could - * not be found and this activity was simply finished normally. - */ public boolean navigateUpTo(final Intent upIntent) { verifyMethodCalledFromDelegate("navigateUpTo(Intent)"); return ((CallFun1) mSuperListeners.pop()).call(upIntent); } - /** - * This is called when a child activity of this one calls its - * {@link #navigateUpTo} method. The default implementation simply calls - * navigateUpTo(upIntent) on this activity (the parent). - * - * @param child The activity making the call. - * @param upIntent An intent representing the target destination for up navigation - * @return true if up navigation successfully reached the activity indicated by upIntent and - * upIntent was delivered to it. false if an instance of the indicated activity could - * not be found and this activity was simply finished normally. - */ public boolean navigateUpToFromChild(final Activity child, final Intent upIntent) { verifyMethodCalledFromDelegate("navigateUpToFromChild(Activity, Intent)"); return ((CallFun2) mSuperListeners.pop()).call(child, upIntent); } - /** - * Notifies the activity that an action mode has finished. - * Activity subclasses overriding this method should call the superclass implementation. - * - * @param mode The action mode that just finished. - */ public void onActionModeFinished(final android.view.ActionMode mode) { verifyMethodCalledFromDelegate("onActionModeFinished(android.view.ActionMode)"); ((CallVoid1) mSuperListeners.pop()).call(mode); } - /** - * Notifies the Activity that an action mode has been started. - * Activity subclasses overriding this method should call the superclass implementation. - * - * @param mode The new action mode. - */ public void onActionModeStarted(final android.view.ActionMode mode) { verifyMethodCalledFromDelegate("onActionModeStarted(android.view.ActionMode)"); ((CallVoid1) mSuperListeners.pop()).call(mode); } - /** - * Called when an activity you launched with an activity transition exposes this - * Activity through a returning activity transition, giving you the resultCode - * and any additional data from it. This method will only be called if the activity - * set a result code other than {@link #RESULT_CANCELED} and it supports activity - * transitions with {@link Window#FEATURE_ACTIVITY_TRANSITIONS}. - * - *

The purpose of this function is to let the called Activity send a hint about - * its state so that this underlying Activity can prepare to be exposed. A call to - * this method does not guarantee that the called Activity has or will be exiting soon. - * It only indicates that it will expose this Activity's Window and it has - * some data to pass to prepare it.

- * - * @param resultCode The integer result code returned by the child activity - * through its setResult(). - * @param data An Intent, which can return result data to the caller - */ public void onActivityReenter(final int resultCode, final Intent data) { verifyMethodCalledFromDelegate("onActivityReenter(Integer, Intent)"); ((CallVoid2) mSuperListeners.pop()).call(resultCode, data); @@ -1331,24 +877,11 @@ public void onAttachFragment(final Fragment fragment) { ((CallVoid1) mSuperListeners.pop()).call(fragment); } - /** - * Called when a Fragment is being attached to this activity, immediately - * after the call to its {@link android.app.Fragment#onAttach Fragment.onAttach()} - * method and before {@link android.app.Fragment#onCreate Fragment.onCreate()}. - */ public void onAttachFragment(final android.app.Fragment fragment) { verifyMethodCalledFromDelegate("onAttachFragment(android.app.Fragment)"); ((CallVoid1) mSuperListeners.pop()).call(fragment); } - /** - * Called when the main window associated with the activity has been - * attached to the window manager. - * See {@link View#onAttachedToWindow() View.onAttachedToWindow()} - * for more information. - * - * @see View#onAttachedToWindow - */ public void onAttachedToWindow() { verifyMethodCalledFromDelegate("onAttachedToWindow()"); ((CallVoid0) mSuperListeners.pop()).call(); @@ -1374,63 +907,16 @@ public void onContentChanged() { ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * This hook is called whenever an item in a context menu is selected. The - * default implementation simply returns false to have the normal processing - * happen (calling the item's Runnable or sending a message to its Handler - * as appropriate). You can use this method for any items for which you - * would like to do processing without those other facilities. - *

- * Use {@link 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. - * - * @param item The context menu item that was selected. - * @return boolean Return false to allow normal context menu processing to - * proceed, true to consume it here. - */ public boolean onContextItemSelected(final MenuItem item) { verifyMethodCalledFromDelegate("onContextItemSelected(MenuItem)"); return ((CallFun1) mSuperListeners.pop()).call(item); } - /** - * 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). - * - * @param menu The context menu that is being closed. - */ public void onContextMenuClosed(final Menu menu) { verifyMethodCalledFromDelegate("onContextMenuClosed(Menu)"); ((CallVoid1

) mSuperListeners.pop()).call(menu); } - /** - * Same as {@link #onCreate(Bundle)} but called for those activities created with - * the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. - * - * @param savedInstanceState if the activity is being re-initialized after - * previously being shut down then this Bundle contains the data it - * most - * recently supplied in {@link #onSaveInstanceState}. - * Note: Otherwise it is null. - * @param persistentState if the activity is being re-initialized after - * previously being shut down or powered off then this Bundle - * contains - * the data it most - * recently supplied to outPersistentState in {@link - * #onSaveInstanceState}. - * Note: Otherwise it is null. - * @see #onCreate(Bundle) - * @see #onStart - * @see #onSaveInstanceState - * @see #onRestoreInstanceState - * @see #onPostCreate - */ public void onCreate(@Nullable final Bundle savedInstanceState, @Nullable final PersistableBundle persistentState) { verifyMethodCalledFromDelegate("onCreate(Bundle, PersistableBundle)"); @@ -1443,18 +929,6 @@ public void onCreate(@Nullable final Bundle savedInstanceState) { ((CallVoid1) mSuperListeners.pop()).call(savedInstanceState); } - /** - * Called when a context menu for the {@code view} is about to be shown. - * Unlike {@link #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 {@link AdapterView} subclasses, - * this can be found in the {@code menuInfo})). - *

- * Use {@link #onContextItemSelected(MenuItem)} to know when an - * item has been selected. - *

- * It is not safe to hold onto the context menu after this method returns. - */ public void onCreateContextMenu(final ContextMenu menu, final View v, final ContextMenu.ContextMenuInfo menuInfo) { verifyMethodCalledFromDelegate( @@ -1463,29 +937,13 @@ public void onCreateContextMenu(final ContextMenu menu, final View v, .call(menu, v, menuInfo); } - /** - * Generate a new description for this activity. This method is called - * before pausing the activity and can, if desired, return some textual - * description of its current state to be displayed to the user. - * - *

The default implementation returns null, which will cause you to - * inherit the description from the previous activity. If all activities - * return null, generally the label of the top activity will be used as the - * description. - * - * @return A description of what the user is doing. It should be short and - * sweet (only a few words). - * @see #onCreateThumbnail - * @see #onSaveInstanceState - * @see #onPause - */ public CharSequence onCreateDescription() { verifyMethodCalledFromDelegate("onCreateDescription()"); return ((CallFun0) mSuperListeners.pop()).call(); } /** - * @deprecated Old no-arguments version of {@link #onCreateDialog(int, Bundle)}. + * @deprecated */ public Dialog onCreateDialog(final int id) { verifyMethodCalledFromDelegate("onCreateDialog(Integer)"); @@ -1493,92 +951,18 @@ public Dialog onCreateDialog(final int id) { } /** - * Callback for creating dialogs that are managed (saved and restored) for you - * by the activity. The default implementation calls through to - * {@link #onCreateDialog(int)} for compatibility. - * - * If you are targeting {@link Build.VERSION_CODES#HONEYCOMB} - * or later, consider instead using a {@link DialogFragment} instead. - * - *

If you use {@link #showDialog(int)}, the activity will call through to - * this method the first time, and hang onto it thereafter. Any dialog - * that is created by this method will automatically be saved and restored - * for you, including whether it is showing. - * - *

If you would like the activity to manage saving and restoring dialogs - * for you, you should override this method and handle any ids that are - * passed to {@link #showDialog}. - * - *

If you would like an opportunity to prepare your dialog before it is shown, - * override {@link #onPrepareDialog(int, Dialog, Bundle)}. - * - * @param id The id of the dialog. - * @param args The dialog arguments provided to {@link #showDialog(int, Bundle)}. - * @return The dialog. If you return null, the dialog will not be created. - * @see #onPrepareDialog(int, Dialog, Bundle) - * @see #showDialog(int, Bundle) - * @see #dismissDialog(int) - * @see #removeDialog(int) - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ public Dialog onCreateDialog(final int id, final Bundle args) { verifyMethodCalledFromDelegate("onCreateDialog(Integer, Bundle)"); return ((CallFun2) mSuperListeners.pop()).call(id, args); } - /** - * Define the synthetic task stack that will be generated during Up navigation from - * a different task. - * - *

The default implementation of this method adds the parent chain of this activity - * as specified in the manifest to the supplied {@link android.app.TaskStackBuilder}. - * Applications - * may choose to override this method to construct the desired task stack in a different - * way.

- * - *

This method will be invoked by the default implementation of {@link #onNavigateUp()} - * if {@link #shouldUpRecreateTask(Intent)} returns true when supplied with the intent - * returned by {@link #getParentActivityIntent()}.

- * - *

Applications that wish to supply extra Intent parameters to the parent stack defined - * by the manifest should override {@link #onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder)}.

- * - * @param builder An empty TaskStackBuilder - the application should add intents representing - * the desired task stack - */ public void onCreateNavigateUpTaskStack(final android.app.TaskStackBuilder builder) { verifyMethodCalledFromDelegate("onCreateNavigateUpTaskStack(android.app.TaskStackBuilder)"); ((CallVoid1) mSuperListeners.pop()).call(builder); } - /** - * Initialize the contents of the Activity's standard options menu. You - * should place your menu items in to menu. - * - *

This is only called once, the first time the options menu is - * displayed. To update the menu every time it is displayed, see - * {@link #onPrepareOptionsMenu}. - * - *

The default implementation populates the menu with standard system - * menu items. These are placed in the {@link 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 - * {@link #onOptionsItemSelected} method to handle them there. - * - * @param menu The options menu in which you place your items. - * @return You must return true for the menu to be displayed; - * if you return false it will not be shown. - * @see #onPrepareOptionsMenu - * @see #onOptionsItemSelected - */ public boolean onCreateOptionsMenu(final Menu menu) { verifyMethodCalledFromDelegate("onCreateOptionsMenu(Menu)"); return ((CallFun1) mSuperListeners.pop()).call(menu); @@ -1589,13 +973,6 @@ public boolean onCreatePanelMenu(final int featureId, final Menu menu) { return ((CallFun2) mSuperListeners.pop()).call(featureId, menu); } - /** - * Default implementation of - * {@link Window.Callback#onCreatePanelView} - * for activities. This - * simply returns null so that all panel sub-windows will have the default - * menu behavior. - */ public View onCreatePanelView(final int featureId) { verifyMethodCalledFromDelegate("onCreatePanelView(Integer)"); return ((CallFun1) mSuperListeners.pop()).call(featureId); @@ -1606,24 +983,6 @@ public void onCreateSupportNavigateUpTaskStack(@NonNull final TaskStackBuilder b ((CallVoid1) mSuperListeners.pop()).call(builder); } - /** - * Generate a new thumbnail for this activity. This method is called before - * pausing the activity, and should draw into outBitmap the - * imagery for the desired thumbnail in the dimensions of that bitmap. It - * can use the given canvas, which is configured to draw into the - * bitmap, for rendering if desired. - * - *

The default implementation returns fails and does not draw a thumbnail; - * this will result in the platform creating its own thumbnail if needed. - * - * @param outBitmap The bitmap to contain the thumbnail. - * @param canvas Can be used to render into the bitmap. - * @return Return true if you have drawn into the bitmap; otherwise after - * you return it will be filled with a default thumbnail. - * @see #onCreateDescription - * @see #onSaveInstanceState - * @see #onPause - */ public boolean onCreateThumbnail(final Bitmap outBitmap, final Canvas canvas) { verifyMethodCalledFromDelegate("onCreateThumbnail(Bitmap, Canvas)"); return ((CallFun2) mSuperListeners.pop()).call(outBitmap, canvas); @@ -1647,53 +1006,16 @@ public void onDestroy() { ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Called when the main window associated with the activity has been - * detached from the window manager. - * See {@link View#onDetachedFromWindow() View.onDetachedFromWindow()} - * for more information. - * - * @see View#onDetachedFromWindow - */ public void onDetachedFromWindow() { verifyMethodCalledFromDelegate("onDetachedFromWindow()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Activities cannot draw during the period that their windows are animating in. In order - * to know when it is safe to begin drawing they can override this method which will be - * called when the entering animation has completed. - */ public void onEnterAnimationComplete() { verifyMethodCalledFromDelegate("onEnterAnimationComplete()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Called when a generic motion event was not handled by any of the - * views inside of the activity. - *

- * Generic motion events describe joystick movements, mouse hovers, track pad - * touches, scroll wheel movements and other input events. The - * {@link MotionEvent#getSource() source} of the motion event specifies - * the class of input that was received. Implementations of this method - * must examine the bits in the source before processing the event. - * The following code example shows how this is done. - *

- * Generic motion events with source class - * {@link InputDevice#SOURCE_CLASS_POINTER} - * are delivered to the view under the pointer. All other generic motion events are - * delivered to the focused view. - *

- * See {@link View#onGenericMotionEvent(MotionEvent)} for an example of how to - * handle this event. - *

- * - * @param event The generic motion event being processed. - * @return Return true if you have consumed the event, false if you haven't. - * The default implementation always returns false. - */ public boolean onGenericMotionEvent(final MotionEvent event) { verifyMethodCalledFromDelegate("onGenericMotionEvent(MotionEvent)"); return ((CallFun1) mSuperListeners.pop()).call(event); @@ -1704,78 +1026,32 @@ public boolean onKeyDown(final int keyCode, final KeyEvent event) { return ((CallFun2) mSuperListeners.pop()).call(keyCode, event); } - /** - * Default implementation of {@link KeyEvent.Callback#onKeyLongPress(int, KeyEvent) - * KeyEvent.Callback.onKeyLongPress()}: always returns false (doesn't handle - * the event). - */ public boolean onKeyLongPress(final int keyCode, final KeyEvent event) { verifyMethodCalledFromDelegate("onKeyLongPress(Integer, KeyEvent)"); return ((CallFun2) mSuperListeners.pop()).call(keyCode, event); } - /** - * Default implementation of {@link KeyEvent.Callback#onKeyMultiple(int, int, KeyEvent) - * KeyEvent.Callback.onKeyMultiple()}: always returns false (doesn't handle - * the event). - */ public boolean onKeyMultiple(final int keyCode, final int repeatCount, final KeyEvent event) { verifyMethodCalledFromDelegate("onKeyMultiple(Integer, Integer, KeyEvent)"); return ((CallFun3) mSuperListeners.pop()) .call(keyCode, repeatCount, event); } - /** - * Called when a key shortcut event is not handled by any of the views in the Activity. - * Override this method to implement global key shortcuts for the Activity. - * Key shortcuts can also be implemented by setting the - * {@link MenuItem#setShortcut(char, char) shortcut} property of menu items. - * - * @param keyCode The value in event.getKeyCode(). - * @param event Description of the key event. - * @return True if the key shortcut was handled. - */ public boolean onKeyShortcut(final int keyCode, final KeyEvent event) { verifyMethodCalledFromDelegate("onKeyShortcut(Integer, KeyEvent)"); return ((CallFun2) mSuperListeners.pop()).call(keyCode, event); } - /** - * Called when a key was released and not handled by any of the views - * inside of the activity. So, for example, key presses while the cursor - * is inside a TextView will not trigger the event (unless it is a navigation - * to another object) because TextView handles its own key presses. - * - *

The default implementation handles KEYCODE_BACK to stop the activity - * and go back. - * - * @return Return true to prevent this event from being propagated - * further, or false to indicate that you have not handled - * this event and it should continue to be propagated. - * @see #onKeyDown - * @see KeyEvent - */ public boolean onKeyUp(final int keyCode, final KeyEvent event) { verifyMethodCalledFromDelegate("onKeyUp(Integer, KeyEvent)"); return ((CallFun2) mSuperListeners.pop()).call(keyCode, event); } - /** - * Callback to indicate that {@link #startLocalVoiceInteraction(Bundle)} has resulted in a - * voice interaction session being started. You can now retrieve a voice interactor using - * {@link #getVoiceInteractor()}. - */ public void onLocalVoiceInteractionStarted() { verifyMethodCalledFromDelegate("onLocalVoiceInteractionStarted()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Callback to indicate that the local voice interaction has stopped either - * because it was requested through a call to {@link #stopLocalVoiceInteraction()} - * or because it was canceled by the user. The previously acquired {@link VoiceInteractor} - * is no longer valid after this. - */ public void onLocalVoiceInteractionStopped() { verifyMethodCalledFromDelegate("onLocalVoiceInteractionStopped()"); ((CallVoid0) mSuperListeners.pop()).call(); @@ -1803,41 +1079,11 @@ public void onMultiWindowModeChanged(final boolean isInMultiWindowMode, .call(isInMultiWindowMode, newConfig); } - /** - * This method is called whenever the user chooses to navigate Up within your application's - * activity hierarchy from the action bar. - * - *

If the attribute {@link android.R.attr#parentActivityName parentActivityName} - * was specified in the manifest for this activity or an activity-alias to it, - * default Up navigation will be handled automatically. If any activity - * along the parent chain requires extra Intent arguments, the Activity subclass - * should override the method {@link #onPrepareNavigateUpTaskStack(TaskStackBuilder)} - * to supply those arguments.

- * - *

See Tasks and Back - * Stack - * from the developer guide and Navigation - * from the design guide for more information about navigating within your app.

- * - *

See the {@link TaskStackBuilder} class and the Activity methods - * {@link #getParentActivityIntent()}, {@link #shouldUpRecreateTask(Intent)}, and - * {@link #navigateUpTo(Intent)} for help implementing custom Up navigation. - * The AppNavigation sample application in the Android SDK is also available for reference.

- * - * @return true if Up navigation completed successfully and this Activity was finished, - * false otherwise. - */ public boolean onNavigateUp() { verifyMethodCalledFromDelegate("onNavigateUp()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * 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). - * - * @param child The activity making the call. - */ public boolean onNavigateUpFromChild(final Activity child) { verifyMethodCalledFromDelegate("onNavigateUpFromChild(Activity)"); return ((CallFun1) mSuperListeners.pop()).call(child); @@ -1848,34 +1094,11 @@ public void onNewIntent(final Intent intent) { ((CallVoid1) mSuperListeners.pop()).call(intent); } - /** - * This hook is called whenever an item in your options menu is selected. - * The default implementation simply returns false to have the normal - * processing happen (calling the item's Runnable or sending a message to - * its Handler as appropriate). You can use this method for any items - * for which you would like to do processing without those other - * facilities. - * - *

Derived classes should call through to the base class for it to - * perform the default menu handling.

- * - * @param item The menu item that was selected. - * @return boolean Return false to allow normal menu processing to - * proceed, true to consume it here. - * @see #onCreateOptionsMenu - */ public boolean onOptionsItemSelected(final MenuItem item) { verifyMethodCalledFromDelegate("onOptionsItemSelected(MenuItem)"); return ((CallFun1) mSuperListeners.pop()).call(item); } - /** - * This hook is called whenever the options menu is being closed (either by the user canceling - * the menu with the back/menu button, or when an item is selected). - * - * @param menu The options menu as last shown or first initialized by - * onCreateOptionsMenu(). - */ public void onOptionsMenuClosed(final Menu menu) { verifyMethodCalledFromDelegate("onOptionsMenuClosed(Menu)"); ((CallVoid1) mSuperListeners.pop()).call(menu); @@ -1903,16 +1126,6 @@ public void onPictureInPictureModeChanged(final boolean isInPictureInPictureMode .call(isInPictureInPictureMode, newConfig); } - /** - * This is the same as {@link #onPostCreate(Bundle)} but is called for activities - * created with the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. - * - * @param savedInstanceState The data most recently supplied in {@link #onSaveInstanceState} - * @param persistentState The data caming from the PersistableBundle first - * saved in {@link #onSaveInstanceState(Bundle, PersistableBundle)}. - * @see #onCreate - */ public void onPostCreate(@Nullable final Bundle savedInstanceState, @Nullable final PersistableBundle persistentState) { verifyMethodCalledFromDelegate("onPostCreate(Bundle, PersistableBundle)"); @@ -1931,8 +1144,7 @@ public void onPostResume() { } /** - * @deprecated Old no-arguments version of - * {@link #onPrepareDialog(int, Dialog, Bundle)}. + * @deprecated */ public void onPrepareDialog(final int id, final Dialog dialog) { verifyMethodCalledFromDelegate("onPrepareDialog(Integer, Dialog)"); @@ -1940,68 +1152,19 @@ public void onPrepareDialog(final int id, final Dialog dialog) { } /** - * Provides an opportunity to prepare a managed dialog before it is being - * shown. The default implementation calls through to - * {@link #onPrepareDialog(int, Dialog)} for compatibility. - * - *

- * Override this if you need to update a managed dialog based on the state - * of the application each time it is shown. For example, a time picker - * dialog might want to be updated with the current time. You should call - * through to the superclass's implementation. The default implementation - * will set this Activity as the owner activity on the Dialog. - * - * @param id The id of the managed dialog. - * @param dialog The dialog. - * @param args The dialog arguments provided to {@link #showDialog(int, Bundle)}. - * @see #onCreateDialog(int, Bundle) - * @see #showDialog(int) - * @see #dismissDialog(int) - * @see #removeDialog(int) - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ public void onPrepareDialog(final int id, final Dialog dialog, final Bundle args) { verifyMethodCalledFromDelegate("onPrepareDialog(Integer, Dialog, Bundle)"); ((CallVoid3) mSuperListeners.pop()).call(id, dialog, args); } - /** - * Prepare the synthetic task stack that will be generated during Up navigation - * from a different task. - * - *

This method receives the {@link android.app.TaskStackBuilder} with the constructed series - * of - * Intents as generated by {@link #onCreateNavigateUpTaskStack(android.app.TaskStackBuilder)}. - * If any extra data should be added to these intents before launching the new task, - * the application should override this method and add that data here.

- * - * @param builder A TaskStackBuilder that has been populated with Intents by - * onCreateNavigateUpTaskStack. - */ public void onPrepareNavigateUpTaskStack(final android.app.TaskStackBuilder builder) { verifyMethodCalledFromDelegate( "onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder)"); ((CallVoid1) mSuperListeners.pop()).call(builder); } - /** - * Prepare the Screen's standard options menu to be displayed. This is - * called right before the menu is shown, every time it is shown. You can - * use this method to efficiently enable/disable items or otherwise - * dynamically modify the contents. - * - *

The default implementation updates the system menu items based on the - * activity's state. Deriving classes should always call through to the - * base class implementation. - * - * @param menu The options menu as last shown or first initialized by - * onCreateOptionsMenu(). - * @return You must return true for the menu to be displayed; - * if you return false it will not be shown. - * @see #onCreateOptionsMenu - */ public boolean onPrepareOptionsMenu(final Menu menu) { verifyMethodCalledFromDelegate("onPrepareOptionsMenu(Menu)"); return ((CallFun1) mSuperListeners.pop()).call(menu); @@ -2023,41 +1186,11 @@ public void onPrepareSupportNavigateUpTaskStack(@NonNull final TaskStackBuilder ((CallVoid1) mSuperListeners.pop()).call(builder); } - /** - * This is called when the user is requesting an assist, to provide references - * to content related to the current activity. Before being called, the - * {@code outContent} Intent is filled with the base Intent of the activity (the Intent - * returned by {@link #getIntent()}). The Intent's extras are stripped of any types - * that are not valid for {@link PersistableBundle} or non-framework Parcelables, and - * the flags {@link Intent#FLAG_GRANT_WRITE_URI_PERMISSION} and - * {@link Intent#FLAG_GRANT_PERSISTABLE_URI_PERMISSION} are cleared from the Intent. - * - *

Custom implementation may adjust the content intent to better reflect the top-level - * context of the activity, and fill in its ClipData with additional content of - * interest that the user is currently viewing. For example, an image gallery application - * that has launched in to an activity allowing the user to swipe through pictures should - * modify the intent to reference the current image they are looking it; such an - * application when showing a list of pictures should add a ClipData that has - * references to all of the pictures currently visible on screen.

- * - * @param outContent The assist content to return. - */ public void onProvideAssistContent(final AssistContent outContent) { verifyMethodCalledFromDelegate("onProvideAssistContent(AssistContent)"); ((CallVoid1) mSuperListeners.pop()).call(outContent); } - /** - * This is called when the user is requesting an assist, to build a full - * {@link Intent#ACTION_ASSIST} Intent with all of the context of the current - * application. You can override this method to place into the bundle anything - * you would like to appear in the {@link Intent#EXTRA_ASSIST_CONTEXT} part - * of the assist Intent. - * - *

This function will be called after any global assist callbacks that had - * been registered with {@link Application#registerOnProvideAssistDataListener - * Application.registerOnProvideAssistDataListener}. - */ public void onProvideAssistData(final Bundle data) { verifyMethodCalledFromDelegate("onProvideAssistData(Bundle)"); ((CallVoid1) mSuperListeners.pop()).call(data); @@ -2071,12 +1204,6 @@ public void onProvideKeyboardShortcuts(final List data, f .call(data, menu, deviceId); } - /** - * Override to generate the desired referrer for the content currently being shown - * by the app. The default implementation returns null, meaning the referrer will simply - * be the android-app: of the package name of this activity. Return a non-null Uri to - * have that supplied as the {@link Intent#EXTRA_REFERRER} of any activities started from it. - */ public Uri onProvideReferrer() { verifyMethodCalledFromDelegate("onProvideReferrer()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -2089,51 +1216,11 @@ public void onRequestPermissionsResult(final int requestCode, .call(requestCode, permissions, grantResults); } - /** - * Called after {@link #onStop} when the current activity is being - * re-displayed to the user (the user has navigated back to it). It will - * be followed by {@link #onStart} and then {@link #onResume}. - * - *

For activities that are using raw {@link Cursor} objects (instead of - * creating them through - * {@link #managedQuery(Uri, String[], String, String[], String)}, - * this is usually the place - * where the cursor should be requeried (because you had deactivated it in - * {@link #onStop}. - * - *

Derived classes must call through to the super class's - * implementation of this method. If they do not, an exception will be - * thrown.

- * - * @see #onStop - * @see #onStart - * @see #onResume - */ public void onRestart() { verifyMethodCalledFromDelegate("onRestart()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * This is the same as {@link #onRestoreInstanceState(Bundle)} but is called for activities - * created with the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. The {@link PersistableBundle} passed - * came from the restored PersistableBundle first - * saved in {@link #onSaveInstanceState(Bundle, PersistableBundle)}. - * - *

This method is called between {@link #onStart} and - * {@link #onPostCreate}. - * - *

If this method is called {@link #onRestoreInstanceState(Bundle)} will not be called. - * - * @param savedInstanceState the data most recently supplied in {@link #onSaveInstanceState}. - * @param persistentState the data most recently supplied in {@link #onSaveInstanceState}. - * @see #onRestoreInstanceState(Bundle) - * @see #onCreate - * @see #onPostCreate - * @see #onResume - * @see #onSaveInstanceState - */ public void onRestoreInstanceState(final Bundle savedInstanceState, final PersistableBundle persistentState) { verifyMethodCalledFromDelegate("onRestoreInstanceState(Bundle, PersistableBundle)"); @@ -2141,25 +1228,6 @@ public void onRestoreInstanceState(final Bundle savedInstanceState, .call(savedInstanceState, persistentState); } - /** - * This method is called after {@link #onStart} when the activity is - * being re-initialized from a previously saved state, given here in - * savedInstanceState. Most implementations will simply use {@link #onCreate} - * to restore their state, but it is sometimes convenient to do it here - * after all of the initialization has been done or to allow subclasses to - * decide whether to use your default implementation. The default - * implementation of this method performs a restore of any view state that - * had previously been frozen by {@link #onSaveInstanceState}. - * - *

This method is called between {@link #onStart} and - * {@link #onPostCreate}. - * - * @param savedInstanceState the data most recently supplied in {@link #onSaveInstanceState}. - * @see #onCreate - * @see #onPostCreate - * @see #onResume - * @see #onSaveInstanceState - */ public void onRestoreInstanceState(final Bundle savedInstanceState) { verifyMethodCalledFromDelegate("onRestoreInstanceState(Bundle)"); ((CallVoid1) mSuperListeners.pop()).call(savedInstanceState); @@ -2179,20 +1247,6 @@ public CompositeNonConfigurationInstance onRetainNonConfigurationInstance() { return null; } - /** - * This is the same as {@link #onSaveInstanceState} but is called for activities - * created with the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. The {@link PersistableBundle} passed - * in will be saved and presented in {@link #onCreate(Bundle, PersistableBundle)} - * the first time that this activity is restarted following the next device reboot. - * - * @param outState Bundle in which to place your saved state. - * @param outPersistentState State which will be saved across reboots. - * @see #onSaveInstanceState(Bundle) - * @see #onCreate - * @see #onRestoreInstanceState(Bundle, PersistableBundle) - * @see #onPause - */ public void onSaveInstanceState(final Bundle outState, final PersistableBundle outPersistentState) { verifyMethodCalledFromDelegate("onSaveInstanceState(Bundle, PersistableBundle)"); @@ -2205,36 +1259,11 @@ public void onSaveInstanceState(final Bundle outState) { ((CallVoid1) mSuperListeners.pop()).call(outState); } - /** - * This hook is called when the user signals the desire to start a search. - * - *

You can use this function as a simple way to launch the search UI, in response to a - * menu item, search button, or other widgets within your activity. Unless overidden, - * calling this function is the same as calling - * {@link #startSearch startSearch(null, false, null, false)}, which launches - * search for the current activity as specified in its manifest, see {@link SearchManager}. - * - *

You can override this function to force global search, e.g. in response to a dedicated - * search key, or to block search entirely (by simply returning false). - * - *

Note: when running in a {@link Configuration#UI_MODE_TYPE_TELEVISION}, the default - * implementation changes to simply return false and you must supply your own custom - * implementation if you want to support search.

- * - * @param searchEvent The {@link SearchEvent} that signaled this search. - * @return Returns {@code true} if search launched, and {@code false} if the activity does - * not respond to search. The default implementation always returns {@code true}, except - * when in {@link Configuration#UI_MODE_TYPE_TELEVISION} mode where it returns false. - * @see SearchManager - */ public boolean onSearchRequested(@Nullable final SearchEvent searchEvent) { verifyMethodCalledFromDelegate("onSearchRequested(SearchEvent)"); return ((CallFun1) mSuperListeners.pop()).call(searchEvent); } - /** - * @see #onSearchRequested(SearchEvent) - */ public boolean onSearchRequested() { verifyMethodCalledFromDelegate("onSearchRequested()"); return ((CallFun0) mSuperListeners.pop()).call(); @@ -2283,33 +1312,11 @@ public void onTitleChanged(final CharSequence title, final int color) { ((CallVoid2) mSuperListeners.pop()).call(title, color); } - /** - * 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. - * - * @param event The touch screen event being processed. - * @return Return true if you have consumed the event, false if you haven't. - * The default implementation always returns false. - */ public boolean onTouchEvent(final MotionEvent event) { verifyMethodCalledFromDelegate("onTouchEvent(MotionEvent)"); return ((CallFun1) mSuperListeners.pop()).call(event); } - /** - * Called when the trackball was moved and not handled by any of the - * views inside of the activity. So, for example, if the trackball moves - * while focus is on a button, you will receive a call here because - * buttons do not normally do anything with trackball events. 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. - * - * @param event The trackball event being processed. - * @return Return true if you have consumed the event, false if you haven't. - * The default implementation always returns false. - */ public boolean onTrackballEvent(final MotionEvent event) { verifyMethodCalledFromDelegate("onTrackballEvent(MotionEvent)"); return ((CallFun1) mSuperListeners.pop()).call(event); @@ -2320,62 +1327,18 @@ public void onTrimMemory(final int level) { ((CallVoid1) mSuperListeners.pop()).call(level); } - /** - * Called whenever a key, touch, or trackball event is dispatched to the - * activity. Implement this method if you wish to know that the user has - * interacted with the device in some way while your activity is running. - * This callback and {@link #onUserLeaveHint} are intended to help - * activities manage status bar notifications intelligently; specifically, - * for helping activities determine the proper time to cancel a notfication. - * - *

All calls to your activity's {@link #onUserLeaveHint} callback will - * be accompanied by calls to {@link #onUserInteraction}. This - * ensures that your activity will be told of relevant user activity such - * as pulling down the notification pane and touching an item there. - * - *

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. - * - * @see #onUserLeaveHint() - */ public void onUserInteraction() { verifyMethodCalledFromDelegate("onUserInteraction()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * 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, {@link #onUserLeaveHint} will be called, but - * when an incoming phone call causes the in-call Activity to be automatically - * brought to the foreground, {@link #onUserLeaveHint} will not be called on - * the activity being interrupted. In cases when it is invoked, this method - * is called right before the activity's {@link #onPause} callback. - * - *

This callback and {@link #onUserInteraction} are intended to help - * activities manage status bar notifications intelligently; specifically, - * for helping activities determine the proper time to cancel a notfication. - * - * @see #onUserInteraction() - */ public void onUserLeaveHint() { verifyMethodCalledFromDelegate("onUserLeaveHint()"); ((CallVoid0) mSuperListeners.pop()).call(); } /** - * Called when a translucent activity over this activity is becoming opaque or another - * activity is being launched. Activities that override this method must call - * super.onVisibleBehindCanceled() or a SuperNotCalledException will be thrown. - * - *

When this method is called the activity has 500 msec to release any resources it may be - * using while visible in the background. - * If the activity has not returned from this method in 500 msec the system will destroy - * the activity and kill the process in order to recover the resources for another - * process. Otherwise {@link #onStop()} will be called following return. - * - * @see #requestVisibleBehind(boolean) + * @deprecated */ public void onVisibleBehindCanceled() { verifyMethodCalledFromDelegate("onVisibleBehindCanceled()"); @@ -2387,48 +1350,11 @@ public void onWindowAttributesChanged(final WindowManager.LayoutParams params) { ((CallVoid1) mSuperListeners.pop()).call(params); } - /** - * Called when the current {@link Window} of the activity gains or loses - * focus. This is the best indicator of whether this activity is visible - * to the user. The default implementation clears the key tracking - * state, so should always be called. - * - *

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 (an - * activity that is stopped will not generally get window focus), you - * should not rely on any particular order between the callbacks here and - * those in the other lifecycle methods such as {@link #onResume}. - * - *

As a general rule, however, a resumed activity will have window - * focus... unless it has displayed other dialogs or popups that take - * input focus, in which case the activity itself will not have focus - * when the other windows have it. Likewise, the system may display - * system-level windows (such as the status bar notification panel or - * a system alert) which will temporarily take window input focus without - * pausing the foreground activity. - * - * @param hasFocus Whether the window of this activity has focus. - * @see #hasWindowFocus() - * @see #onResume - * @see View#onWindowFocusChanged(boolean) - */ public void onWindowFocusChanged(final boolean hasFocus) { verifyMethodCalledFromDelegate("onWindowFocusChanged(Boolean)"); ((CallVoid1) mSuperListeners.pop()).call(hasFocus); } - /** - * Give the Activity a chance to control the UI for an action mode requested - * by the system. - * - *

Note: If you are looking for a notification callback that an action mode - * has been started for this activity, see {@link #onActionModeStarted(android.view.ActionMode)}.

- * - * @param callback The callback that should control the new action mode - * @return The new action mode, or null if the activity does not want to - * provide special handling for this action mode. (It will be handled by the system.) - */ public android.view.ActionMode onWindowStartingActionMode( final android.view.ActionMode.Callback callback) { verifyMethodCalledFromDelegate( @@ -2437,9 +1363,6 @@ public android.view.ActionMode onWindowStartingActionMode( .pop()).call(callback); } - /** - * {@inheritDoc} - */ public android.view.ActionMode onWindowStartingActionMode( final android.view.ActionMode.Callback callback, final int type) { verifyMethodCalledFromDelegate( @@ -2454,13 +1377,6 @@ public ActionMode onWindowStartingSupportActionMode( return ((CallFun1) mSuperListeners.pop()).call(callback); } - /** - * Programmatically opens the context menu for a particular {@code view}. - * The {@code view} should have been added via - * {@link #registerForContextMenu(View)}. - * - * @param view The view to show the context menu for. - */ public void openContextMenu(final View view) { verifyMethodCalledFromDelegate("openContextMenu(View)"); ((CallVoid1) mSuperListeners.pop()).call(view); @@ -2499,46 +1415,19 @@ public SQLiteDatabase openOrCreateDatabase(final String name, final int mode, .pop()).call(name, mode, factory, errorHandler); } - /** - * Call immediately after one of the flavors of {@link #startActivity(Intent)} - * or {@link #finish} to specify an explicit transition animation to - * perform next. - * - *

As of {@link Build.VERSION_CODES#JELLY_BEAN} an alternative - * to using this with starting activities is to supply the desired animation - * information through a {@link ActivityOptions} bundle to - * {@link #startActivity(Intent, Bundle)} or a related function. This allows - * you to specify a custom animation even when starting an activity from - * outside the context of the current top activity. - * - * @param enterAnim A resource ID of the animation resource to use for - * the incoming activity. Use 0 for no animation. - * @param exitAnim A resource ID of the animation resource to use for - */ public void overridePendingTransition(final int enterAnim, final int exitAnim) { verifyMethodCalledFromDelegate("overridePendingTransition(Integer, Integer)"); ((CallVoid2) mSuperListeners.pop()).call(enterAnim, exitAnim); } + /** + * @deprecated + */ public Drawable peekWallpaper() { verifyMethodCalledFromDelegate("peekWallpaper()"); return ((CallFun0) mSuperListeners.pop()).call(); } - /** - * Postpone the entering activity transition when Activity was started with - * {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * Pair[])}. - *

This method gives the Activity the ability to delay starting the entering and - * shared element transitions until all data is loaded. Until then, the Activity won't - * draw into its window, leaving the window transparent. This may also cause the - * returning animation to be delayed until data is ready. This method should be - * called in {@link #onCreate(Bundle)} or in - * {@link #onActivityReenter(int, Intent)}. - * {@link #startPostponedEnterTransition()} must be called to allow the Activity to - * start the transitions. If the Activity did not use - * {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * Pair[])}, then this method - * does nothing.

- */ public void postponeEnterTransition() { verifyMethodCalledFromDelegate("postponeEnterTransition()"); ((CallVoid0) mSuperListeners.pop()).call(); @@ -2549,42 +1438,16 @@ public void putExtraData(final SupportActivity.ExtraData extraData) { ((CallVoid1) mSuperListeners.pop()).call(extraData); } - /** - * Cause this Activity to be recreated with a new instance. This results - * in essentially the same flow as when the Activity is created due to - * a configuration change -- the current instance will go through its - * lifecycle to {@link #onDestroy} and a new instance then created after it. - */ public void recreate() { verifyMethodCalledFromDelegate("recreate()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Add a new {@link ComponentCallbacks} to the base application of the - * Context, which will be called at the same times as the ComponentCallbacks - * methods of activities and other components are called. Note that you - * must be sure to use {@link #unregisterComponentCallbacks} when - * appropriate in the future; this will not be removed for you. - * - * @param callback The interface to call. This can be either a - * {@link ComponentCallbacks} or {@link ComponentCallbacks2} interface. - */ public void registerComponentCallbacks(final ComponentCallbacks callback) { verifyMethodCalledFromDelegate("registerComponentCallbacks(ComponentCallbacks)"); ((CallVoid1) mSuperListeners.pop()).call(callback); } - /** - * Registers a context menu to be shown for the given view (multiple views - * can show the context menu). This method will set the - * {@link OnCreateContextMenuListener} on the view to this activity, so - * {@link #onCreateContextMenu(ContextMenu, View, ContextMenuInfo)} will be - * called when it is time to show the context menu. - * - * @param view The view that should show a context menu. - * @see #unregisterForContextMenu(View) - */ public void registerForContextMenu(final View view) { verifyMethodCalledFromDelegate("registerForContextMenu(View)"); ((CallVoid1) mSuperListeners.pop()).call(view); @@ -2620,94 +1483,39 @@ public Intent registerReceiver(final BroadcastReceiver receiver, final IntentFil .pop()).call(receiver, filter, broadcastPermission, scheduler, flags); } - /** - * Ask that the local app instance of this activity be released to free up its memory. - * This is asking for the activity to be destroyed, but does not finish the activity -- - * a new instance of the activity will later be re-created if needed due to the user - * navigating back to it. - * - * @return Returns true if the activity was in a state that it has started the process - * of destroying its current instance; returns false if for any reason this could not - * be done: it is currently visible to the user, it is already being destroyed, it is - * being finished, it hasn't yet saved its state, etc. - */ public boolean releaseInstance() { verifyMethodCalledFromDelegate("releaseInstance()"); return ((CallFun0) mSuperListeners.pop()).call(); } + /** + * @deprecated + */ public void removeStickyBroadcast(final Intent intent) { verifyMethodCalledFromDelegate("removeStickyBroadcast(Intent)"); ((CallVoid1) mSuperListeners.pop()).call(intent); } + /** + * @deprecated + */ public void removeStickyBroadcastAsUser(final Intent intent, final UserHandle user) { verifyMethodCalledFromDelegate("removeStickyBroadcastAsUser(Intent, UserHandle)"); ((CallVoid2) mSuperListeners.pop()).call(intent, user); } - /** - * Report to the system that your app is now fully drawn, purely for diagnostic - * purposes (calling it does not impact the visible behavior of the activity). - * This is only used to help instrument application launch times, so that the - * app can report when it is fully in a usable state; without this, the only thing - * the system itself can determine is the point at which the activity's window - * is first drawn and displayed. To participate in app launch time - * measurement, you should always call this method after first launch (when - * {@link #onCreate(Bundle)} is called), at the point where you have - * entirely drawn your UI and populated with all of the significant data. You - * can safely call this method any time after first launch as well, in which case - * it will simply be ignored. - */ public void reportFullyDrawn() { verifyMethodCalledFromDelegate("reportFullyDrawn()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Create {@link DragAndDropPermissions} object bound to this activity and controlling the - * access permissions for content URIs associated with the {@link DragEvent}. - * - * @param event Drag event - * @return The {@link DragAndDropPermissions} object used to control access to the content URIs. - * Null if no content URIs are associated with the event or if permissions could not be - * granted. - */ public DragAndDropPermissions requestDragAndDropPermissions(final DragEvent event) { verifyMethodCalledFromDelegate("requestDragAndDropPermissions(DragEvent)"); return ((CallFun1) mSuperListeners.pop()).call(event); } /** - * Activities that want to remain visible behind a translucent activity above them must call - * this method anytime between the start of {@link #onResume()} and the return from - * {@link #onPause()}. If this call is successful then the activity will remain visible after - * {@link #onPause()} is called, and is allowed to continue playing media in the background. - * - *

The actions of this call are reset each time that this activity is brought to the - * front. That is, every time {@link #onResume()} is called the activity will be assumed - * to not have requested visible behind. Therefore, if you want this activity to continue to - * be visible in the background you must call this method again. - * - *

Only fullscreen opaque activities may make this call. I.e. this call is a nop - * for dialog and translucent activities. - * - *

Under all circumstances, the activity must stop playing and release resources prior to or - * within a call to {@link #onVisibleBehindCanceled()} or if this call returns false. - * - *

False will be returned any time this method is called between the return of onPause and - * the next call to onResume. - * - * @param visible true to notify the system that the activity wishes to be visible behind other - * translucent activities, false to indicate otherwise. Resources must be - * released when passing false to this method. - * @return the resulting visibiity state. If true the activity will remain visible beyond - * {@link #onPause()} if the next activity is translucent or not fullscreen. If false - * then the activity may not count on being visible behind other translucent activities, - * and must stop any media playback and release resources. - * Returning false may occur in lieu of a call to {@link #onVisibleBehindCanceled()} so - * the return value must be checked. - * @see #onVisibleBehindCanceled() + * @deprecated */ public boolean requestVisibleBehind(final boolean visible) { verifyMethodCalledFromDelegate("requestVisibleBehind(Boolean)"); @@ -2775,16 +1583,25 @@ public void sendOrderedBroadcastAsUser(final Intent intent, final UserHandle use initialData, initialExtras); } + /** + * @deprecated + */ public void sendStickyBroadcast(final Intent intent) { verifyMethodCalledFromDelegate("sendStickyBroadcast(Intent)"); ((CallVoid1) mSuperListeners.pop()).call(intent); } + /** + * @deprecated + */ public void sendStickyBroadcastAsUser(final Intent intent, final UserHandle user) { verifyMethodCalledFromDelegate("sendStickyBroadcastAsUser(Intent, UserHandle)"); ((CallVoid2) mSuperListeners.pop()).call(intent, user); } + /** + * @deprecated + */ public void sendStickyOrderedBroadcast(final Intent intent, final BroadcastReceiver resultReceiver, final Handler scheduler, final int initialCode, final String initialData, final Bundle initialExtras) { @@ -2795,6 +1612,9 @@ public void sendStickyOrderedBroadcast(final Intent intent, .call(intent, resultReceiver, scheduler, initialCode, initialData, initialExtras); } + /** + * @deprecated + */ public void sendStickyOrderedBroadcastAsUser(final Intent intent, final UserHandle user, final BroadcastReceiver resultReceiver, final Handler scheduler, final int initialCode, final String initialData, final Bundle initialExtras) { @@ -2805,32 +1625,11 @@ public void sendStickyOrderedBroadcastAsUser(final Intent intent, final UserHand initialExtras); } - /** - * Set a {@link android.widget.Toolbar Toolbar} to act as the {@link ActionBar} for this - * Activity window. - * - *

When set to a non-null value the {@link #getActionBar()} method will return - * an {@link ActionBar} object that can be used to control the given toolbar as if it were - * a traditional window decor action bar. The toolbar's menu will be populated with the - * Activity's options menu and the navigation button will be wired through the standard - * {@link android.R.id#home home} menu select action.

- * - *

In order to use a Toolbar within the Activity's window content the application - * must not request the window feature {@link Window#FEATURE_ACTION_BAR FEATURE_ACTION_BAR}.

- * - * @param toolbar Toolbar to set as the Activity's action bar, or {@code null} to clear it - */ public void setActionBar(@Nullable final android.widget.Toolbar toolbar) { verifyMethodCalledFromDelegate("setActionBar(android.widget.Toolbar)"); ((CallVoid1) mSuperListeners.pop()).call(toolbar); } - /** - * Set the {@link TransitionManager} to use for default transitions in this window. - * Requires {@link Window#FEATURE_CONTENT_TRANSITIONS}. - * - * @param tm The TransitionManager to use for scene changes. - */ public void setContentTransitionManager(final TransitionManager tm) { verifyMethodCalledFromDelegate("setContentTransitionManager(TransitionManager)"); ((CallVoid1) mSuperListeners.pop()).call(tm); @@ -2856,14 +1655,6 @@ public void setEnterSharedElementCallback(final SharedElementCallback callback) ((CallVoid1) mSuperListeners.pop()).call(callback); } - /** - * When {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * View, String)} was used - * to start an Activity, callback - * will be called to handle shared elements on the launched Activity. This requires - * {@link Window#FEATURE_ACTIVITY_TRANSITIONS}. - * - * @param callback Used to manipulate shared element transitions on the launched Activity. - */ public void setEnterSharedElementCallback(final android.app.SharedElementCallback callback) { verifyMethodCalledFromDelegate( "setEnterSharedElementCallback(android.app.SharedElementCallback)"); @@ -2875,58 +1666,22 @@ public void setExitSharedElementCallback(final SharedElementCallback listener) { ((CallVoid1) mSuperListeners.pop()).call(listener); } - /** - * When {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * View, String)} was used - * to start an Activity, callback - * will be called to handle shared elements on the launching Activity. Most - * calls will only come when returning from the started Activity. - * This requires {@link Window#FEATURE_ACTIVITY_TRANSITIONS}. - * - * @param callback Used to manipulate shared element transitions on the launching Activity. - */ public void setExitSharedElementCallback(final android.app.SharedElementCallback callback) { verifyMethodCalledFromDelegate( "setExitSharedElementCallback(android.app.SharedElementCallback)"); ((CallVoid1) mSuperListeners.pop()).call(callback); } - /** - * Sets whether this activity is finished when touched outside its window's - * bounds. - */ public void setFinishOnTouchOutside(final boolean finish) { verifyMethodCalledFromDelegate("setFinishOnTouchOutside(Boolean)"); ((CallVoid1) mSuperListeners.pop()).call(finish); } - /** - * Adjust the current immersive mode setting. - * - * Note that changing this value will have no effect on the activity's - * {@link ActivityInfo} structure; that is, if - * android:immersive is set to true - * in the application's manifest entry for this activity, the {@link - * ActivityInfo#flags ActivityInfo.flags} member will - * always have its {@link ActivityInfo#FLAG_IMMERSIVE - * FLAG_IMMERSIVE} bit set. - * - * @see #isImmersive() - * @see ActivityInfo#FLAG_IMMERSIVE - */ public void setImmersive(final boolean i) { verifyMethodCalledFromDelegate("setImmersive(Boolean)"); ((CallVoid1) mSuperListeners.pop()).call(i); } - /** - * Change the intent returned by {@link #getIntent}. This holds a - * reference to the given intent; it does not copy it. Often used in - * conjunction with {@link #onNewIntent}. - * - * @param newIntent The new Intent object to return from getIntent - * @see #getIntent - * @see #onNewIntent - */ public void setIntent(final Intent newIntent) { verifyMethodCalledFromDelegate("setIntent(Intent)"); ((CallVoid1) mSuperListeners.pop()).call(newIntent); @@ -2937,21 +1692,16 @@ public void setPictureInPictureParams(final PictureInPictureParams params) { ((CallVoid1) mSuperListeners.pop()).call(params); } - /** - * Change the desired orientation of this activity. If the activity - * is currently in the foreground or otherwise impacting the screen - * orientation, the screen will immediately be changed (possibly causing - * the activity to be restarted). Otherwise, this will be used the next - * time the activity is visible. - * - * @param requestedOrientation An orientation constant as used in - * {@link ActivityInfo#screenOrientation ActivityInfo.screenOrientation}. - */ public void setRequestedOrientation(final int requestedOrientation) { verifyMethodCalledFromDelegate("setRequestedOrientation(Integer)"); ((CallVoid1) mSuperListeners.pop()).call(requestedOrientation); } + public void setShowWhenLocked(final boolean showWhenLocked) { + verifyMethodCalledFromDelegate("setShowWhenLocked(Boolean)"); + ((CallVoid1) mSuperListeners.pop()).call(showWhenLocked); + } + public void setSupportActionBar(@Nullable final Toolbar toolbar) { verifyMethodCalledFromDelegate("setSupportActionBar(Toolbar)"); ((CallVoid1) mSuperListeners.pop()).call(toolbar); @@ -2989,18 +1739,6 @@ public void setSupportProgressBarVisibility(final boolean visible) { ((CallVoid1) mSuperListeners.pop()).call(visible); } - /** - * Sets information describing the task with this activity for presentation inside the Recents - * System UI. When {@link ActivityManager#getRecentTasks} is called, the activities of each task - * are traversed in order from the topmost activity to the bottommost. The traversal continues - * for each property until a suitable value is found. For each task the taskDescription will be - * returned in {@link ActivityManager.TaskDescription}. - * - * @param taskDescription The TaskDescription properties that describe the task with this - * activity - * @see ActivityManager#getRecentTasks - * @see ActivityManager.TaskDescription - */ public void setTaskDescription(final ActivityManager.TaskDescription taskDescription) { verifyMethodCalledFromDelegate("setTaskDescription(ActivityManager.TaskDescription)"); ((CallVoid1) mSuperListeners.pop()).call(taskDescription); @@ -3011,112 +1749,34 @@ public void setTheme(@StyleRes final int resid) { ((CallVoid1) mSuperListeners.pop()).call(resid); } - /** - * Change the title associated with this activity. If this is a - * top-level activity, the title for its window will change. If it - * is an embedded activity, the parent can do whatever it wants - * with it. - */ public void setTitle(final CharSequence title) { verifyMethodCalledFromDelegate("setTitle(CharSequence)"); ((CallVoid1) mSuperListeners.pop()).call(title); } - /** - * Change the title associated with this activity. If this is a - * top-level activity, the title for its window will change. If it - * is an embedded activity, the parent can do whatever it wants - * with it. - */ public void setTitle(final int titleId) { verifyMethodCalledFromDelegate("setTitle(Integer)"); ((CallVoid1) mSuperListeners.pop()).call(titleId); } /** - * Change the color of the title associated with this activity. - *

- * This method is deprecated starting in API Level 11 and replaced by action - * bar styles. For information on styling the Action Bar, read the Action Bar developer - * guide. - * - * @deprecated Use action bar styles instead. + * @deprecated */ public void setTitleColor(final int textColor) { verifyMethodCalledFromDelegate("setTitleColor(Integer)"); ((CallVoid1) mSuperListeners.pop()).call(textColor); } - /** - * Control whether this activity's main window is visible. This is intended - * only for the special case of an activity that is not going to show a - * UI itself, but can't just finish prior to onResume() because it needs - * to wait for a service binding or such. Setting this to false allows - * you to prevent your UI from being shown during that time. - * - *

The default value for this is taken from the - * {@link android.R.attr#windowNoDisplay} attribute of the activity's theme. - */ + public void setTurnScreenOn(final boolean turnScreenOn) { + verifyMethodCalledFromDelegate("setTurnScreenOn(Boolean)"); + ((CallVoid1) mSuperListeners.pop()).call(turnScreenOn); + } + public void setVisible(final boolean visible) { verifyMethodCalledFromDelegate("setVisible(Boolean)"); ((CallVoid1) mSuperListeners.pop()).call(visible); } - /** - * Enable or disable virtual reality (VR) mode for this Activity. - * - *

VR mode is a hint to Android system to switch to a mode optimized for VR applications - * while this Activity has user focus.

- * - *

It is recommended that applications additionally declare - * {@link android.R.attr#enableVrMode} in their manifest to allow for smooth activity - * transitions when switching between VR activities.

- * - *

If the requested {@link VrListenerService} component is not available, - * VR mode will not be started. Developers can handle this case as follows:

- * - *
-     * String servicePackage = "com.whatever.app";
-     * String serviceClass = "com.whatever.app.MyVrListenerService";
-     *
-     * // Name of the component of the VrListenerService to start.
-     * ComponentName serviceComponent = new ComponentName(servicePackage, serviceClass);
-     *
-     * try {
-     *    setVrModeEnabled(true, myComponentName);
-     * } catch (PackageManager.NameNotFoundException e) {
-     *        List<ApplicationInfo> installed = getPackageManager().getInstalledApplications(0);
-     *        boolean isInstalled = false;
-     *        for (ApplicationInfo app : installed) {
-     *            if (app.packageName.equals(servicePackage)) {
-     *                isInstalled = true;
-     *                break;
-     *            }
-     *        }
-     *        if (isInstalled) {
-     *            // Package is installed, but not enabled in Settings.  Let user enable it.
-     *            startActivity(new Intent(Settings.ACTION_VR_LISTENER_SETTINGS));
-     *        } else {
-     *            // Package is not installed.  Send an intent to download this.
-     *            sentIntentToLaunchAppStore(servicePackage);
-     *        }
-     * }
-     * 
- * - * @param enabled {@code true} to enable this mode. - * @param requestedComponent the name of the component to use as a - * {@link VrListenerService} while VR mode is enabled. - * @throws PackageManager.NameNotFoundException if the given component - * to run as a {@link VrListenerService} is not - * installed, or has - * not been enabled in user settings. - * @see PackageManager#FEATURE_VR_MODE - * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE - * @see VrListenerService - * @see Settings#ACTION_VR_LISTENER_SETTINGS - * @see android.R.attr#enableVrMode - */ public void setVrModeEnabled(final boolean enabled, @NonNull final ComponentName requestedComponent) throws PackageManager.NameNotFoundException { @@ -3125,91 +1785,42 @@ public void setVrModeEnabled(final boolean enabled, .call(enabled, requestedComponent); } + /** + * @deprecated + */ public void setWallpaper(final Bitmap bitmap) throws IOException { verifyMethodCalledFromDelegate("setWallpaper(Bitmap)"); ((CallVoid1) mSuperListeners.pop()).call(bitmap); } + /** + * @deprecated + */ public void setWallpaper(final InputStream data) throws IOException { verifyMethodCalledFromDelegate("setWallpaper(InputStream)"); ((CallVoid1) mSuperListeners.pop()).call(data); } - /** - * Gets whether you should show UI with rationale for requesting a permission. - * You should do this only if you do not have the permission and the context in - * which the permission is requested does not clearly communicate to the user - * what would be the benefit from granting this permission. - *

- * For example, if you write a camera app, requesting the camera permission - * would be expected by the user and no rationale for why it is requested is - * needed. If however, the app needs location for tagging photos then a non-tech - * savvy user may wonder how location is related to taking photos. In this case - * you may choose to show UI with rationale of requesting this permission. - *

- * - * @param permission A permission your app wants to request. - * @return Whether you can show permission rationale UI. - * @see #checkSelfPermission(String) - * @see #requestPermissions(String[], int) - * @see #onRequestPermissionsResult(int, String[], int[]) - */ public boolean shouldShowRequestPermissionRationale(@NonNull final String permission) { verifyMethodCalledFromDelegate("shouldShowRequestPermissionRationale(String)"); return ((CallFun1) mSuperListeners.pop()).call(permission); } - /** - * Returns true if the app should recreate the task when navigating 'up' from this activity - * by using targetIntent. - * - *

If this method returns false the app can trivially call - * {@link #navigateUpTo(Intent)} using the same parameters to correctly perform - * up navigation. If this method returns false, the app should synthesize a new task stack - * by using {@link TaskStackBuilder} or another similar mechanism to perform up navigation.

- * - * @param targetIntent An intent representing the target destination for up navigation - * @return true if navigating up should recreate a new task stack, false if the same task - * should be used for the destination - */ public boolean shouldUpRecreateTask(final Intent targetIntent) { verifyMethodCalledFromDelegate("shouldUpRecreateTask(Intent)"); return ((CallFun1) mSuperListeners.pop()).call(targetIntent); } - /** - * Ask to have the current assistant shown to the user. This only works if the calling - * activity is the current foreground activity. It is the same as calling - * {@link VoiceInteractionService#showSession - * VoiceInteractionService.showSession} and requesting all of the possible context. - * The receiver will always see - * {@link VoiceInteractionSession#SHOW_SOURCE_APPLICATION} set. - * - * @return Returns true if the assistant was successfully invoked, else false. For example - * false will be returned if the caller is not the current top activity. - */ public boolean showAssist(final Bundle args) { verifyMethodCalledFromDelegate("showAssist(Bundle)"); return ((CallFun1) mSuperListeners.pop()).call(args); } - /** - * Shows the user the system defined message for telling the user how to exit - * lock task mode. The task containing this activity must be in lock task mode at the time - * of this call for the message to be displayed. - */ public void showLockTaskEscapeMessage() { verifyMethodCalledFromDelegate("showLockTaskEscapeMessage()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Start an action mode of the default type {@link android.view.ActionMode#TYPE_PRIMARY}. - * - * @param callback Callback that will manage lifecycle events for this action mode - * @return The ActionMode that was started, or null if it was canceled - * @see android.view.ActionMode - */ public android.view.ActionMode startActionMode( final android.view.ActionMode.Callback callback) { verifyMethodCalledFromDelegate("startActionMode(android.view.ActionMode.Callback)"); @@ -3217,15 +1828,6 @@ public android.view.ActionMode startActionMode( .pop()).call(callback); } - /** - * Start an action mode of the given type. - * - * @param callback Callback that will manage lifecycle events for this action mode - * @param type One of {@link android.view.ActionMode#TYPE_PRIMARY} or {@link - * android.view.ActionMode#TYPE_FLOATING}. - * @return The ActionMode that was started, or null if it was canceled - * @see android.view.ActionMode - */ public android.view.ActionMode startActionMode(final android.view.ActionMode.Callback callback, final int type) { verifyMethodCalledFromDelegate( @@ -3234,75 +1836,21 @@ public android.view.ActionMode startActionMode(final android.view.ActionMode.Cal .pop()).call(callback, type); } - /** - * Same as {@link #startActivities(Intent[], Bundle)} with no options - * specified. - * - * @param intents The intents to start. - * @see #startActivities(Intent[], Bundle) - * @see #startActivityForResult - */ public void startActivities(final Intent[] intents) { verifyMethodCalledFromDelegate("startActivities(Intent[])"); ((CallVoid1) mSuperListeners.pop()).call(intents); } - /** - * Launch a new activity. You will not receive any information about when - * the activity exits. This implementation overrides the base version, - * providing information about - * the activity performing the launch. Because of this additional - * information, the {@link Intent#FLAG_ACTIVITY_NEW_TASK} launch flag is not - * required; if not specified, the new activity will be added to the - * task of the caller. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param intents The intents to start. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see #startActivities(Intent[]) - * @see #startActivityForResult - */ public void startActivities(final Intent[] intents, @Nullable final Bundle options) { verifyMethodCalledFromDelegate("startActivities(Intent[], Bundle)"); ((CallVoid2) mSuperListeners.pop()).call(intents, options); } - /** - * Same as {@link #startActivity(Intent, Bundle)} with no options - * specified. - * - * @param intent The intent to start. - * @see #startActivity(Intent, Bundle) - * @see #startActivityForResult - */ public void startActivity(final Intent intent) { verifyMethodCalledFromDelegate("startActivity(Intent)"); ((CallVoid1) mSuperListeners.pop()).call(intent); } - /** - * Launch a new activity. You will not receive any information about when - * the activity exits. This implementation overrides the base version, - * providing information about - * the activity performing the launch. Because of this additional - * information, the {@link Intent#FLAG_ACTIVITY_NEW_TASK} launch flag is not - * required; if not specified, the new activity will be added to the - * task of the caller. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param intent The intent to start. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see #startActivity(Intent) - * @see #startActivityForResult - */ public void startActivity(final Intent intent, @Nullable final Bundle options) { verifyMethodCalledFromDelegate("startActivity(Intent, Bundle)"); ((CallVoid2) mSuperListeners.pop()).call(intent, options); @@ -3320,16 +1868,6 @@ public void startActivityForResult(final Intent intent, final int requestCode, .call(intent, requestCode, options); } - /** - * Same as calling {@link #startActivityFromChild(Activity, Intent, int, Bundle)} - * with no options. - * - * @param child The activity making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @see #startActivity - * @see #startActivityForResult - */ public void startActivityFromChild(@NonNull final Activity child, @RequiresPermission final Intent intent, final int requestCode) { verifyMethodCalledFromDelegate("startActivityFromChild(Activity, Intent, Integer)"); @@ -3337,22 +1875,6 @@ public void startActivityFromChild(@NonNull final Activity child, .call(child, intent, requestCode); } - /** - * This is called when a child activity of this one calls its - * {@link #startActivity} or {@link #startActivityForResult} method. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param child The activity making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see #startActivity - * @see #startActivityForResult - */ public void startActivityFromChild(@NonNull final Activity child, @RequiresPermission final Intent intent, final int requestCode, @Nullable final Bundle options) { @@ -3376,16 +1898,6 @@ public void startActivityFromFragment(final Fragment fragment, final Intent inte .call(fragment, intent, requestCode, options); } - /** - * Same as calling {@link #startActivityFromFragment(android.app.Fragment, Intent, int, Bundle)} - * with no options. - * - * @param fragment The fragment making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @see android.app.Fragment#startActivity - * @see android.app.Fragment#startActivityForResult - */ public void startActivityFromFragment(@NonNull final android.app.Fragment fragment, @RequiresPermission final Intent intent, final int requestCode) { verifyMethodCalledFromDelegate( @@ -3394,23 +1906,6 @@ public void startActivityFromFragment(@NonNull final android.app.Fragment fragme .call(fragment, intent, requestCode); } - /** - * This is called when a Fragment in this activity calls its - * {@link android.app.Fragment#startActivity} or {@link android.app.Fragment#startActivityForResult} - * method. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param fragment The fragment making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see android.app.Fragment#startActivity - * @see android.app.Fragment#startActivityForResult - */ public void startActivityFromFragment(@NonNull final android.app.Fragment fragment, @RequiresPermission final Intent intent, final int requestCode, @Nullable final Bundle options) { @@ -3420,19 +1915,6 @@ public void startActivityFromFragment(@NonNull final android.app.Fragment fragme .call(fragment, intent, requestCode, options); } - /** - * Same as calling {@link #startActivityIfNeeded(Intent, int, Bundle)} - * with no options. - * - * @param intent The intent to start. - * @param requestCode If >= 0, this code will be returned in - * onActivityResult() when the activity exits, as described in - * {@link #startActivityForResult}. - * @return If a new activity was launched then true is returned; otherwise - * false is returned and you must handle the Intent yourself. - * @see #startActivity - * @see #startActivityForResult - */ public boolean startActivityIfNeeded(@RequiresPermission @NonNull final Intent intent, final int requestCode) { verifyMethodCalledFromDelegate("startActivityIfNeeded(Intent, Integer)"); @@ -3440,34 +1922,6 @@ public boolean startActivityIfNeeded(@RequiresPermission @NonNull final Intent i .call(intent, requestCode); } - /** - * A special variation to launch an activity only if a new activity - * instance is needed to handle the given Intent. In other words, this is - * just like {@link #startActivityForResult(Intent, int)} except: if you are - * using the {@link Intent#FLAG_ACTIVITY_SINGLE_TOP} flag, or - * singleTask or singleTop - * {@link android.R.styleable#AndroidManifestActivity_launchMode launchMode}, - * and the activity - * that handles intent is the same as your currently running - * activity, then a new instance is not needed. In this case, instead of - * the normal behavior of calling {@link #onNewIntent} this function will - * return and you can handle the Intent yourself. - * - *

This function can only be called from a top-level activity; if it is - * called from a child activity, a runtime exception will be thrown. - * - * @param intent The intent to start. - * @param requestCode If >= 0, this code will be returned in - * onActivityResult() when the activity exits, as described in - * {@link #startActivityForResult}. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @return If a new activity was launched then true is returned; otherwise - * false is returned and you must handle the Intent yourself. - * @see #startActivity - * @see #startActivityForResult - */ public boolean startActivityIfNeeded(@RequiresPermission @NonNull final Intent intent, final int requestCode, @Nullable final Bundle options) { verifyMethodCalledFromDelegate("startActivityIfNeeded(Intent, Integer, Bundle)"); @@ -3487,19 +1941,6 @@ public boolean startInstrumentation(final ComponentName className, final String .call(className, profileFile, arguments); } - /** - * Same as calling {@link #startIntentSender(IntentSender, Intent, int, int, int, Bundle)} - * with no options. - * - * @param intent The IntentSender to launch. - * @param fillInIntent If non-null, this will be provided as the - * intent parameter to {@link IntentSender#sendIntent}. - * @param flagsMask Intent flags in the original IntentSender that you - * would like to change. - * @param flagsValues Desired values for any bits set in - * flagsMask - * @param extraFlags Always set to 0. - */ public void startIntentSender(final IntentSender intent, @Nullable final Intent fillInIntent, final int flagsMask, final int flagsValues, final int extraFlags) throws IntentSender.SendIntentException { @@ -3509,25 +1950,6 @@ public void startIntentSender(final IntentSender intent, @Nullable final Intent .call(intent, fillInIntent, flagsMask, flagsValues, extraFlags); } - /** - * Like {@link #startActivity(Intent, Bundle)}, but taking a IntentSender - * to start; see - * {@link #startIntentSenderForResult(IntentSender, int, Intent, int, int, int, Bundle)} - * for more information. - * - * @param intent The IntentSender to launch. - * @param fillInIntent If non-null, this will be provided as the - * intent parameter to {@link IntentSender#sendIntent}. - * @param flagsMask Intent flags in the original IntentSender that you - * would like to change. - * @param flagsValues Desired values for any bits set in - * flagsMask - * @param extraFlags Always set to 0. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. If options - * have also been supplied by the IntentSender, options given here will - */ public void startIntentSender(final IntentSender intent, @Nullable final Intent fillInIntent, final int flagsMask, final int flagsValues, final int extraFlags, final Bundle options) throws IntentSender.SendIntentException { @@ -3556,10 +1978,6 @@ public void startIntentSenderForResult(final IntentSender intent, final int requ .pop()).call(intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags); } - /** - * Same as calling {@link #startIntentSenderFromChild(Activity, IntentSender, * int, Intent, - * int, int, int, Bundle)} with no options. - */ public void startIntentSenderFromChild(final Activity child, final IntentSender intent, final int requestCode, final Intent fillInIntent, final int flagsMask, final int flagsValues, final int extraFlags) throws IntentSender.SendIntentException { @@ -3570,12 +1988,6 @@ public void startIntentSenderFromChild(final Activity child, final IntentSender .call(child, intent, requestCode, fillInIntent, flagsMask, flagsValues, extraFlags); } - /** - * Like {@link #startActivityFromChild(Activity, Intent, int)}, but - * taking a IntentSender; see - * {@link #startIntentSenderForResult(IntentSender, int, Intent, int, int, int)} - * for more information. - */ public void startIntentSenderFromChild(final Activity child, final IntentSender intent, final int requestCode, final Intent fillInIntent, final int flagsMask, final int flagsValues, final int extraFlags, @Nullable final Bundle options) @@ -3599,167 +2011,40 @@ public void startIntentSenderFromFragment(final Fragment fragment, final IntentS extraFlags, options); } - /** - * Starts a local voice interaction session. When ready, - * {@link #onLocalVoiceInteractionStarted()} is called. You can pass a bundle of private options - * to the registered voice interaction service. - * - * @param privateOptions a Bundle of private arguments to the current voice interaction service - */ public void startLocalVoiceInteraction(final Bundle privateOptions) { verifyMethodCalledFromDelegate("startLocalVoiceInteraction(Bundle)"); ((CallVoid1) mSuperListeners.pop()).call(privateOptions); } - /** - * Request to put this Activity in a mode where the user is locked to the - * current task. - * - * This will prevent the user from launching other apps, going to settings, or reaching the - * home screen. This does not include those apps whose {@link android.R.attr#lockTaskMode} - * values permit launching while locked. - * - * If {@link DevicePolicyManager#isLockTaskPermitted(String)} returns true or - * lockTaskMode=lockTaskModeAlways for this component then the app will go directly into - * Lock Task mode. The user will not be able to exit this mode until - * {@link Activity#stopLockTask()} is called. - * - * If {@link DevicePolicyManager#isLockTaskPermitted(String)} returns false - * then the system will prompt the user with a dialog requesting permission to enter - * this mode. When entered through this method the user can exit at any time through - * an action described by the request dialog. Calling stopLockTask will also exit the - * mode. - * - * @see android.R.attr#lockTaskMode - */ public void startLockTask() { verifyMethodCalledFromDelegate("startLockTask()"); ((CallVoid0) mSuperListeners.pop()).call(); } /** - * This method allows the activity to take care of managing the given - * {@link Cursor}'s lifecycle for you based on the activity's lifecycle. - * That is, when the activity is stopped it will automatically call - * {@link Cursor#deactivate} on the given Cursor, and when it is later restarted - * it will call {@link Cursor#requery} for you. When the activity is - * destroyed, all managed Cursors will be closed automatically. - * - * If you are targeting {@link Build.VERSION_CODES#HONEYCOMB} - * or later, consider instead using {@link LoaderManager} instead, available - * via {@link #getLoaderManager()}. - * - *

Warning: Do not call {@link Cursor#close()} on cursor obtained from - * {@link #managedQuery}, because the activity will do that for you at the appropriate time. - * However, if you call {@link #stopManagingCursor} on a cursor from a managed query, the system - * will not automatically close the cursor and, in that case, you must call - * {@link Cursor#close()}.

- * - * @param c The Cursor to be managed. - * @see #managedQuery(Uri, String[], String, String[], String) - * @see #stopManagingCursor - * @deprecated Use the new {@link CursorLoader} class with - * {@link LoaderManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ public void startManagingCursor(final Cursor c) { verifyMethodCalledFromDelegate("startManagingCursor(Cursor)"); ((CallVoid1) mSuperListeners.pop()).call(c); } - /** - * Same as calling {@link #startNextMatchingActivity(Intent, Bundle)} with - * no options. - * - * @param intent The intent to dispatch to the next activity. For - * correct behavior, this must be the same as the Intent that started - * your own activity; the only changes you can make are to the extras - * inside of it. - * @return Returns a boolean indicating whether there was another Activity - * to start: true if there was a next activity to start, false if there - * wasn't. In general, if true is returned you will then want to call - * finish() on yourself. - */ public boolean startNextMatchingActivity(@RequiresPermission @NonNull final Intent intent) { verifyMethodCalledFromDelegate("startNextMatchingActivity(Intent)"); return ((CallFun1) mSuperListeners.pop()).call(intent); } - /** - * Special version of starting an activity, for use when you are replacing - * other activity components. You can use this to hand the Intent off - * to the next Activity that can handle it. You typically call this in - * {@link #onCreate} with the Intent returned by {@link #getIntent}. - * - * @param intent The intent to dispatch to the next activity. For - * correct behavior, this must be the same as the Intent that started - * your own activity; the only changes you can make are to the extras - * inside of it. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @return Returns a boolean indicating whether there was another Activity - * to start: true if there was a next activity to start, false if there - * wasn't. In general, if true is returned you will then want to call - * finish() on yourself. - */ public boolean startNextMatchingActivity(@RequiresPermission @NonNull final Intent intent, @Nullable final Bundle options) { verifyMethodCalledFromDelegate("startNextMatchingActivity(Intent, Bundle)"); return ((CallFun2) mSuperListeners.pop()).call(intent, options); } - /** - * Begin postponed transitions after {@link #postponeEnterTransition()} was called. - * If postponeEnterTransition() was called, you must call startPostponedEnterTransition() - * to have your Activity start drawing. - */ public void startPostponedEnterTransition() { verifyMethodCalledFromDelegate("startPostponedEnterTransition()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * This hook is called to launch the search UI. - * - *

It is typically called from onSearchRequested(), either directly from - * Activity.onSearchRequested() or from an overridden version in any given - * Activity. If your goal is simply to activate search, it is preferred to call - * onSearchRequested(), which may have been overridden elsewhere in your Activity. If your goal - * is to inject specific data such as context data, it is preferred to override - * onSearchRequested(), so that any callers to it will benefit from the override. - * - * @param initialQuery Any non-null non-empty string will be inserted as - * pre-entered text in the search query box. - * @param selectInitialQuery If true, the initial query will be preselected, which means that - * any further typing will replace it. This is useful for cases - * where - * an entire pre-formed - * query is being inserted. If false, the selection point will be - * placed at the end of the - * inserted query. This is useful when the inserted query is text - * that the user entered, - * and the user would expect to be able to keep typing. This - * parameter is only meaningful - * if initialQuery is a non-empty string. - * @param appSearchData An application can insert application-specific - * context here, in order to improve quality or specificity of its - * own - * searches. This data will be returned with SEARCH intent(s). Null - * if - * no extra data is required. - * @param globalSearch If false, this will only launch the search that has been - * specifically - * defined by the application (which is usually defined as a local - * search). If no default - * search is defined in the current application or activity, global - * search will be launched. - * If true, this will always launch a platform-global (e.g. - * web-based) - * search instead. - * @see SearchManager - * @see #onSearchRequested - */ public void startSearch(@Nullable final String initialQuery, final boolean selectInitialQuery, @Nullable final Bundle appSearchData, final boolean globalSearch) { verifyMethodCalledFromDelegate("startSearch(String, Boolean, Bundle, Boolean)"); @@ -3777,52 +2062,18 @@ public ActionMode startSupportActionMode(@NonNull final ActionMode.Callback call return ((CallFun1) mSuperListeners.pop()).call(callback); } - /** - * Request to terminate the current voice interaction that was previously started - * using {@link #startLocalVoiceInteraction(Bundle)}. When the interaction is - * terminated, {@link #onLocalVoiceInteractionStopped()} will be called. - */ public void stopLocalVoiceInteraction() { verifyMethodCalledFromDelegate("stopLocalVoiceInteraction()"); ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Allow the user to switch away from the current task. - * - * Called to end the mode started by {@link Activity#startLockTask}. This - * can only be called by activities that have successfully called - * startLockTask previously. - * - * This will allow the user to exit this app and move onto other activities. - *

Note: This method should only be called when the activity is user-facing. That is, - * between onResume() and onPause(). - *

Note: If there are other tasks below this one that are also locked then calling this - * method will immediately finish this task and resume the previous locked one, remaining in - * lockTask mode. - * - * @see android.R.attr#lockTaskMode - * @see ActivityManager#getLockTaskModeState() - */ public void stopLockTask() { verifyMethodCalledFromDelegate("stopLockTask()"); ((CallVoid0) mSuperListeners.pop()).call(); } /** - * Given a Cursor that was previously given to - * {@link #startManagingCursor}, stop the activity's management of that - * cursor. - * - *

Warning: After calling this method on a cursor from a managed query, - * the system will not automatically close the cursor and you must call - * {@link Cursor#close()}.

- * - * @param c The Cursor that was being managed. - * @see #startManagingCursor - * @deprecated Use the new {@link CursorLoader} class with - * {@link LoaderManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ public void stopManagingCursor(final Cursor c) { verifyMethodCalledFromDelegate("stopManagingCursor(Cursor)"); @@ -3869,27 +2120,11 @@ public void supportStartPostponedEnterTransition() { ((CallVoid0) mSuperListeners.pop()).call(); } - /** - * Request that key events come to this activity. Use this if your - * activity has no views with focus, but the activity still wants - * a chance to process key events. - * - * @see Window#takeKeyEvents - */ public void takeKeyEvents(final boolean get) { verifyMethodCalledFromDelegate("takeKeyEvents(Boolean)"); ((CallVoid1) mSuperListeners.pop()).call(get); } - /** - * Similar to {@link #startSearch}, but actually fires off the search query after invoking - * the search dialog. Made available for testing purposes. - * - * @param query The query to trigger. If empty, the request will be ignored. - * @param appSearchData An application can insert application-specific - * context here, in order to improve quality or specificity of its own - * searches. This data will be returned with SEARCH intent(s). Null if - */ public void triggerSearch(final String query, @Nullable final Bundle appSearchData) { verifyMethodCalledFromDelegate("triggerSearch(String, Bundle)"); ((CallVoid2) mSuperListeners.pop()).call(query, appSearchData); @@ -3900,22 +2135,11 @@ public void unbindService(final ServiceConnection conn) { ((CallVoid1) mSuperListeners.pop()).call(conn); } - /** - * Remove a {@link ComponentCallbacks} object that was previously registered - * with {@link #registerComponentCallbacks(ComponentCallbacks)}. - */ public void unregisterComponentCallbacks(final ComponentCallbacks callback) { verifyMethodCalledFromDelegate("unregisterComponentCallbacks(ComponentCallbacks)"); ((CallVoid1) mSuperListeners.pop()).call(callback); } - /** - * Prevents a context menu to be shown for the given view. This method will remove the - * {@link OnCreateContextMenuListener} on the view. - * - * @param view The view that should stop showing a context menu. - * @see #registerForContextMenu(View) - */ public void unregisterForContextMenu(final View view) { verifyMethodCalledFromDelegate("unregisterForContextMenu(View)"); ((CallVoid1) mSuperListeners.pop()).call(view); @@ -6063,6 +4287,13 @@ void setRequestedOrientation(final CallVoid1 superCall, } } + void setShowWhenLocked(final CallVoid1 superCall, final boolean showWhenLocked) { + synchronized (mSuperListeners) { + mSuperListeners.push(superCall); + setShowWhenLocked(showWhenLocked); + } + } + void setSupportActionBar(final CallVoid1 superCall, @Nullable final Toolbar toolbar) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); @@ -6137,6 +4368,13 @@ void setTitleColor(final CallVoid1 superCall, final int textColor) { } } + void setTurnScreenOn(final CallVoid1 superCall, final boolean turnScreenOn) { + synchronized (mSuperListeners) { + mSuperListeners.push(superCall); + setTurnScreenOn(turnScreenOn); + } + } + void setVisible(final CallVoid1 superCall, final boolean visible) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); diff --git a/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/CompositeActivity.java b/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/CompositeActivity.java index 388b0cf..5c9539a 100644 --- a/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/CompositeActivity.java +++ b/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/CompositeActivity.java @@ -5,27 +5,22 @@ import android.annotation.SuppressLint; import android.app.Activity; import android.app.ActivityManager; -import android.app.ActivityOptions; import android.app.Dialog; import android.app.PendingIntent; import android.app.PictureInPictureParams; -import android.app.SearchManager; import android.app.VoiceInteractor; import android.app.assist.AssistContent; import android.arch.lifecycle.Lifecycle; -import android.content.ActivityNotFoundException; import android.content.BroadcastReceiver; import android.content.ComponentCallbacks; import android.content.ComponentName; import android.content.ContentResolver; import android.content.Context; -import android.content.CursorLoader; import android.content.Intent; import android.content.IntentFilter; import android.content.IntentSender; import android.content.ServiceConnection; import android.content.SharedPreferences; -import android.content.pm.ActivityInfo; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.content.res.AssetManager; @@ -38,16 +33,11 @@ import android.graphics.Canvas; import android.graphics.drawable.Drawable; import android.net.Uri; -import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.os.Looper; import android.os.PersistableBundle; import android.os.UserHandle; -import android.provider.Settings; -import android.service.voice.VoiceInteractionService; -import android.service.voice.VoiceInteractionSession; -import android.service.vr.VrListenerService; import android.support.annotation.IdRes; import android.support.annotation.LayoutRes; import android.support.annotation.NonNull; @@ -69,12 +59,10 @@ import android.transition.Scene; import android.transition.TransitionManager; import android.util.AttributeSet; -import android.util.Pair; import android.view.ContextMenu; import android.view.Display; import android.view.DragAndDropPermissions; import android.view.DragEvent; -import android.view.InputDevice; import android.view.KeyEvent; import android.view.KeyboardShortcutGroup; import android.view.LayoutInflater; @@ -138,16 +126,6 @@ public Removable addPlugin(final ActivityPlugin plugin) { return delegate.addPlugin(plugin); } - /** - * Call to set an "override configuration" on this context -- this is - * a configuration that replies one or more values of the standard - * configuration that is applied to the context. See - * {@link Context#createConfigurationContext(Configuration)} for more - * information. - * - *

This method can only be called once, and must be called before any - * calls to {@link #getResources()} or {@link #getAssets()} are made. - */ @Override public void applyOverrideConfiguration(final Configuration overrideConfiguration) { delegate.applyOverrideConfiguration(overrideConfiguration); @@ -207,6 +185,9 @@ public int checkUriPermission(final Uri uri, final String readPermission, .checkUriPermission(uri, readPermission, writePermission, pid, uid, modeFlags); } + /** + * @deprecated + */ @Override public void clearWallpaper() throws IOException { try { @@ -216,9 +197,6 @@ public void clearWallpaper() throws IOException { } } - /** - * Programmatically closes the most recently opened context menu, if showing. - */ @Override public void closeContextMenu() { delegate.closeContextMenu(); @@ -264,31 +242,6 @@ public Context createPackageContext(final String packageName, final int flags) } } - /** - * Create a new PendingIntent object which you can hand to others - * for them to use to send result data back to your - * {@link #onActivityResult} callback. The created object will be either - * one-shot (becoming invalid after a result is sent back) or multiple - * (allowing any number of results to be sent through it). - * - * @param requestCode Private request code for the sender that will be - * associated with the result data when it is returned. The sender can not - * modify this value, allowing you to identify incoming results. - * @param data Default data to supply in the result, which may be modified - * by the sender. - * @param flags May be {@link PendingIntent#FLAG_ONE_SHOT PendingIntent.FLAG_ONE_SHOT}, - * {@link PendingIntent#FLAG_NO_CREATE PendingIntent.FLAG_NO_CREATE}, - * {@link PendingIntent#FLAG_CANCEL_CURRENT PendingIntent.FLAG_CANCEL_CURRENT}, - * {@link PendingIntent#FLAG_UPDATE_CURRENT PendingIntent.FLAG_UPDATE_CURRENT}, - * or any of the flags as supported by - * {@link Intent#fillIn Intent.fillIn()} to control which unspecified parts - * of the intent that can be supplied when the actual send happens. - * @return Returns an existing or new PendingIntent matching the given - * parameters. May return null only if - * {@link PendingIntent#FLAG_NO_CREATE PendingIntent.FLAG_NO_CREATE} has been - * supplied. - * @see PendingIntent - */ @Override public PendingIntent createPendingResult(final int requestCode, @NonNull final Intent data, final int flags) { @@ -315,15 +268,6 @@ public boolean deleteSharedPreferences(final String name) { return delegate.deleteSharedPreferences(name); } - /** - * Called to process generic motion events. You can override this to - * intercept all generic motion events before they are dispatched to the - * window. Be sure to call this implementation for generic motion events - * that should be handled normally. - * - * @param ev The generic motion event. - * @return boolean Return true if this event was consumed. - */ @Override public boolean dispatchGenericMotionEvent(final MotionEvent ev) { return delegate.dispatchGenericMotionEvent(ev); @@ -334,15 +278,6 @@ public boolean dispatchKeyEvent(final KeyEvent event) { return delegate.dispatchKeyEvent(event); } - /** - * Called to process a key shortcut event. - * You can override this to intercept all key shortcut events before they are - * dispatched to the window. Be sure to call this implementation for key shortcut - * events that should be handled normally. - * - * @param event The key shortcut event. - * @return True if this event was consumed. - */ @Override public boolean dispatchKeyShortcutEvent(final KeyEvent event) { return delegate.dispatchKeyShortcutEvent(event); @@ -353,29 +288,11 @@ public boolean dispatchPopulateAccessibilityEvent(final AccessibilityEvent event return delegate.dispatchPopulateAccessibilityEvent(event); } - /** - * Called to process touch screen events. You can override this to - * intercept all touch screen events before they are dispatched to the - * window. Be sure to call this implementation for touch screen events - * that should be handled normally. - * - * @param ev The touch screen event. - * @return boolean Return true if this event was consumed. - */ @Override public boolean dispatchTouchEvent(final MotionEvent ev) { return delegate.dispatchTouchEvent(ev); } - /** - * Called to process trackball events. You can override this to - * intercept all trackball events before they are dispatched to the - * window. Be sure to call this implementation for trackball events - * that should be handled normally. - * - * @param ev The trackball event. - * @return boolean Return true if this event was consumed. - */ @Override public boolean dispatchTrackballEvent(final MotionEvent ev) { return delegate.dispatchTrackballEvent(ev); @@ -430,9 +347,7 @@ public void enforceUriPermission(final Uri uri, final String readPermission, } /** - * Puts the activity in picture-in-picture mode. - * - * @see android.R.attr#supportsPictureInPicture + * @deprecated */ @Override public void enterPictureInPictureMode() { @@ -454,101 +369,41 @@ public T findViewById(@IdRes final int id) { return delegate.findViewById(id); } - /** - * Call this when your activity is done and should be closed. The - * ActivityResult is propagated back to whoever launched you via - * onActivityResult(). - */ @Override public void finish() { delegate.finish(); } - /** - * Force finish another activity that you had previously started with - * {@link #startActivityForResult}. - * - * @param requestCode The request code of the activity that you had - * given to startActivityForResult(). If there are multiple - * activities started with this request code, they - * will all be finished. - */ @Override public void finishActivity(final int requestCode) { delegate.finishActivity(requestCode); } - /** - * This is called when a child activity of this one calls its - * finishActivity(). - * - * @param child The activity making the call. - * @param requestCode Request code that had been used to start the - */ @Override public void finishActivityFromChild(@NonNull final Activity child, final int requestCode) { delegate.finishActivityFromChild(child, requestCode); } - /** - * Finish this activity as well as all activities immediately below it - * in the current task that have the same affinity. This is typically - * used when an application can be launched on to another task (such as - * from an ACTION_VIEW of a content type it understands) and the user - * has used the up navigation to switch out of the current task and in - * to its own task. In this case, if the user has navigated down into - * any other activities of the second application, all of those should - * be removed from the original task as part of the task switch. - * - *

Note that this finish does not allow you to deliver results - * to the previous activity, and an exception will be thrown if you are trying - * to do so.

- */ @Override public void finishAffinity() { delegate.finishAffinity(); } - /** - * Reverses the Activity Scene entry Transition and triggers the calling Activity - * to reverse its exit Transition. When the exit Transition completes, - * {@link #finish()} is called. If no entry Transition was used, finish() is called - * immediately and the Activity exit Transition is run. - * - * @see ActivityOptions#makeSceneTransitionAnimation(Activity, Pair[]) - */ @Override public void finishAfterTransition() { delegate.finishAfterTransition(); } - /** - * Call this when your activity is done and should be closed and the task should be completely - * removed as a part of finishing the root activity of the task. - */ @Override public void finishAndRemoveTask() { delegate.finishAndRemoveTask(); } - /** - * This is called when a child activity of this one calls its - * {@link #finish} method. The default implementation simply calls - * finish() on this activity (the parent), finishing the entire group. - * - * @param child The activity making the call. - * @see #finish - */ @Override public void finishFromChild(final Activity child) { delegate.finishFromChild(child); } - /** - * Retrieve a reference to this activity's ActionBar. - * - * @return The Activity's ActionBar, or null if it does not have one. - */ @Nullable @Override public android.app.ActionBar getActionBar() { @@ -570,9 +425,6 @@ public AssetManager getAssets() { return delegate.getAssets(); } - /** - * @return the base context as set by the constructor or setBaseContext - */ @Override public Context getBaseContext() { return delegate.getBaseContext(); @@ -583,66 +435,18 @@ public File getCacheDir() { return delegate.getCacheDir(); } - /** - * Return the name of the activity that invoked this activity. This is - * who the data in {@link #setResult setResult()} will be sent to. You - * can use this information to validate that the recipient is allowed to - * receive the data. - * - *

Note: if the calling activity is not expecting a result (that is it - * did not use the {@link #startActivityForResult} - * form that includes a request code), then the calling package will be - * null. - * - * @return The ComponentName of the activity that will receive your - * reply, or null if none. - */ @Nullable @Override public ComponentName getCallingActivity() { return delegate.getCallingActivity(); } - /** - * Return the name of the package that invoked this activity. This is who - * the data in {@link #setResult setResult()} will be sent to. You can - * use this information to validate that the recipient is allowed to - * receive the data. - * - *

Note: if the calling activity is not expecting a result (that is it - * did not use the {@link #startActivityForResult} - * form that includes a request code), then the calling package will be - * null.

- * - *

Note: prior to {@link Build.VERSION_CODES#JELLY_BEAN_MR2}, - * the result from this method was unstable. If the process hosting the calling - * package was no longer running, it would return null instead of the proper package - * name. You can use {@link #getCallingActivity()} and retrieve the package name - * from that instead.

- * - * @return The package of the activity that will receive your - * reply, or null if none. - */ @Nullable @Override public String getCallingPackage() { return delegate.getCallingPackage(); } - /** - * If this activity is being destroyed because it can not handle a - * configuration parameter being changed (and thus its - * {@link #onConfigurationChanged(Configuration)} method is - * not being called), then you can use this method to discover - * the set of changes that have occurred while in the process of being - * destroyed. Note that there is no guarantee that these will be - * accurate (other changes could have happened at any time), so you should - * only use this as an optimization hint. - * - * @return Returns a bit field of the configuration parameters that are - * changing, as defined by the {@link Configuration} - * class. - */ @Override public int getChangingConfigurations() { return delegate.getChangingConfigurations(); @@ -658,11 +462,6 @@ public File getCodeCacheDir() { return delegate.getCodeCacheDir(); } - /** - * Returns complete component name of this activity. - * - * @return Returns the complete component name for this activity - */ @Override public ComponentName getComponentName() { return delegate.getComponentName(); @@ -673,41 +472,16 @@ public ContentResolver getContentResolver() { return delegate.getContentResolver(); } - /** - * Retrieve the {@link Scene} representing this window's current content. - * Requires {@link Window#FEATURE_CONTENT_TRANSITIONS}. - * - *

This method will return null if the current content is not represented by a Scene.

- * - * @return Current Scene being shown or null - */ @Override public Scene getContentScene() { return delegate.getContentScene(); } - /** - * Retrieve the {@link TransitionManager} responsible for default transitions in this window. - * Requires {@link Window#FEATURE_CONTENT_TRANSITIONS}. - * - *

This method will return non-null after content has been initialized (e.g. by using - * {@link #setContentView}) if {@link Window#FEATURE_CONTENT_TRANSITIONS} has been granted.

- * - * @return This window's content TransitionManager or null if none is set. - */ @Override public TransitionManager getContentTransitionManager() { return delegate.getContentTransitionManager(); } - /** - * Calls {@link Window#getCurrentFocus} on the - * Window of this Activity to return the currently focused view. - * - * @return View The current View with focus or null. - * @see #getWindow - * @see Window#getCurrentFocus - */ @Nullable @Override public View getCurrentFocus() { @@ -781,18 +555,11 @@ public File getFilesDir() { return delegate.getFilesDir(); } - /** - * Return the FragmentManager for interacting with fragments associated - * with this activity. - */ @Override public android.app.FragmentManager getFragmentManager() { return delegate.getFragmentManager(); } - /** - * Return the intent that started this activity. - */ @Override public Intent getIntent() { return delegate.getIntent(); @@ -828,10 +595,6 @@ final public Object getLastNonConfigurationInstance() { return super.getLastNonConfigurationInstance(); } - /** - * Convenience for calling - * {@link Window#getLayoutInflater}. - */ @NonNull @Override public LayoutInflater getLayoutInflater() { @@ -843,20 +606,11 @@ public Lifecycle getLifecycle() { return delegate.getLifecycle(); } - /** - * Return the LoaderManager for this activity, creating it if needed. - */ @Override public android.app.LoaderManager getLoaderManager() { return delegate.getLoaderManager(); } - /** - * Returns class name for this activity with the package prefix removed. - * This is the default name used to read and write settings. - * - * @return The local class name. - */ @NonNull @Override public String getLocalClassName() { @@ -913,70 +667,23 @@ public String getPackageResourcePath() { return delegate.getPackageResourcePath(); } - /** - * Obtain an {@link Intent} that will launch an explicit target activity specified by - * this activity's logical parent. The logical parent is named in the application's manifest - * by the {@link android.R.attr#parentActivityName parentActivityName} attribute. - * Activity subclasses may override this method to modify the Intent returned by - * super.getParentActivityIntent() or to implement a different mechanism of retrieving - * the parent intent entirely. - * - * @return a new Intent targeting the defined parent of this activity or null if - * there is no valid parent. - */ @Nullable @Override public Intent getParentActivityIntent() { return delegate.getParentActivityIntent(); } - /** - * Retrieve a {@link SharedPreferences} object for accessing preferences - * that are private to this activity. This simply calls the underlying - * {@link #getSharedPreferences(String, int)} method by passing in this activity's - * class name as the preferences name. - * - * @param mode Operating mode. Use {@link #MODE_PRIVATE} for the default - * operation. - * @return Returns the single SharedPreferences instance that can be used - * to retrieve and modify the preference values. - */ @Override public SharedPreferences getPreferences(final int mode) { return delegate.getPreferences(mode); } - /** - * Return information about who launched this activity. If the launching Intent - * contains an {@link Intent#EXTRA_REFERRER Intent.EXTRA_REFERRER}, - * that will be returned as-is; otherwise, if known, an - * {@link Intent#URI_ANDROID_APP_SCHEME android-app:} referrer URI containing the - * package name that started the Intent will be returned. This may return null if no - * referrer can be identified -- it is neither explicitly specified, nor is it known which - * application package was involved. - * - *

If called while inside the handling of {@link #onNewIntent}, this function will - * return the referrer that submitted that new intent to the activity. Otherwise, it - * always returns the referrer of the original Intent.

- * - *

Note that this is not a security feature -- you can not trust the - * referrer information, applications can spoof it.

- */ @Nullable @Override public Uri getReferrer() { return delegate.getReferrer(); } - /** - * Return the current requested orientation of the activity. This will - * either be the orientation requested in its component's manifest, or - * the last requested orientation given to - * {@link #setRequestedOrientation(int)}. - * - * @return Returns an orientation constant as used in - * {@link ActivityInfo#screenOrientation ActivityInfo.screenOrientation}. - */ @Override public int getRequestedOrientation() { return delegate.getRequestedOrientation(); @@ -1024,12 +731,6 @@ public String getSystemServiceName(final Class serviceClass) { return delegate.getSystemServiceName(serviceClass); } - /** - * Return the identifier of the task this activity is in. This identifier - * will remain the same for the lifetime of the activity. - * - * @return Task identifier, an opaque integer. - */ @Override public int getTaskId() { return delegate.getTaskId(); @@ -1040,46 +741,40 @@ public Resources.Theme getTheme() { return delegate.getTheme(); } - /** - * Retrieve the active {@link VoiceInteractor} that the user is going through to - * interact with this activity. - */ @Override public VoiceInteractor getVoiceInteractor() { return delegate.getVoiceInteractor(); } + /** + * @deprecated + */ @Override public Drawable getWallpaper() { return delegate.getWallpaper(); } + /** + * @deprecated + */ @Override public int getWallpaperDesiredMinimumHeight() { return delegate.getWallpaperDesiredMinimumHeight(); } + /** + * @deprecated + */ @Override public int getWallpaperDesiredMinimumWidth() { return delegate.getWallpaperDesiredMinimumWidth(); } - /** - * Retrieve the current {@link Window} for the activity. - * This can be used to directly access parts of the Window API that - * are not available through Activity/Screen. - * - * @return Window The current window, or null if the activity is not - * visual. - */ @Override public Window getWindow() { return delegate.getWindow(); } - /** - * Retrieve the window manager for showing custom windows. - */ @Override public WindowManager getWindowManager() { return delegate.getWindowManager(); @@ -1090,13 +785,6 @@ public void grantUriPermission(final String toPackage, final Uri uri, final int delegate.grantUriPermission(toPackage, uri, modeFlags); } - /** - * Returns true if this activity's main window currently has window focus. - * Note that this is not the same as the view itself having focus. - * - * @return True if this activity's main window currently has window focus. - * @see #onWindowAttributesChanged(WindowManager.LayoutParams) - */ @Override public boolean hasWindowFocus() { return delegate.hasWindowFocus(); @@ -1112,24 +800,11 @@ public boolean isActivityTransitionRunning() { return delegate.isActivityTransitionRunning(); } - /** - * Check to see whether this activity is in the process of being destroyed in order to be - * recreated with a new configuration. This is often used in - * {@link #onStop} to determine whether the state needs to be cleaned up or will be passed - * on to the next instance of the activity via {@link #onRetainNonConfigurationInstance()}. - * - * @return If the activity is being torn down in order to be recreated with a new configuration, - * returns true; else returns false. - */ @Override public boolean isChangingConfigurations() { return delegate.isChangingConfigurations(); } - /** - * Returns true if the final {@link #onDestroy()} call has been made - * on the Activity, so this instance is now dead. - */ @Override public boolean isDestroyed() { return delegate.isDestroyed(); @@ -1140,66 +815,26 @@ public boolean isDeviceProtectedStorage() { return delegate.isDeviceProtectedStorage(); } - /** - * Check to see whether this activity is in the process of finishing, - * either because you called {@link #finish} on it or someone else - * has requested that it finished. This is often used in - * {@link #onPause} to determine whether the activity is simply pausing or - * completely finishing. - * - * @return If the activity is finishing, returns true; else returns false. - * @see #finish - */ @Override public boolean isFinishing() { return delegate.isFinishing(); } - /** - * Bit indicating that this activity is "immersive" and should not be - * interrupted by notifications if possible. - * - * This value is initially set by the manifest property - * android:immersive but may be changed at runtime by - * {@link #setImmersive}. - * - * @see #setImmersive(boolean) - * @see ActivityInfo#FLAG_IMMERSIVE - */ @Override public boolean isImmersive() { return delegate.isImmersive(); } - /** - * Returns true if the activity is currently in multi-window mode. - * - * @return True if the activity is in multi-window mode. - * @see android.R.attr#resizeableActivity - */ @Override public boolean isInMultiWindowMode() { return delegate.isInMultiWindowMode(); } - /** - * Returns true if the activity is currently in picture-in-picture mode. - * - * @return True if the activity is in picture-in-picture mode. - * @see android.R.attr#supportsPictureInPicture - */ @Override public boolean isInPictureInPictureMode() { return delegate.isInPictureInPictureMode(); } - /** - * Queries whether the currently enabled voice interaction service supports returning - * a voice interactor for use by the activity. This is valid only for the duration of the - * activity. - * - * @return whether the current voice interaction service supports local voice interaction - */ @Override public boolean isLocalVoiceInteractionSupported() { return delegate.isLocalVoiceInteractionSupported(); @@ -1210,34 +845,16 @@ public boolean isRestricted() { return delegate.isRestricted(); } - /** - * Return whether this activity is the root of a task. The root is the - * first activity in a task. - * - * @return True if this is the root activity, else false. - */ @Override public boolean isTaskRoot() { return delegate.isTaskRoot(); } - /** - * Check whether this activity is running as part of a voice interaction with the user. - * If true, it should perform its interaction with the user through the - * {@link VoiceInteractor} returned by {@link #getVoiceInteractor}. - */ @Override public boolean isVoiceInteraction() { return delegate.isVoiceInteraction(); } - /** - * Like {@link #isVoiceInteraction}, but only returns true if this is also the root - * of a voice interaction. That is, returns true if this activity was directly - * started by the voice interaction service as the initiation of a voice interaction. - * Otherwise, for example if it was started by another activity while under voice - * interaction, returns false. - */ @Override public boolean isVoiceInteractionRoot() { return delegate.isVoiceInteractionRoot(); @@ -1253,102 +870,31 @@ public boolean moveSharedPreferencesFrom(final Context sourceContext, final Stri return delegate.moveSharedPreferencesFrom(sourceContext, name); } - /** - * Move the task containing this activity to the back of the activity - * stack. The activity's order within the task is unchanged. - * - * @param nonRoot If false then this only works if the activity is the root - * of a task; if true it will work for any activity in - * a task. - * @return If the task was moved (or it was already at the - * back) true is returned, else false. - */ @Override public boolean moveTaskToBack(final boolean nonRoot) { return delegate.moveTaskToBack(nonRoot); } - /** - * Navigate from this activity to the activity specified by upIntent, finishing this activity - * in the process. If the activity indicated by upIntent already exists in the task's history, - * this activity and all others before the indicated activity in the history stack will be - * finished. - * - *

If the indicated activity does not appear in the history stack, this will finish - * each activity in this task until the root activity of the task is reached, resulting in - * an "in-app home" behavior. This can be useful in apps with a complex navigation hierarchy - * when an activity may be reached by a path not passing through a canonical parent - * activity.

- * - *

This method should be used when performing up navigation from within the same task - * as the destination. If up navigation should cross tasks in some cases, see - * {@link #shouldUpRecreateTask(Intent)}.

- * - * @param upIntent An intent representing the target destination for up navigation - * @return true if up navigation successfully reached the activity indicated by upIntent and - * upIntent was delivered to it. false if an instance of the indicated activity could - * not be found and this activity was simply finished normally. - */ @Override public boolean navigateUpTo(final Intent upIntent) { return delegate.navigateUpTo(upIntent); } - /** - * This is called when a child activity of this one calls its - * {@link #navigateUpTo} method. The default implementation simply calls - * navigateUpTo(upIntent) on this activity (the parent). - * - * @param child The activity making the call. - * @param upIntent An intent representing the target destination for up navigation - * @return true if up navigation successfully reached the activity indicated by upIntent and - * upIntent was delivered to it. false if an instance of the indicated activity could - * not be found and this activity was simply finished normally. - */ @Override public boolean navigateUpToFromChild(final Activity child, final Intent upIntent) { return delegate.navigateUpToFromChild(child, upIntent); } - /** - * Notifies the activity that an action mode has finished. - * Activity subclasses overriding this method should call the superclass implementation. - * - * @param mode The action mode that just finished. - */ @Override public void onActionModeFinished(final android.view.ActionMode mode) { delegate.onActionModeFinished(mode); } - /** - * Notifies the Activity that an action mode has been started. - * Activity subclasses overriding this method should call the superclass implementation. - * - * @param mode The new action mode. - */ @Override public void onActionModeStarted(final android.view.ActionMode mode) { delegate.onActionModeStarted(mode); } - /** - * Called when an activity you launched with an activity transition exposes this - * Activity through a returning activity transition, giving you the resultCode - * and any additional data from it. This method will only be called if the activity - * set a result code other than {@link #RESULT_CANCELED} and it supports activity - * transitions with {@link Window#FEATURE_ACTIVITY_TRANSITIONS}. - * - *

The purpose of this function is to let the called Activity send a hint about - * its state so that this underlying Activity can prepare to be exposed. A call to - * this method does not guarantee that the called Activity has or will be exiting soon. - * It only indicates that it will expose this Activity's Window and it has - * some data to pass to prepare it.

- * - * @param resultCode The integer result code returned by the child activity - * through its setResult(). - * @param data An Intent, which can return result data to the caller - */ @Override public void onActivityReenter(final int resultCode, final Intent data) { delegate.onActivityReenter(resultCode, data); @@ -1370,24 +916,11 @@ public void onAttachFragment(final Fragment fragment) { delegate.onAttachFragment(fragment); } - /** - * Called when a Fragment is being attached to this activity, immediately - * after the call to its {@link android.app.Fragment#onAttach Fragment.onAttach()} - * method and before {@link android.app.Fragment#onCreate Fragment.onCreate()}. - */ @Override public void onAttachFragment(final android.app.Fragment fragment) { delegate.onAttachFragment(fragment); } - /** - * Called when the main window associated with the activity has been - * attached to the window manager. - * See {@link View#onAttachedToWindow() View.onAttachedToWindow()} - * for more information. - * - * @see View#onAttachedToWindow - */ @Override public void onAttachedToWindow() { delegate.onAttachedToWindow(); @@ -1413,63 +946,16 @@ public void onContentChanged() { delegate.onContentChanged(); } - /** - * This hook is called whenever an item in a context menu is selected. The - * default implementation simply returns false to have the normal processing - * happen (calling the item's Runnable or sending a message to its Handler - * as appropriate). You can use this method for any items for which you - * would like to do processing without those other facilities. - *

- * Use {@link 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. - * - * @param item The context menu item that was selected. - * @return boolean Return false to allow normal context menu processing to - * proceed, true to consume it here. - */ @Override public boolean onContextItemSelected(final MenuItem item) { return delegate.onContextItemSelected(item); } - /** - * 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). - * - * @param menu The context menu that is being closed. - */ @Override public void onContextMenuClosed(final Menu menu) { delegate.onContextMenuClosed(menu); } - /** - * Same as {@link #onCreate(Bundle)} but called for those activities created with - * the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. - * - * @param savedInstanceState if the activity is being re-initialized after - * previously being shut down then this Bundle contains the data it - * most - * recently supplied in {@link #onSaveInstanceState}. - * Note: Otherwise it is null. - * @param persistentState if the activity is being re-initialized after - * previously being shut down or powered off then this Bundle - * contains - * the data it most - * recently supplied to outPersistentState in {@link - * #onSaveInstanceState}. - * Note: Otherwise it is null. - * @see #onCreate(Bundle) - * @see #onStart - * @see #onSaveInstanceState - * @see #onRestoreInstanceState - * @see #onPostCreate - */ @Override public void onCreate(@Nullable final Bundle savedInstanceState, @Nullable final PersistableBundle persistentState) { @@ -1481,40 +967,12 @@ public void onCreate(@Nullable final Bundle savedInstanceState) { delegate.onCreate(savedInstanceState); } - /** - * Called when a context menu for the {@code view} is about to be shown. - * Unlike {@link #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 {@link AdapterView} subclasses, - * this can be found in the {@code menuInfo})). - *

- * Use {@link #onContextItemSelected(MenuItem)} to know when an - * item has been selected. - *

- * It is not safe to hold onto the context menu after this method returns. - */ @Override public void onCreateContextMenu(final ContextMenu menu, final View v, final ContextMenu.ContextMenuInfo menuInfo) { delegate.onCreateContextMenu(menu, v, menuInfo); } - /** - * Generate a new description for this activity. This method is called - * before pausing the activity and can, if desired, return some textual - * description of its current state to be displayed to the user. - * - *

The default implementation returns null, which will cause you to - * inherit the description from the previous activity. If all activities - * return null, generally the label of the top activity will be used as the - * description. - * - * @return A description of what the user is doing. It should be short and - * sweet (only a few words). - * @see #onCreateThumbnail - * @see #onSaveInstanceState - * @see #onPause - */ @Nullable @Override public CharSequence onCreateDescription() { @@ -1522,7 +980,7 @@ public CharSequence onCreateDescription() { } /** - * @deprecated Old no-arguments version of {@link #onCreateDialog(int, Bundle)}. + * @deprecated */ @Override public Dialog onCreateDialog(final int id) { @@ -1530,35 +988,7 @@ public Dialog onCreateDialog(final int id) { } /** - * Callback for creating dialogs that are managed (saved and restored) for you - * by the activity. The default implementation calls through to - * {@link #onCreateDialog(int)} for compatibility. - * - * If you are targeting {@link Build.VERSION_CODES#HONEYCOMB} - * or later, consider instead using a {@link DialogFragment} instead. - * - *

If you use {@link #showDialog(int)}, the activity will call through to - * this method the first time, and hang onto it thereafter. Any dialog - * that is created by this method will automatically be saved and restored - * for you, including whether it is showing. - * - *

If you would like the activity to manage saving and restoring dialogs - * for you, you should override this method and handle any ids that are - * passed to {@link #showDialog}. - * - *

If you would like an opportunity to prepare your dialog before it is shown, - * override {@link #onPrepareDialog(int, Dialog, Bundle)}. - * - * @param id The id of the dialog. - * @param args The dialog arguments provided to {@link #showDialog(int, Bundle)}. - * @return The dialog. If you return null, the dialog will not be created. - * @see #onPrepareDialog(int, Dialog, Bundle) - * @see #showDialog(int, Bundle) - * @see #dismissDialog(int) - * @see #removeDialog(int) - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ @Nullable @Override @@ -1566,57 +996,11 @@ public Dialog onCreateDialog(final int id, final Bundle args) { return delegate.onCreateDialog(id, args); } - /** - * Define the synthetic task stack that will be generated during Up navigation from - * a different task. - * - *

The default implementation of this method adds the parent chain of this activity - * as specified in the manifest to the supplied {@link android.app.TaskStackBuilder}. - * Applications - * may choose to override this method to construct the desired task stack in a different - * way.

- * - *

This method will be invoked by the default implementation of {@link #onNavigateUp()} - * if {@link #shouldUpRecreateTask(Intent)} returns true when supplied with the intent - * returned by {@link #getParentActivityIntent()}.

- * - *

Applications that wish to supply extra Intent parameters to the parent stack defined - * by the manifest should override {@link #onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder)}.

- * - * @param builder An empty TaskStackBuilder - the application should add intents representing - * the desired task stack - */ @Override public void onCreateNavigateUpTaskStack(final android.app.TaskStackBuilder builder) { delegate.onCreateNavigateUpTaskStack(builder); } - /** - * Initialize the contents of the Activity's standard options menu. You - * should place your menu items in to menu. - * - *

This is only called once, the first time the options menu is - * displayed. To update the menu every time it is displayed, see - * {@link #onPrepareOptionsMenu}. - * - *

The default implementation populates the menu with standard system - * menu items. These are placed in the {@link 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 - * {@link #onOptionsItemSelected} method to handle them there. - * - * @param menu The options menu in which you place your items. - * @return You must return true for the menu to be displayed; - * if you return false it will not be shown. - * @see #onPrepareOptionsMenu - * @see #onOptionsItemSelected - */ @Override public boolean onCreateOptionsMenu(final Menu menu) { return delegate.onCreateOptionsMenu(menu); @@ -1627,13 +1011,6 @@ public boolean onCreatePanelMenu(final int featureId, final Menu menu) { return delegate.onCreatePanelMenu(featureId, menu); } - /** - * Default implementation of - * {@link Window.Callback#onCreatePanelView} - * for activities. This - * simply returns null so that all panel sub-windows will have the default - * menu behavior. - */ @Nullable @Override public View onCreatePanelView(final int featureId) { @@ -1645,24 +1022,6 @@ public void onCreateSupportNavigateUpTaskStack(@NonNull final TaskStackBuilder b delegate.onCreateSupportNavigateUpTaskStack(builder); } - /** - * Generate a new thumbnail for this activity. This method is called before - * pausing the activity, and should draw into outBitmap the - * imagery for the desired thumbnail in the dimensions of that bitmap. It - * can use the given canvas, which is configured to draw into the - * bitmap, for rendering if desired. - * - *

The default implementation returns fails and does not draw a thumbnail; - * this will result in the platform creating its own thumbnail if needed. - * - * @param outBitmap The bitmap to contain the thumbnail. - * @param canvas Can be used to render into the bitmap. - * @return Return true if you have drawn into the bitmap; otherwise after - * you return it will be filled with a default thumbnail. - * @see #onCreateDescription - * @see #onSaveInstanceState - * @see #onPause - */ @Override public boolean onCreateThumbnail(final Bitmap outBitmap, final Canvas canvas) { return delegate.onCreateThumbnail(outBitmap, canvas); @@ -1684,53 +1043,16 @@ public void onDestroy() { delegate.onDestroy(); } - /** - * Called when the main window associated with the activity has been - * detached from the window manager. - * See {@link View#onDetachedFromWindow() View.onDetachedFromWindow()} - * for more information. - * - * @see View#onDetachedFromWindow - */ @Override public void onDetachedFromWindow() { delegate.onDetachedFromWindow(); } - /** - * Activities cannot draw during the period that their windows are animating in. In order - * to know when it is safe to begin drawing they can override this method which will be - * called when the entering animation has completed. - */ @Override public void onEnterAnimationComplete() { delegate.onEnterAnimationComplete(); } - /** - * Called when a generic motion event was not handled by any of the - * views inside of the activity. - *

- * Generic motion events describe joystick movements, mouse hovers, track pad - * touches, scroll wheel movements and other input events. The - * {@link MotionEvent#getSource() source} of the motion event specifies - * the class of input that was received. Implementations of this method - * must examine the bits in the source before processing the event. - * The following code example shows how this is done. - *

- * Generic motion events with source class - * {@link InputDevice#SOURCE_CLASS_POINTER} - * are delivered to the view under the pointer. All other generic motion events are - * delivered to the focused view. - *

- * See {@link View#onGenericMotionEvent(MotionEvent)} for an example of how to - * handle this event. - *

- * - * @param event The generic motion event being processed. - * @return Return true if you have consumed the event, false if you haven't. - * The default implementation always returns false. - */ @Override public boolean onGenericMotionEvent(final MotionEvent event) { return delegate.onGenericMotionEvent(event); @@ -1741,77 +1063,31 @@ public boolean onKeyDown(final int keyCode, final KeyEvent event) { return delegate.onKeyDown(keyCode, event); } - /** - * Default implementation of {@link KeyEvent.Callback#onKeyLongPress(int, KeyEvent) - * KeyEvent.Callback.onKeyLongPress()}: always returns false (doesn't handle - * the event). - */ @Override public boolean onKeyLongPress(final int keyCode, final KeyEvent event) { return delegate.onKeyLongPress(keyCode, event); } - /** - * Default implementation of {@link KeyEvent.Callback#onKeyMultiple(int, int, KeyEvent) - * KeyEvent.Callback.onKeyMultiple()}: always returns false (doesn't handle - * the event). - */ @Override public boolean onKeyMultiple(final int keyCode, final int repeatCount, final KeyEvent event) { return delegate.onKeyMultiple(keyCode, repeatCount, event); } - /** - * Called when a key shortcut event is not handled by any of the views in the Activity. - * Override this method to implement global key shortcuts for the Activity. - * Key shortcuts can also be implemented by setting the - * {@link MenuItem#setShortcut(char, char) shortcut} property of menu items. - * - * @param keyCode The value in event.getKeyCode(). - * @param event Description of the key event. - * @return True if the key shortcut was handled. - */ @Override public boolean onKeyShortcut(final int keyCode, final KeyEvent event) { return delegate.onKeyShortcut(keyCode, event); } - /** - * Called when a key was released and not handled by any of the views - * inside of the activity. So, for example, key presses while the cursor - * is inside a TextView will not trigger the event (unless it is a navigation - * to another object) because TextView handles its own key presses. - * - *

The default implementation handles KEYCODE_BACK to stop the activity - * and go back. - * - * @return Return true to prevent this event from being propagated - * further, or false to indicate that you have not handled - * this event and it should continue to be propagated. - * @see #onKeyDown - * @see KeyEvent - */ @Override public boolean onKeyUp(final int keyCode, final KeyEvent event) { return delegate.onKeyUp(keyCode, event); } - /** - * Callback to indicate that {@link #startLocalVoiceInteraction(Bundle)} has resulted in a - * voice interaction session being started. You can now retrieve a voice interactor using - * {@link #getVoiceInteractor()}. - */ @Override public void onLocalVoiceInteractionStarted() { delegate.onLocalVoiceInteractionStarted(); } - /** - * Callback to indicate that the local voice interaction has stopped either - * because it was requested through a call to {@link #stopLocalVoiceInteraction()} - * or because it was canceled by the user. The previously acquired {@link VoiceInteractor} - * is no longer valid after this. - */ @Override public void onLocalVoiceInteractionStopped() { delegate.onLocalVoiceInteractionStopped(); @@ -1838,41 +1114,11 @@ public void onMultiWindowModeChanged(final boolean isInMultiWindowMode, delegate.onMultiWindowModeChanged(isInMultiWindowMode, newConfig); } - /** - * This method is called whenever the user chooses to navigate Up within your application's - * activity hierarchy from the action bar. - * - *

If the attribute {@link android.R.attr#parentActivityName parentActivityName} - * was specified in the manifest for this activity or an activity-alias to it, - * default Up navigation will be handled automatically. If any activity - * along the parent chain requires extra Intent arguments, the Activity subclass - * should override the method {@link #onPrepareNavigateUpTaskStack(TaskStackBuilder)} - * to supply those arguments.

- * - *

See Tasks and Back - * Stack - * from the developer guide and Navigation - * from the design guide for more information about navigating within your app.

- * - *

See the {@link TaskStackBuilder} class and the Activity methods - * {@link #getParentActivityIntent()}, {@link #shouldUpRecreateTask(Intent)}, and - * {@link #navigateUpTo(Intent)} for help implementing custom Up navigation. - * The AppNavigation sample application in the Android SDK is also available for reference.

- * - * @return true if Up navigation completed successfully and this Activity was finished, - * false otherwise. - */ @Override public boolean onNavigateUp() { return delegate.onNavigateUp(); } - /** - * 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). - * - * @param child The activity making the call. - */ @Override public boolean onNavigateUpFromChild(final Activity child) { return delegate.onNavigateUpFromChild(child); @@ -1883,34 +1129,11 @@ public void onNewIntent(final Intent intent) { delegate.onNewIntent(intent); } - /** - * This hook is called whenever an item in your options menu is selected. - * The default implementation simply returns false to have the normal - * processing happen (calling the item's Runnable or sending a message to - * its Handler as appropriate). You can use this method for any items - * for which you would like to do processing without those other - * facilities. - * - *

Derived classes should call through to the base class for it to - * perform the default menu handling.

- * - * @param item The menu item that was selected. - * @return boolean Return false to allow normal menu processing to - * proceed, true to consume it here. - * @see #onCreateOptionsMenu - */ @Override public boolean onOptionsItemSelected(final MenuItem item) { return delegate.onOptionsItemSelected(item); } - /** - * This hook is called whenever the options menu is being closed (either by the user canceling - * the menu with the back/menu button, or when an item is selected). - * - * @param menu The options menu as last shown or first initialized by - * onCreateOptionsMenu(). - */ @Override public void onOptionsMenuClosed(final Menu menu) { delegate.onOptionsMenuClosed(menu); @@ -1937,16 +1160,6 @@ public void onPictureInPictureModeChanged(final boolean isInPictureInPictureMode delegate.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig); } - /** - * This is the same as {@link #onPostCreate(Bundle)} but is called for activities - * created with the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. - * - * @param savedInstanceState The data most recently supplied in {@link #onSaveInstanceState} - * @param persistentState The data caming from the PersistableBundle first - * saved in {@link #onSaveInstanceState(Bundle, PersistableBundle)}. - * @see #onCreate - */ @Override public void onPostCreate(@Nullable final Bundle savedInstanceState, @Nullable final PersistableBundle persistentState) { @@ -1964,8 +1177,7 @@ public void onPostResume() { } /** - * @deprecated Old no-arguments version of - * {@link #onPrepareDialog(int, Dialog, Bundle)}. + * @deprecated */ @Override public void onPrepareDialog(final int id, final Dialog dialog) { @@ -1973,67 +1185,18 @@ public void onPrepareDialog(final int id, final Dialog dialog) { } /** - * Provides an opportunity to prepare a managed dialog before it is being - * shown. The default implementation calls through to - * {@link #onPrepareDialog(int, Dialog)} for compatibility. - * - *

- * Override this if you need to update a managed dialog based on the state - * of the application each time it is shown. For example, a time picker - * dialog might want to be updated with the current time. You should call - * through to the superclass's implementation. The default implementation - * will set this Activity as the owner activity on the Dialog. - * - * @param id The id of the managed dialog. - * @param dialog The dialog. - * @param args The dialog arguments provided to {@link #showDialog(int, Bundle)}. - * @see #onCreateDialog(int, Bundle) - * @see #showDialog(int) - * @see #dismissDialog(int) - * @see #removeDialog(int) - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ @Override public void onPrepareDialog(final int id, final Dialog dialog, final Bundle args) { delegate.onPrepareDialog(id, dialog, args); } - /** - * Prepare the synthetic task stack that will be generated during Up navigation - * from a different task. - * - *

This method receives the {@link android.app.TaskStackBuilder} with the constructed series - * of - * Intents as generated by {@link #onCreateNavigateUpTaskStack(android.app.TaskStackBuilder)}. - * If any extra data should be added to these intents before launching the new task, - * the application should override this method and add that data here.

- * - * @param builder A TaskStackBuilder that has been populated with Intents by - * onCreateNavigateUpTaskStack. - */ @Override public void onPrepareNavigateUpTaskStack(final android.app.TaskStackBuilder builder) { delegate.onPrepareNavigateUpTaskStack(builder); } - /** - * Prepare the Screen's standard options menu to be displayed. This is - * called right before the menu is shown, every time it is shown. You can - * use this method to efficiently enable/disable items or otherwise - * dynamically modify the contents. - * - *

The default implementation updates the system menu items based on the - * activity's state. Deriving classes should always call through to the - * base class implementation. - * - * @param menu The options menu as last shown or first initialized by - * onCreateOptionsMenu(). - * @return You must return true for the menu to be displayed; - * if you return false it will not be shown. - * @see #onCreateOptionsMenu - */ @Override public boolean onPrepareOptionsMenu(final Menu menu) { return delegate.onPrepareOptionsMenu(menu); @@ -2054,41 +1217,11 @@ public void onPrepareSupportNavigateUpTaskStack(@NonNull final TaskStackBuilder delegate.onPrepareSupportNavigateUpTaskStack(builder); } - /** - * This is called when the user is requesting an assist, to provide references - * to content related to the current activity. Before being called, the - * {@code outContent} Intent is filled with the base Intent of the activity (the Intent - * returned by {@link #getIntent()}). The Intent's extras are stripped of any types - * that are not valid for {@link PersistableBundle} or non-framework Parcelables, and - * the flags {@link Intent#FLAG_GRANT_WRITE_URI_PERMISSION} and - * {@link Intent#FLAG_GRANT_PERSISTABLE_URI_PERMISSION} are cleared from the Intent. - * - *

Custom implementation may adjust the content intent to better reflect the top-level - * context of the activity, and fill in its ClipData with additional content of - * interest that the user is currently viewing. For example, an image gallery application - * that has launched in to an activity allowing the user to swipe through pictures should - * modify the intent to reference the current image they are looking it; such an - * application when showing a list of pictures should add a ClipData that has - * references to all of the pictures currently visible on screen.

- * - * @param outContent The assist content to return. - */ @Override public void onProvideAssistContent(final AssistContent outContent) { delegate.onProvideAssistContent(outContent); } - /** - * This is called when the user is requesting an assist, to build a full - * {@link Intent#ACTION_ASSIST} Intent with all of the context of the current - * application. You can override this method to place into the bundle anything - * you would like to appear in the {@link Intent#EXTRA_ASSIST_CONTEXT} part - * of the assist Intent. - * - *

This function will be called after any global assist callbacks that had - * been registered with {@link Application#registerOnProvideAssistDataListener - * Application.registerOnProvideAssistDataListener}. - */ @Override public void onProvideAssistData(final Bundle data) { delegate.onProvideAssistData(data); @@ -2100,12 +1233,6 @@ public void onProvideKeyboardShortcuts(final List data, f delegate.onProvideKeyboardShortcuts(data, menu, deviceId); } - /** - * Override to generate the desired referrer for the content currently being shown - * by the app. The default implementation returns null, meaning the referrer will simply - * be the android-app: of the package name of this activity. Return a non-null Uri to - * have that supplied as the {@link Intent#EXTRA_REFERRER} of any activities started from it. - */ @Override public Uri onProvideReferrer() { return delegate.onProvideReferrer(); @@ -2117,76 +1244,17 @@ public void onRequestPermissionsResult(final int requestCode, delegate.onRequestPermissionsResult(requestCode, permissions, grantResults); } - /** - * Called after {@link #onStop} when the current activity is being - * re-displayed to the user (the user has navigated back to it). It will - * be followed by {@link #onStart} and then {@link #onResume}. - * - *

For activities that are using raw {@link Cursor} objects (instead of - * creating them through - * {@link #managedQuery(Uri, String[], String, String[], String)}, - * this is usually the place - * where the cursor should be requeried (because you had deactivated it in - * {@link #onStop}. - * - *

Derived classes must call through to the super class's - * implementation of this method. If they do not, an exception will be - * thrown.

- * - * @see #onStop - * @see #onStart - * @see #onResume - */ @Override public void onRestart() { delegate.onRestart(); } - /** - * This is the same as {@link #onRestoreInstanceState(Bundle)} but is called for activities - * created with the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. The {@link PersistableBundle} passed - * came from the restored PersistableBundle first - * saved in {@link #onSaveInstanceState(Bundle, PersistableBundle)}. - * - *

This method is called between {@link #onStart} and - * {@link #onPostCreate}. - * - *

If this method is called {@link #onRestoreInstanceState(Bundle)} will not be called. - * - * @param savedInstanceState the data most recently supplied in {@link #onSaveInstanceState}. - * @param persistentState the data most recently supplied in {@link #onSaveInstanceState}. - * @see #onRestoreInstanceState(Bundle) - * @see #onCreate - * @see #onPostCreate - * @see #onResume - * @see #onSaveInstanceState - */ @Override public void onRestoreInstanceState(final Bundle savedInstanceState, final PersistableBundle persistentState) { delegate.onRestoreInstanceState(savedInstanceState, persistentState); } - /** - * This method is called after {@link #onStart} when the activity is - * being re-initialized from a previously saved state, given here in - * savedInstanceState. Most implementations will simply use {@link #onCreate} - * to restore their state, but it is sometimes convenient to do it here - * after all of the initialization has been done or to allow subclasses to - * decide whether to use your default implementation. The default - * implementation of this method performs a restore of any view state that - * had previously been frozen by {@link #onSaveInstanceState}. - * - *

This method is called between {@link #onStart} and - * {@link #onPostCreate}. - * - * @param savedInstanceState the data most recently supplied in {@link #onSaveInstanceState}. - * @see #onCreate - * @see #onPostCreate - * @see #onResume - * @see #onSaveInstanceState - */ @Override public void onRestoreInstanceState(final Bundle savedInstanceState) { delegate.onRestoreInstanceState(savedInstanceState); @@ -2220,20 +1288,6 @@ final public Object onRetainCustomNonConfigurationInstance() { return delegate.onRetainNonConfigurationInstance(); } - /** - * This is the same as {@link #onSaveInstanceState} but is called for activities - * created with the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. The {@link PersistableBundle} passed - * in will be saved and presented in {@link #onCreate(Bundle, PersistableBundle)} - * the first time that this activity is restarted following the next device reboot. - * - * @param outState Bundle in which to place your saved state. - * @param outPersistentState State which will be saved across reboots. - * @see #onSaveInstanceState(Bundle) - * @see #onCreate - * @see #onRestoreInstanceState(Bundle, PersistableBundle) - * @see #onPause - */ @Override public void onSaveInstanceState(final Bundle outState, final PersistableBundle outPersistentState) { @@ -2245,36 +1299,11 @@ public void onSaveInstanceState(final Bundle outState) { delegate.onSaveInstanceState(outState); } - /** - * This hook is called when the user signals the desire to start a search. - * - *

You can use this function as a simple way to launch the search UI, in response to a - * menu item, search button, or other widgets within your activity. Unless overidden, - * calling this function is the same as calling - * {@link #startSearch startSearch(null, false, null, false)}, which launches - * search for the current activity as specified in its manifest, see {@link SearchManager}. - * - *

You can override this function to force global search, e.g. in response to a dedicated - * search key, or to block search entirely (by simply returning false). - * - *

Note: when running in a {@link Configuration#UI_MODE_TYPE_TELEVISION}, the default - * implementation changes to simply return false and you must supply your own custom - * implementation if you want to support search.

- * - * @param searchEvent The {@link SearchEvent} that signaled this search. - * @return Returns {@code true} if search launched, and {@code false} if the activity does - * not respond to search. The default implementation always returns {@code true}, except - * when in {@link Configuration#UI_MODE_TYPE_TELEVISION} mode where it returns false. - * @see SearchManager - */ @Override public boolean onSearchRequested(@Nullable final SearchEvent searchEvent) { return delegate.onSearchRequested(searchEvent); } - /** - * @see #onSearchRequested(SearchEvent) - */ @Override public boolean onSearchRequested() { return delegate.onSearchRequested(); @@ -2323,33 +1352,11 @@ public void onTitleChanged(final CharSequence title, final int color) { delegate.onTitleChanged(title, color); } - /** - * 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. - * - * @param event The touch screen event being processed. - * @return Return true if you have consumed the event, false if you haven't. - * The default implementation always returns false. - */ @Override public boolean onTouchEvent(final MotionEvent event) { return delegate.onTouchEvent(event); } - /** - * Called when the trackball was moved and not handled by any of the - * views inside of the activity. So, for example, if the trackball moves - * while focus is on a button, you will receive a call here because - * buttons do not normally do anything with trackball events. 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. - * - * @param event The trackball event being processed. - * @return Return true if you have consumed the event, false if you haven't. - * The default implementation always returns false. - */ @Override public boolean onTrackballEvent(final MotionEvent event) { return delegate.onTrackballEvent(event); @@ -2360,62 +1367,18 @@ public void onTrimMemory(final int level) { delegate.onTrimMemory(level); } - /** - * Called whenever a key, touch, or trackball event is dispatched to the - * activity. Implement this method if you wish to know that the user has - * interacted with the device in some way while your activity is running. - * This callback and {@link #onUserLeaveHint} are intended to help - * activities manage status bar notifications intelligently; specifically, - * for helping activities determine the proper time to cancel a notfication. - * - *

All calls to your activity's {@link #onUserLeaveHint} callback will - * be accompanied by calls to {@link #onUserInteraction}. This - * ensures that your activity will be told of relevant user activity such - * as pulling down the notification pane and touching an item there. - * - *

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. - * - * @see #onUserLeaveHint() - */ @Override public void onUserInteraction() { delegate.onUserInteraction(); } - /** - * 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, {@link #onUserLeaveHint} will be called, but - * when an incoming phone call causes the in-call Activity to be automatically - * brought to the foreground, {@link #onUserLeaveHint} will not be called on - * the activity being interrupted. In cases when it is invoked, this method - * is called right before the activity's {@link #onPause} callback. - * - *

This callback and {@link #onUserInteraction} are intended to help - * activities manage status bar notifications intelligently; specifically, - * for helping activities determine the proper time to cancel a notfication. - * - * @see #onUserInteraction() - */ @Override public void onUserLeaveHint() { delegate.onUserLeaveHint(); } /** - * Called when a translucent activity over this activity is becoming opaque or another - * activity is being launched. Activities that override this method must call - * super.onVisibleBehindCanceled() or a SuperNotCalledException will be thrown. - * - *

When this method is called the activity has 500 msec to release any resources it may be - * using while visible in the background. - * If the activity has not returned from this method in 500 msec the system will destroy - * the activity and kill the process in order to recover the resources for another - * process. Otherwise {@link #onStop()} will be called following return. - * - * @see #requestVisibleBehind(boolean) + * @deprecated */ @Override public void onVisibleBehindCanceled() { @@ -2427,48 +1390,11 @@ public void onWindowAttributesChanged(final WindowManager.LayoutParams params) { delegate.onWindowAttributesChanged(params); } - /** - * Called when the current {@link Window} of the activity gains or loses - * focus. This is the best indicator of whether this activity is visible - * to the user. The default implementation clears the key tracking - * state, so should always be called. - * - *

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 (an - * activity that is stopped will not generally get window focus), you - * should not rely on any particular order between the callbacks here and - * those in the other lifecycle methods such as {@link #onResume}. - * - *

As a general rule, however, a resumed activity will have window - * focus... unless it has displayed other dialogs or popups that take - * input focus, in which case the activity itself will not have focus - * when the other windows have it. Likewise, the system may display - * system-level windows (such as the status bar notification panel or - * a system alert) which will temporarily take window input focus without - * pausing the foreground activity. - * - * @param hasFocus Whether the window of this activity has focus. - * @see #hasWindowFocus() - * @see #onResume - * @see View#onWindowFocusChanged(boolean) - */ @Override public void onWindowFocusChanged(final boolean hasFocus) { delegate.onWindowFocusChanged(hasFocus); } - /** - * Give the Activity a chance to control the UI for an action mode requested - * by the system. - * - *

Note: If you are looking for a notification callback that an action mode - * has been started for this activity, see {@link #onActionModeStarted(android.view.ActionMode)}.

- * - * @param callback The callback that should control the new action mode - * @return The new action mode, or null if the activity does not want to - * provide special handling for this action mode. (It will be handled by the system.) - */ @Nullable @Override public android.view.ActionMode onWindowStartingActionMode( @@ -2476,9 +1402,6 @@ public android.view.ActionMode onWindowStartingActionMode( return delegate.onWindowStartingActionMode(callback); } - /** - * {@inheritDoc} - */ @Nullable @Override public android.view.ActionMode onWindowStartingActionMode( @@ -2493,13 +1416,6 @@ public ActionMode onWindowStartingSupportActionMode( return delegate.onWindowStartingSupportActionMode(callback); } - /** - * Programmatically opens the context menu for a particular {@code view}. - * The {@code view} should have been added via - * {@link #registerForContextMenu(View)}. - * - * @param view The view to show the context menu for. - */ @Override public void openContextMenu(final View view) { delegate.openContextMenu(view); @@ -2541,46 +1457,19 @@ public SQLiteDatabase openOrCreateDatabase(final String name, final int mode, return delegate.openOrCreateDatabase(name, mode, factory, errorHandler); } - /** - * Call immediately after one of the flavors of {@link #startActivity(Intent)} - * or {@link #finish} to specify an explicit transition animation to - * perform next. - * - *

As of {@link Build.VERSION_CODES#JELLY_BEAN} an alternative - * to using this with starting activities is to supply the desired animation - * information through a {@link ActivityOptions} bundle to - * {@link #startActivity(Intent, Bundle)} or a related function. This allows - * you to specify a custom animation even when starting an activity from - * outside the context of the current top activity. - * - * @param enterAnim A resource ID of the animation resource to use for - * the incoming activity. Use 0 for no animation. - * @param exitAnim A resource ID of the animation resource to use for - */ @Override public void overridePendingTransition(final int enterAnim, final int exitAnim) { delegate.overridePendingTransition(enterAnim, exitAnim); } + /** + * @deprecated + */ @Override public Drawable peekWallpaper() { return delegate.peekWallpaper(); } - /** - * Postpone the entering activity transition when Activity was started with - * {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * Pair[])}. - *

This method gives the Activity the ability to delay starting the entering and - * shared element transitions until all data is loaded. Until then, the Activity won't - * draw into its window, leaving the window transparent. This may also cause the - * returning animation to be delayed until data is ready. This method should be - * called in {@link #onCreate(Bundle)} or in - * {@link #onActivityReenter(int, Intent)}. - * {@link #startPostponedEnterTransition()} must be called to allow the Activity to - * start the transitions. If the Activity did not use - * {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * Pair[])}, then this method - * does nothing.

- */ @Override public void postponeEnterTransition() { delegate.postponeEnterTransition(); @@ -2591,42 +1480,16 @@ public void putExtraData(final SupportActivity.ExtraData extraData) { delegate.putExtraData(extraData); } - /** - * Cause this Activity to be recreated with a new instance. This results - * in essentially the same flow as when the Activity is created due to - * a configuration change -- the current instance will go through its - * lifecycle to {@link #onDestroy} and a new instance then created after it. - */ @Override public void recreate() { delegate.recreate(); } - /** - * Add a new {@link ComponentCallbacks} to the base application of the - * Context, which will be called at the same times as the ComponentCallbacks - * methods of activities and other components are called. Note that you - * must be sure to use {@link #unregisterComponentCallbacks} when - * appropriate in the future; this will not be removed for you. - * - * @param callback The interface to call. This can be either a - * {@link ComponentCallbacks} or {@link ComponentCallbacks2} interface. - */ @Override public void registerComponentCallbacks(final ComponentCallbacks callback) { delegate.registerComponentCallbacks(callback); } - /** - * Registers a context menu to be shown for the given view (multiple views - * can show the context menu). This method will set the - * {@link OnCreateContextMenuListener} on the view to this activity, so - * {@link #onCreateContextMenu(ContextMenu, View, ContextMenuInfo)} will be - * called when it is time to show the context menu. - * - * @param view The view that should show a context menu. - * @see #unregisterForContextMenu(View) - */ @Override public void registerForContextMenu(final View view) { delegate.registerForContextMenu(view); @@ -2655,94 +1518,39 @@ public Intent registerReceiver(final BroadcastReceiver receiver, final IntentFil return delegate.registerReceiver(receiver, filter, broadcastPermission, scheduler, flags); } - /** - * Ask that the local app instance of this activity be released to free up its memory. - * This is asking for the activity to be destroyed, but does not finish the activity -- - * a new instance of the activity will later be re-created if needed due to the user - * navigating back to it. - * - * @return Returns true if the activity was in a state that it has started the process - * of destroying its current instance; returns false if for any reason this could not - * be done: it is currently visible to the user, it is already being destroyed, it is - * being finished, it hasn't yet saved its state, etc. - */ @Override public boolean releaseInstance() { return delegate.releaseInstance(); } + /** + * @deprecated + */ @Override public void removeStickyBroadcast(final Intent intent) { delegate.removeStickyBroadcast(intent); } + /** + * @deprecated + */ @Override public void removeStickyBroadcastAsUser(final Intent intent, final UserHandle user) { delegate.removeStickyBroadcastAsUser(intent, user); } - /** - * Report to the system that your app is now fully drawn, purely for diagnostic - * purposes (calling it does not impact the visible behavior of the activity). - * This is only used to help instrument application launch times, so that the - * app can report when it is fully in a usable state; without this, the only thing - * the system itself can determine is the point at which the activity's window - * is first drawn and displayed. To participate in app launch time - * measurement, you should always call this method after first launch (when - * {@link #onCreate(Bundle)} is called), at the point where you have - * entirely drawn your UI and populated with all of the significant data. You - * can safely call this method any time after first launch as well, in which case - * it will simply be ignored. - */ @Override public void reportFullyDrawn() { delegate.reportFullyDrawn(); } - /** - * Create {@link DragAndDropPermissions} object bound to this activity and controlling the - * access permissions for content URIs associated with the {@link DragEvent}. - * - * @param event Drag event - * @return The {@link DragAndDropPermissions} object used to control access to the content URIs. - * Null if no content URIs are associated with the event or if permissions could not be - * granted. - */ @Override public DragAndDropPermissions requestDragAndDropPermissions(final DragEvent event) { return delegate.requestDragAndDropPermissions(event); } /** - * Activities that want to remain visible behind a translucent activity above them must call - * this method anytime between the start of {@link #onResume()} and the return from - * {@link #onPause()}. If this call is successful then the activity will remain visible after - * {@link #onPause()} is called, and is allowed to continue playing media in the background. - * - *

The actions of this call are reset each time that this activity is brought to the - * front. That is, every time {@link #onResume()} is called the activity will be assumed - * to not have requested visible behind. Therefore, if you want this activity to continue to - * be visible in the background you must call this method again. - * - *

Only fullscreen opaque activities may make this call. I.e. this call is a nop - * for dialog and translucent activities. - * - *

Under all circumstances, the activity must stop playing and release resources prior to or - * within a call to {@link #onVisibleBehindCanceled()} or if this call returns false. - * - *

False will be returned any time this method is called between the return of onPause and - * the next call to onResume. - * - * @param visible true to notify the system that the activity wishes to be visible behind other - * translucent activities, false to indicate otherwise. Resources must be - * released when passing false to this method. - * @return the resulting visibiity state. If true the activity will remain visible beyond - * {@link #onPause()} if the next activity is translucent or not fullscreen. If false - * then the activity may not count on being visible behind other translucent activities, - * and must stop any media playback and release resources. - * Returning false may occur in lieu of a call to {@link #onVisibleBehindCanceled()} so - * the return value must be checked. - * @see #onVisibleBehindCanceled() + * @deprecated */ @Override public boolean requestVisibleBehind(final boolean visible) { @@ -2803,16 +1611,25 @@ public void sendOrderedBroadcastAsUser(final Intent intent, final UserHandle use scheduler, initialCode, initialData, initialExtras); } + /** + * @deprecated + */ @Override public void sendStickyBroadcast(final Intent intent) { delegate.sendStickyBroadcast(intent); } + /** + * @deprecated + */ @Override public void sendStickyBroadcastAsUser(final Intent intent, final UserHandle user) { delegate.sendStickyBroadcastAsUser(intent, user); } + /** + * @deprecated + */ @Override public void sendStickyOrderedBroadcast(final Intent intent, final BroadcastReceiver resultReceiver, final Handler scheduler, final int initialCode, @@ -2821,6 +1638,9 @@ public void sendStickyOrderedBroadcast(final Intent intent, initialData, initialExtras); } + /** + * @deprecated + */ @Override public void sendStickyOrderedBroadcastAsUser(final Intent intent, final UserHandle user, final BroadcastReceiver resultReceiver, final Handler scheduler, final int initialCode, @@ -2829,32 +1649,11 @@ public void sendStickyOrderedBroadcastAsUser(final Intent intent, final UserHand initialCode, initialData, initialExtras); } - /** - * Set a {@link android.widget.Toolbar Toolbar} to act as the {@link ActionBar} for this - * Activity window. - * - *

When set to a non-null value the {@link #getActionBar()} method will return - * an {@link ActionBar} object that can be used to control the given toolbar as if it were - * a traditional window decor action bar. The toolbar's menu will be populated with the - * Activity's options menu and the navigation button will be wired through the standard - * {@link android.R.id#home home} menu select action.

- * - *

In order to use a Toolbar within the Activity's window content the application - * must not request the window feature {@link Window#FEATURE_ACTION_BAR FEATURE_ACTION_BAR}.

- * - * @param toolbar Toolbar to set as the Activity's action bar, or {@code null} to clear it - */ @Override public void setActionBar(@Nullable final android.widget.Toolbar toolbar) { delegate.setActionBar(toolbar); } - /** - * Set the {@link TransitionManager} to use for default transitions in this window. - * Requires {@link Window#FEATURE_CONTENT_TRANSITIONS}. - * - * @param tm The TransitionManager to use for scene changes. - */ @Override public void setContentTransitionManager(final TransitionManager tm) { delegate.setContentTransitionManager(tm); @@ -2880,14 +1679,6 @@ public void setEnterSharedElementCallback(final SharedElementCallback callback) delegate.setEnterSharedElementCallback(callback); } - /** - * When {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * View, String)} was used - * to start an Activity, callback - * will be called to handle shared elements on the launched Activity. This requires - * {@link Window#FEATURE_ACTIVITY_TRANSITIONS}. - * - * @param callback Used to manipulate shared element transitions on the launched Activity. - */ @Override public void setEnterSharedElementCallback(final android.app.SharedElementCallback callback) { delegate.setEnterSharedElementCallback(callback); @@ -2898,57 +1689,21 @@ public void setExitSharedElementCallback(final SharedElementCallback listener) { delegate.setExitSharedElementCallback(listener); } - /** - * When {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * View, String)} was used - * to start an Activity, callback - * will be called to handle shared elements on the launching Activity. Most - * calls will only come when returning from the started Activity. - * This requires {@link Window#FEATURE_ACTIVITY_TRANSITIONS}. - * - * @param callback Used to manipulate shared element transitions on the launching Activity. - */ @Override public void setExitSharedElementCallback(final android.app.SharedElementCallback callback) { delegate.setExitSharedElementCallback(callback); } - /** - * Sets whether this activity is finished when touched outside its window's - * bounds. - */ @Override public void setFinishOnTouchOutside(final boolean finish) { delegate.setFinishOnTouchOutside(finish); } - /** - * Adjust the current immersive mode setting. - * - * Note that changing this value will have no effect on the activity's - * {@link ActivityInfo} structure; that is, if - * android:immersive is set to true - * in the application's manifest entry for this activity, the {@link - * ActivityInfo#flags ActivityInfo.flags} member will - * always have its {@link ActivityInfo#FLAG_IMMERSIVE - * FLAG_IMMERSIVE} bit set. - * - * @see #isImmersive() - * @see ActivityInfo#FLAG_IMMERSIVE - */ @Override public void setImmersive(final boolean i) { delegate.setImmersive(i); } - /** - * Change the intent returned by {@link #getIntent}. This holds a - * reference to the given intent; it does not copy it. Often used in - * conjunction with {@link #onNewIntent}. - * - * @param newIntent The new Intent object to return from getIntent - * @see #getIntent - * @see #onNewIntent - */ @Override public void setIntent(final Intent newIntent) { delegate.setIntent(newIntent); @@ -2959,21 +1714,16 @@ public void setPictureInPictureParams(final PictureInPictureParams params) { delegate.setPictureInPictureParams(params); } - /** - * Change the desired orientation of this activity. If the activity - * is currently in the foreground or otherwise impacting the screen - * orientation, the screen will immediately be changed (possibly causing - * the activity to be restarted). Otherwise, this will be used the next - * time the activity is visible. - * - * @param requestedOrientation An orientation constant as used in - * {@link ActivityInfo#screenOrientation ActivityInfo.screenOrientation}. - */ @Override public void setRequestedOrientation(final int requestedOrientation) { delegate.setRequestedOrientation(requestedOrientation); } + @Override + public void setShowWhenLocked(final boolean showWhenLocked) { + delegate.setShowWhenLocked(showWhenLocked); + } + @Override public void setSupportActionBar(@Nullable final Toolbar toolbar) { delegate.setSupportActionBar(toolbar); @@ -3011,18 +1761,6 @@ public void setSupportProgressBarVisibility(final boolean visible) { delegate.setSupportProgressBarVisibility(visible); } - /** - * Sets information describing the task with this activity for presentation inside the Recents - * System UI. When {@link ActivityManager#getRecentTasks} is called, the activities of each task - * are traversed in order from the topmost activity to the bottommost. The traversal continues - * for each property until a suitable value is found. For each task the taskDescription will be - * returned in {@link ActivityManager.TaskDescription}. - * - * @param taskDescription The TaskDescription properties that describe the task with this - * activity - * @see ActivityManager#getRecentTasks - * @see ActivityManager.TaskDescription - */ @Override public void setTaskDescription(final ActivityManager.TaskDescription taskDescription) { delegate.setTaskDescription(taskDescription); @@ -3033,112 +1771,34 @@ public void setTheme(@StyleRes final int resid) { delegate.setTheme(resid); } - /** - * Change the title associated with this activity. If this is a - * top-level activity, the title for its window will change. If it - * is an embedded activity, the parent can do whatever it wants - * with it. - */ @Override public void setTitle(final CharSequence title) { delegate.setTitle(title); } - /** - * Change the title associated with this activity. If this is a - * top-level activity, the title for its window will change. If it - * is an embedded activity, the parent can do whatever it wants - * with it. - */ @Override public void setTitle(final int titleId) { delegate.setTitle(titleId); } /** - * Change the color of the title associated with this activity. - *

- * This method is deprecated starting in API Level 11 and replaced by action - * bar styles. For information on styling the Action Bar, read the Action Bar developer - * guide. - * - * @deprecated Use action bar styles instead. + * @deprecated */ @Override public void setTitleColor(final int textColor) { delegate.setTitleColor(textColor); } - /** - * Control whether this activity's main window is visible. This is intended - * only for the special case of an activity that is not going to show a - * UI itself, but can't just finish prior to onResume() because it needs - * to wait for a service binding or such. Setting this to false allows - * you to prevent your UI from being shown during that time. - * - *

The default value for this is taken from the - * {@link android.R.attr#windowNoDisplay} attribute of the activity's theme. - */ + @Override + public void setTurnScreenOn(final boolean turnScreenOn) { + delegate.setTurnScreenOn(turnScreenOn); + } + @Override public void setVisible(final boolean visible) { delegate.setVisible(visible); } - /** - * Enable or disable virtual reality (VR) mode for this Activity. - * - *

VR mode is a hint to Android system to switch to a mode optimized for VR applications - * while this Activity has user focus.

- * - *

It is recommended that applications additionally declare - * {@link android.R.attr#enableVrMode} in their manifest to allow for smooth activity - * transitions when switching between VR activities.

- * - *

If the requested {@link VrListenerService} component is not available, - * VR mode will not be started. Developers can handle this case as follows:

- * - *
-     * String servicePackage = "com.whatever.app";
-     * String serviceClass = "com.whatever.app.MyVrListenerService";
-     *
-     * // Name of the component of the VrListenerService to start.
-     * ComponentName serviceComponent = new ComponentName(servicePackage, serviceClass);
-     *
-     * try {
-     *    setVrModeEnabled(true, myComponentName);
-     * } catch (PackageManager.NameNotFoundException e) {
-     *        List<ApplicationInfo> installed = getPackageManager().getInstalledApplications(0);
-     *        boolean isInstalled = false;
-     *        for (ApplicationInfo app : installed) {
-     *            if (app.packageName.equals(servicePackage)) {
-     *                isInstalled = true;
-     *                break;
-     *            }
-     *        }
-     *        if (isInstalled) {
-     *            // Package is installed, but not enabled in Settings.  Let user enable it.
-     *            startActivity(new Intent(Settings.ACTION_VR_LISTENER_SETTINGS));
-     *        } else {
-     *            // Package is not installed.  Send an intent to download this.
-     *            sentIntentToLaunchAppStore(servicePackage);
-     *        }
-     * }
-     * 
- * - * @param enabled {@code true} to enable this mode. - * @param requestedComponent the name of the component to use as a - * {@link VrListenerService} while VR mode is enabled. - * @throws PackageManager.NameNotFoundException if the given component - * to run as a {@link VrListenerService} is not - * installed, or has - * not been enabled in user settings. - * @see PackageManager#FEATURE_VR_MODE - * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE - * @see VrListenerService - * @see Settings#ACTION_VR_LISTENER_SETTINGS - * @see android.R.attr#enableVrMode - */ @Override public void setVrModeEnabled(final boolean enabled, @NonNull final ComponentName requestedComponent) @@ -3150,6 +1810,9 @@ public void setVrModeEnabled(final boolean enabled, } } + /** + * @deprecated + */ @Override public void setWallpaper(final Bitmap bitmap) throws IOException { try { @@ -3159,6 +1822,9 @@ public void setWallpaper(final Bitmap bitmap) throws IOException { } } + /** + * @deprecated + */ @Override public void setWallpaper(final InputStream data) throws IOException { try { @@ -3168,81 +1834,26 @@ public void setWallpaper(final InputStream data) throws IOException { } } - /** - * Gets whether you should show UI with rationale for requesting a permission. - * You should do this only if you do not have the permission and the context in - * which the permission is requested does not clearly communicate to the user - * what would be the benefit from granting this permission. - *

- * For example, if you write a camera app, requesting the camera permission - * would be expected by the user and no rationale for why it is requested is - * needed. If however, the app needs location for tagging photos then a non-tech - * savvy user may wonder how location is related to taking photos. In this case - * you may choose to show UI with rationale of requesting this permission. - *

- * - * @param permission A permission your app wants to request. - * @return Whether you can show permission rationale UI. - * @see #checkSelfPermission(String) - * @see #requestPermissions(String[], int) - * @see #onRequestPermissionsResult(int, String[], int[]) - */ @Override public boolean shouldShowRequestPermissionRationale(@NonNull final String permission) { return delegate.shouldShowRequestPermissionRationale(permission); } - /** - * Returns true if the app should recreate the task when navigating 'up' from this activity - * by using targetIntent. - * - *

If this method returns false the app can trivially call - * {@link #navigateUpTo(Intent)} using the same parameters to correctly perform - * up navigation. If this method returns false, the app should synthesize a new task stack - * by using {@link TaskStackBuilder} or another similar mechanism to perform up navigation.

- * - * @param targetIntent An intent representing the target destination for up navigation - * @return true if navigating up should recreate a new task stack, false if the same task - * should be used for the destination - */ @Override public boolean shouldUpRecreateTask(final Intent targetIntent) { return delegate.shouldUpRecreateTask(targetIntent); } - /** - * Ask to have the current assistant shown to the user. This only works if the calling - * activity is the current foreground activity. It is the same as calling - * {@link VoiceInteractionService#showSession - * VoiceInteractionService.showSession} and requesting all of the possible context. - * The receiver will always see - * {@link VoiceInteractionSession#SHOW_SOURCE_APPLICATION} set. - * - * @return Returns true if the assistant was successfully invoked, else false. For example - * false will be returned if the caller is not the current top activity. - */ @Override public boolean showAssist(final Bundle args) { return delegate.showAssist(args); } - /** - * Shows the user the system defined message for telling the user how to exit - * lock task mode. The task containing this activity must be in lock task mode at the time - * of this call for the message to be displayed. - */ @Override public void showLockTaskEscapeMessage() { delegate.showLockTaskEscapeMessage(); } - /** - * Start an action mode of the default type {@link android.view.ActionMode#TYPE_PRIMARY}. - * - * @param callback Callback that will manage lifecycle events for this action mode - * @return The ActionMode that was started, or null if it was canceled - * @see android.view.ActionMode - */ @Nullable @Override public android.view.ActionMode startActionMode( @@ -3250,15 +1861,6 @@ public android.view.ActionMode startActionMode( return delegate.startActionMode(callback); } - /** - * Start an action mode of the given type. - * - * @param callback Callback that will manage lifecycle events for this action mode - * @param type One of {@link android.view.ActionMode#TYPE_PRIMARY} or {@link - * android.view.ActionMode#TYPE_FLOATING}. - * @return The ActionMode that was started, or null if it was canceled - * @see android.view.ActionMode - */ @Nullable @Override public android.view.ActionMode startActionMode(final android.view.ActionMode.Callback callback, @@ -3266,75 +1868,21 @@ public android.view.ActionMode startActionMode(final android.view.ActionMode.Cal return delegate.startActionMode(callback, type); } - /** - * Same as {@link #startActivities(Intent[], Bundle)} with no options - * specified. - * - * @param intents The intents to start. - * @see #startActivities(Intent[], Bundle) - * @see #startActivityForResult - */ @Override public void startActivities(final Intent[] intents) { delegate.startActivities(intents); } - /** - * Launch a new activity. You will not receive any information about when - * the activity exits. This implementation overrides the base version, - * providing information about - * the activity performing the launch. Because of this additional - * information, the {@link Intent#FLAG_ACTIVITY_NEW_TASK} launch flag is not - * required; if not specified, the new activity will be added to the - * task of the caller. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param intents The intents to start. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see #startActivities(Intent[]) - * @see #startActivityForResult - */ @Override public void startActivities(final Intent[] intents, @Nullable final Bundle options) { delegate.startActivities(intents, options); } - /** - * Same as {@link #startActivity(Intent, Bundle)} with no options - * specified. - * - * @param intent The intent to start. - * @see #startActivity(Intent, Bundle) - * @see #startActivityForResult - */ @Override public void startActivity(final Intent intent) { delegate.startActivity(intent); } - /** - * Launch a new activity. You will not receive any information about when - * the activity exits. This implementation overrides the base version, - * providing information about - * the activity performing the launch. Because of this additional - * information, the {@link Intent#FLAG_ACTIVITY_NEW_TASK} launch flag is not - * required; if not specified, the new activity will be added to the - * task of the caller. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param intent The intent to start. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see #startActivity(Intent) - * @see #startActivityForResult - */ @Override public void startActivity(final Intent intent, @Nullable final Bundle options) { delegate.startActivity(intent, options); @@ -3351,38 +1899,12 @@ public void startActivityForResult(final Intent intent, final int requestCode, delegate.startActivityForResult(intent, requestCode, options); } - /** - * Same as calling {@link #startActivityFromChild(Activity, Intent, int, Bundle)} - * with no options. - * - * @param child The activity making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @see #startActivity - * @see #startActivityForResult - */ @Override public void startActivityFromChild(@NonNull final Activity child, @RequiresPermission final Intent intent, final int requestCode) { delegate.startActivityFromChild(child, intent, requestCode); } - /** - * This is called when a child activity of this one calls its - * {@link #startActivity} or {@link #startActivityForResult} method. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param child The activity making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see #startActivity - * @see #startActivityForResult - */ @Override public void startActivityFromChild(@NonNull final Activity child, @RequiresPermission final Intent intent, final int requestCode, @@ -3402,39 +1924,12 @@ public void startActivityFromFragment(final Fragment fragment, final Intent inte delegate.startActivityFromFragment(fragment, intent, requestCode, options); } - /** - * Same as calling {@link #startActivityFromFragment(android.app.Fragment, Intent, int, Bundle)} - * with no options. - * - * @param fragment The fragment making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @see android.app.Fragment#startActivity - * @see android.app.Fragment#startActivityForResult - */ @Override public void startActivityFromFragment(@NonNull final android.app.Fragment fragment, @RequiresPermission final Intent intent, final int requestCode) { delegate.startActivityFromFragment(fragment, intent, requestCode); } - /** - * This is called when a Fragment in this activity calls its - * {@link android.app.Fragment#startActivity} or {@link android.app.Fragment#startActivityForResult} - * method. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param fragment The fragment making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see android.app.Fragment#startActivity - * @see android.app.Fragment#startActivityForResult - */ @Override public void startActivityFromFragment(@NonNull final android.app.Fragment fragment, @RequiresPermission final Intent intent, final int requestCode, @@ -3442,53 +1937,12 @@ public void startActivityFromFragment(@NonNull final android.app.Fragment fragme delegate.startActivityFromFragment(fragment, intent, requestCode, options); } - /** - * Same as calling {@link #startActivityIfNeeded(Intent, int, Bundle)} - * with no options. - * - * @param intent The intent to start. - * @param requestCode If >= 0, this code will be returned in - * onActivityResult() when the activity exits, as described in - * {@link #startActivityForResult}. - * @return If a new activity was launched then true is returned; otherwise - * false is returned and you must handle the Intent yourself. - * @see #startActivity - * @see #startActivityForResult - */ @Override public boolean startActivityIfNeeded(@RequiresPermission @NonNull final Intent intent, final int requestCode) { return delegate.startActivityIfNeeded(intent, requestCode); } - /** - * A special variation to launch an activity only if a new activity - * instance is needed to handle the given Intent. In other words, this is - * just like {@link #startActivityForResult(Intent, int)} except: if you are - * using the {@link Intent#FLAG_ACTIVITY_SINGLE_TOP} flag, or - * singleTask or singleTop - * {@link android.R.styleable#AndroidManifestActivity_launchMode launchMode}, - * and the activity - * that handles intent is the same as your currently running - * activity, then a new instance is not needed. In this case, instead of - * the normal behavior of calling {@link #onNewIntent} this function will - * return and you can handle the Intent yourself. - * - *

This function can only be called from a top-level activity; if it is - * called from a child activity, a runtime exception will be thrown. - * - * @param intent The intent to start. - * @param requestCode If >= 0, this code will be returned in - * onActivityResult() when the activity exits, as described in - * {@link #startActivityForResult}. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @return If a new activity was launched then true is returned; otherwise - * false is returned and you must handle the Intent yourself. - * @see #startActivity - * @see #startActivityForResult - */ @Override public boolean startActivityIfNeeded(@RequiresPermission @NonNull final Intent intent, final int requestCode, @Nullable final Bundle options) { @@ -3506,19 +1960,6 @@ public boolean startInstrumentation(final ComponentName className, final String return delegate.startInstrumentation(className, profileFile, arguments); } - /** - * Same as calling {@link #startIntentSender(IntentSender, Intent, int, int, int, Bundle)} - * with no options. - * - * @param intent The IntentSender to launch. - * @param fillInIntent If non-null, this will be provided as the - * intent parameter to {@link IntentSender#sendIntent}. - * @param flagsMask Intent flags in the original IntentSender that you - * would like to change. - * @param flagsValues Desired values for any bits set in - * flagsMask - * @param extraFlags Always set to 0. - */ @Override public void startIntentSender(final IntentSender intent, @Nullable final Intent fillInIntent, final int flagsMask, final int flagsValues, final int extraFlags) @@ -3530,25 +1971,6 @@ public void startIntentSender(final IntentSender intent, @Nullable final Intent } } - /** - * Like {@link #startActivity(Intent, Bundle)}, but taking a IntentSender - * to start; see - * {@link #startIntentSenderForResult(IntentSender, int, Intent, int, int, int, Bundle)} - * for more information. - * - * @param intent The IntentSender to launch. - * @param fillInIntent If non-null, this will be provided as the - * intent parameter to {@link IntentSender#sendIntent}. - * @param flagsMask Intent flags in the original IntentSender that you - * would like to change. - * @param flagsValues Desired values for any bits set in - * flagsMask - * @param extraFlags Always set to 0. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. If options - * have also been supplied by the IntentSender, options given here will - */ @Override public void startIntentSender(final IntentSender intent, @Nullable final Intent fillInIntent, final int flagsMask, final int flagsValues, final int extraFlags, final Bundle options) @@ -3585,10 +2007,6 @@ public void startIntentSenderForResult(final IntentSender intent, final int requ } } - /** - * Same as calling {@link #startIntentSenderFromChild(Activity, IntentSender, * int, Intent, - * int, int, int, Bundle)} with no options. - */ @Override public void startIntentSenderFromChild(final Activity child, final IntentSender intent, final int requestCode, final Intent fillInIntent, final int flagsMask, @@ -3601,12 +2019,6 @@ public void startIntentSenderFromChild(final Activity child, final IntentSender } } - /** - * Like {@link #startActivityFromChild(Activity, Intent, int)}, but - * taking a IntentSender; see - * {@link #startIntentSenderForResult(IntentSender, int, Intent, int, int, int)} - * for more information. - */ @Override public void startIntentSenderFromChild(final Activity child, final IntentSender intent, final int requestCode, final Intent fillInIntent, final int flagsMask, @@ -3633,167 +2045,40 @@ public void startIntentSenderFromFragment(final Fragment fragment, final IntentS } } - /** - * Starts a local voice interaction session. When ready, - * {@link #onLocalVoiceInteractionStarted()} is called. You can pass a bundle of private options - * to the registered voice interaction service. - * - * @param privateOptions a Bundle of private arguments to the current voice interaction service - */ @Override public void startLocalVoiceInteraction(final Bundle privateOptions) { delegate.startLocalVoiceInteraction(privateOptions); } - /** - * Request to put this Activity in a mode where the user is locked to the - * current task. - * - * This will prevent the user from launching other apps, going to settings, or reaching the - * home screen. This does not include those apps whose {@link android.R.attr#lockTaskMode} - * values permit launching while locked. - * - * If {@link DevicePolicyManager#isLockTaskPermitted(String)} returns true or - * lockTaskMode=lockTaskModeAlways for this component then the app will go directly into - * Lock Task mode. The user will not be able to exit this mode until - * {@link Activity#stopLockTask()} is called. - * - * If {@link DevicePolicyManager#isLockTaskPermitted(String)} returns false - * then the system will prompt the user with a dialog requesting permission to enter - * this mode. When entered through this method the user can exit at any time through - * an action described by the request dialog. Calling stopLockTask will also exit the - * mode. - * - * @see android.R.attr#lockTaskMode - */ @Override public void startLockTask() { delegate.startLockTask(); } /** - * This method allows the activity to take care of managing the given - * {@link Cursor}'s lifecycle for you based on the activity's lifecycle. - * That is, when the activity is stopped it will automatically call - * {@link Cursor#deactivate} on the given Cursor, and when it is later restarted - * it will call {@link Cursor#requery} for you. When the activity is - * destroyed, all managed Cursors will be closed automatically. - * - * If you are targeting {@link Build.VERSION_CODES#HONEYCOMB} - * or later, consider instead using {@link LoaderManager} instead, available - * via {@link #getLoaderManager()}. - * - *

Warning: Do not call {@link Cursor#close()} on cursor obtained from - * {@link #managedQuery}, because the activity will do that for you at the appropriate time. - * However, if you call {@link #stopManagingCursor} on a cursor from a managed query, the system - * will not automatically close the cursor and, in that case, you must call - * {@link Cursor#close()}.

- * - * @param c The Cursor to be managed. - * @see #managedQuery(Uri, String[], String, String[], String) - * @see #stopManagingCursor - * @deprecated Use the new {@link CursorLoader} class with - * {@link LoaderManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ @Override public void startManagingCursor(final Cursor c) { delegate.startManagingCursor(c); } - /** - * Same as calling {@link #startNextMatchingActivity(Intent, Bundle)} with - * no options. - * - * @param intent The intent to dispatch to the next activity. For - * correct behavior, this must be the same as the Intent that started - * your own activity; the only changes you can make are to the extras - * inside of it. - * @return Returns a boolean indicating whether there was another Activity - * to start: true if there was a next activity to start, false if there - * wasn't. In general, if true is returned you will then want to call - * finish() on yourself. - */ @Override public boolean startNextMatchingActivity(@RequiresPermission @NonNull final Intent intent) { return delegate.startNextMatchingActivity(intent); } - /** - * Special version of starting an activity, for use when you are replacing - * other activity components. You can use this to hand the Intent off - * to the next Activity that can handle it. You typically call this in - * {@link #onCreate} with the Intent returned by {@link #getIntent}. - * - * @param intent The intent to dispatch to the next activity. For - * correct behavior, this must be the same as the Intent that started - * your own activity; the only changes you can make are to the extras - * inside of it. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @return Returns a boolean indicating whether there was another Activity - * to start: true if there was a next activity to start, false if there - * wasn't. In general, if true is returned you will then want to call - * finish() on yourself. - */ @Override public boolean startNextMatchingActivity(@RequiresPermission @NonNull final Intent intent, @Nullable final Bundle options) { return delegate.startNextMatchingActivity(intent, options); } - /** - * Begin postponed transitions after {@link #postponeEnterTransition()} was called. - * If postponeEnterTransition() was called, you must call startPostponedEnterTransition() - * to have your Activity start drawing. - */ @Override public void startPostponedEnterTransition() { delegate.startPostponedEnterTransition(); } - /** - * This hook is called to launch the search UI. - * - *

It is typically called from onSearchRequested(), either directly from - * Activity.onSearchRequested() or from an overridden version in any given - * Activity. If your goal is simply to activate search, it is preferred to call - * onSearchRequested(), which may have been overridden elsewhere in your Activity. If your goal - * is to inject specific data such as context data, it is preferred to override - * onSearchRequested(), so that any callers to it will benefit from the override. - * - * @param initialQuery Any non-null non-empty string will be inserted as - * pre-entered text in the search query box. - * @param selectInitialQuery If true, the initial query will be preselected, which means that - * any further typing will replace it. This is useful for cases - * where - * an entire pre-formed - * query is being inserted. If false, the selection point will be - * placed at the end of the - * inserted query. This is useful when the inserted query is text - * that the user entered, - * and the user would expect to be able to keep typing. This - * parameter is only meaningful - * if initialQuery is a non-empty string. - * @param appSearchData An application can insert application-specific - * context here, in order to improve quality or specificity of its - * own - * searches. This data will be returned with SEARCH intent(s). Null - * if - * no extra data is required. - * @param globalSearch If false, this will only launch the search that has been - * specifically - * defined by the application (which is usually defined as a local - * search). If no default - * search is defined in the current application or activity, global - * search will be launched. - * If true, this will always launch a platform-global (e.g. - * web-based) - * search instead. - * @see SearchManager - * @see #onSearchRequested - */ @Override public void startSearch(@Nullable final String initialQuery, final boolean selectInitialQuery, @Nullable final Bundle appSearchData, final boolean globalSearch) { @@ -3811,52 +2096,18 @@ public ActionMode startSupportActionMode(@NonNull final ActionMode.Callback call return delegate.startSupportActionMode(callback); } - /** - * Request to terminate the current voice interaction that was previously started - * using {@link #startLocalVoiceInteraction(Bundle)}. When the interaction is - * terminated, {@link #onLocalVoiceInteractionStopped()} will be called. - */ @Override public void stopLocalVoiceInteraction() { delegate.stopLocalVoiceInteraction(); } - /** - * Allow the user to switch away from the current task. - * - * Called to end the mode started by {@link Activity#startLockTask}. This - * can only be called by activities that have successfully called - * startLockTask previously. - * - * This will allow the user to exit this app and move onto other activities. - *

Note: This method should only be called when the activity is user-facing. That is, - * between onResume() and onPause(). - *

Note: If there are other tasks below this one that are also locked then calling this - * method will immediately finish this task and resume the previous locked one, remaining in - * lockTask mode. - * - * @see android.R.attr#lockTaskMode - * @see ActivityManager#getLockTaskModeState() - */ @Override public void stopLockTask() { delegate.stopLockTask(); } /** - * Given a Cursor that was previously given to - * {@link #startManagingCursor}, stop the activity's management of that - * cursor. - * - *

Warning: After calling this method on a cursor from a managed query, - * the system will not automatically close the cursor and you must call - * {@link Cursor#close()}.

- * - * @param c The Cursor that was being managed. - * @see #startManagingCursor - * @deprecated Use the new {@link CursorLoader} class with - * {@link LoaderManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ @Override public void stopManagingCursor(final Cursor c) { @@ -3873,17 +2124,6 @@ public void super_addContentView(final View view, final ViewGroup.LayoutParams p super.addContentView(view, params); } - /** - * Call to set an "override configuration" on this context -- this is - * a configuration that replies one or more values of the standard - * configuration that is applied to the context. See - * {@link Context#createConfigurationContext(Configuration)} for more - * information. - * - *

This method can only be called once, and must be called before any - * calls to {@link #getResources()} or {@link #getAssets()} are made. - */ - @Override public void super_applyOverrideConfiguration(final Configuration overrideConfiguration) { super.applyOverrideConfiguration(overrideConfiguration); @@ -3942,15 +2182,15 @@ public int super_checkUriPermission(final Uri uri, final String readPermission, return super.checkUriPermission(uri, readPermission, writePermission, pid, uid, modeFlags); } + /** + * @deprecated + */ + @Override public void super_clearWallpaper() throws IOException { super.clearWallpaper(); } - /** - * Programmatically closes the most recently opened context menu, if showing. - */ - @Override public void super_closeContextMenu() { super.closeContextMenu(); @@ -3988,32 +2228,6 @@ public Context super_createPackageContext(final String packageName, final int fl return super.createPackageContext(packageName, flags); } - /** - * Create a new PendingIntent object which you can hand to others - * for them to use to send result data back to your - * {@link #onActivityResult} callback. The created object will be either - * one-shot (becoming invalid after a result is sent back) or multiple - * (allowing any number of results to be sent through it). - * - * @param requestCode Private request code for the sender that will be - * associated with the result data when it is returned. The sender can not - * modify this value, allowing you to identify incoming results. - * @param data Default data to supply in the result, which may be modified - * by the sender. - * @param flags May be {@link PendingIntent#FLAG_ONE_SHOT PendingIntent.FLAG_ONE_SHOT}, - * {@link PendingIntent#FLAG_NO_CREATE PendingIntent.FLAG_NO_CREATE}, - * {@link PendingIntent#FLAG_CANCEL_CURRENT PendingIntent.FLAG_CANCEL_CURRENT}, - * {@link PendingIntent#FLAG_UPDATE_CURRENT PendingIntent.FLAG_UPDATE_CURRENT}, - * or any of the flags as supported by - * {@link Intent#fillIn Intent.fillIn()} to control which unspecified parts - * of the intent that can be supplied when the actual send happens. - * @return Returns an existing or new PendingIntent matching the given - * parameters. May return null only if - * {@link PendingIntent#FLAG_NO_CREATE PendingIntent.FLAG_NO_CREATE} has been - * supplied. - * @see PendingIntent - */ - @Override public PendingIntent super_createPendingResult(final int requestCode, @NonNull final Intent data, final int flags) { @@ -4040,16 +2254,6 @@ public boolean super_deleteSharedPreferences(final String name) { return super.deleteSharedPreferences(name); } - /** - * Called to process generic motion events. You can override this to - * intercept all generic motion events before they are dispatched to the - * window. Be sure to call this implementation for generic motion events - * that should be handled normally. - * - * @param ev The generic motion event. - * @return boolean Return true if this event was consumed. - */ - @Override public boolean super_dispatchGenericMotionEvent(final MotionEvent ev) { return super.dispatchGenericMotionEvent(ev); @@ -4060,16 +2264,6 @@ public boolean super_dispatchKeyEvent(final KeyEvent event) { return super.dispatchKeyEvent(event); } - /** - * Called to process a key shortcut event. - * You can override this to intercept all key shortcut events before they are - * dispatched to the window. Be sure to call this implementation for key shortcut - * events that should be handled normally. - * - * @param event The key shortcut event. - * @return True if this event was consumed. - */ - @Override public boolean super_dispatchKeyShortcutEvent(final KeyEvent event) { return super.dispatchKeyShortcutEvent(event); @@ -4080,31 +2274,11 @@ public boolean super_dispatchPopulateAccessibilityEvent(final AccessibilityEvent return super.dispatchPopulateAccessibilityEvent(event); } - /** - * Called to process touch screen events. You can override this to - * intercept all touch screen events before they are dispatched to the - * window. Be sure to call this implementation for touch screen events - * that should be handled normally. - * - * @param ev The touch screen event. - * @return boolean Return true if this event was consumed. - */ - @Override public boolean super_dispatchTouchEvent(final MotionEvent ev) { return super.dispatchTouchEvent(ev); } - /** - * Called to process trackball events. You can override this to - * intercept all trackball events before they are dispatched to the - * window. Be sure to call this implementation for trackball events - * that should be handled normally. - * - * @param ev The trackball event. - * @return boolean Return true if this event was consumed. - */ - @Override public boolean super_dispatchTrackballEvent(final MotionEvent ev) { return super.dispatchTrackballEvent(ev); @@ -4160,9 +2334,7 @@ public void super_enforceUriPermission(final Uri uri, final String readPermissio } /** - * Puts the activity in picture-in-picture mode. - * - * @see android.R.attr#supportsPictureInPicture + * @deprecated */ @Override @@ -4185,109 +2357,42 @@ public T super_findViewById(@IdRes final int id) { return super.findViewById(id); } - /** - * Call this when your activity is done and should be closed. The - * ActivityResult is propagated back to whoever launched you via - * onActivityResult(). - */ - @Override public void super_finish() { super.finish(); } - /** - * Force finish another activity that you had previously started with - * {@link #startActivityForResult}. - * - * @param requestCode The request code of the activity that you had - * given to startActivityForResult(). If there are multiple - * activities started with this request code, they - * will all be finished. - */ - @Override public void super_finishActivity(final int requestCode) { super.finishActivity(requestCode); } - /** - * This is called when a child activity of this one calls its - * finishActivity(). - * - * @param child The activity making the call. - * @param requestCode Request code that had been used to start the - */ - @Override public void super_finishActivityFromChild(@NonNull final Activity child, final int requestCode) { super.finishActivityFromChild(child, requestCode); } - /** - * Finish this activity as well as all activities immediately below it - * in the current task that have the same affinity. This is typically - * used when an application can be launched on to another task (such as - * from an ACTION_VIEW of a content type it understands) and the user - * has used the up navigation to switch out of the current task and in - * to its own task. In this case, if the user has navigated down into - * any other activities of the second application, all of those should - * be removed from the original task as part of the task switch. - * - *

Note that this finish does not allow you to deliver results - * to the previous activity, and an exception will be thrown if you are trying - * to do so.

- */ - @Override public void super_finishAffinity() { super.finishAffinity(); } - /** - * Reverses the Activity Scene entry Transition and triggers the calling Activity - * to reverse its exit Transition. When the exit Transition completes, - * {@link #finish()} is called. If no entry Transition was used, finish() is called - * immediately and the Activity exit Transition is run. - * - * @see ActivityOptions#makeSceneTransitionAnimation(Activity, Pair[]) - */ - @Override public void super_finishAfterTransition() { super.finishAfterTransition(); } - /** - * Call this when your activity is done and should be closed and the task should be completely - * removed as a part of finishing the root activity of the task. - */ - @Override public void super_finishAndRemoveTask() { super.finishAndRemoveTask(); } - /** - * This is called when a child activity of this one calls its - * {@link #finish} method. The default implementation simply calls - * finish() on this activity (the parent), finishing the entire group. - * - * @param child The activity making the call. - * @see #finish - */ - @Override public void super_finishFromChild(final Activity child) { super.finishFromChild(child); } - /** - * Retrieve a reference to this activity's ActionBar. - * - * @return The Activity's ActionBar, or null if it does not have one. - */ @Nullable @Override public android.app.ActionBar super_getActionBar() { @@ -4309,10 +2414,6 @@ public AssetManager super_getAssets() { return super.getAssets(); } - /** - * @return the base context as set by the constructor or setBaseContext - */ - @Override public Context super_getBaseContext() { return super.getBaseContext(); @@ -4323,67 +2424,18 @@ public File super_getCacheDir() { return super.getCacheDir(); } - /** - * Return the name of the activity that invoked this activity. This is - * who the data in {@link #setResult setResult()} will be sent to. You - * can use this information to validate that the recipient is allowed to - * receive the data. - * - *

Note: if the calling activity is not expecting a result (that is it - * did not use the {@link #startActivityForResult} - * form that includes a request code), then the calling package will be - * null. - * - * @return The ComponentName of the activity that will receive your - * reply, or null if none. - */ @Nullable @Override public ComponentName super_getCallingActivity() { return super.getCallingActivity(); } - /** - * Return the name of the package that invoked this activity. This is who - * the data in {@link #setResult setResult()} will be sent to. You can - * use this information to validate that the recipient is allowed to - * receive the data. - * - *

Note: if the calling activity is not expecting a result (that is it - * did not use the {@link #startActivityForResult} - * form that includes a request code), then the calling package will be - * null.

- * - *

Note: prior to {@link Build.VERSION_CODES#JELLY_BEAN_MR2}, - * the result from this method was unstable. If the process hosting the calling - * package was no longer running, it would return null instead of the proper package - * name. You can use {@link #getCallingActivity()} and retrieve the package name - * from that instead.

- * - * @return The package of the activity that will receive your - * reply, or null if none. - */ @Nullable @Override public String super_getCallingPackage() { return super.getCallingPackage(); } - /** - * If this activity is being destroyed because it can not handle a - * configuration parameter being changed (and thus its - * {@link #onConfigurationChanged(Configuration)} method is - * not being called), then you can use this method to discover - * the set of changes that have occurred while in the process of being - * destroyed. Note that there is no guarantee that these will be - * accurate (other changes could have happened at any time), so you should - * only use this as an optimization hint. - * - * @return Returns a bit field of the configuration parameters that are - * changing, as defined by the {@link Configuration} - * class. - */ - @Override public int super_getChangingConfigurations() { return super.getChangingConfigurations(); @@ -4399,12 +2451,6 @@ public File super_getCodeCacheDir() { return super.getCodeCacheDir(); } - /** - * Returns complete component name of this activity. - * - * @return Returns the complete component name for this activity - */ - @Override public ComponentName super_getComponentName() { return super.getComponentName(); @@ -4415,43 +2461,16 @@ public ContentResolver super_getContentResolver() { return super.getContentResolver(); } - /** - * Retrieve the {@link Scene} representing this window's current content. - * Requires {@link Window#FEATURE_CONTENT_TRANSITIONS}. - * - *

This method will return null if the current content is not represented by a Scene.

- * - * @return Current Scene being shown or null - */ - @Override public Scene super_getContentScene() { return super.getContentScene(); } - /** - * Retrieve the {@link TransitionManager} responsible for default transitions in this window. - * Requires {@link Window#FEATURE_CONTENT_TRANSITIONS}. - * - *

This method will return non-null after content has been initialized (e.g. by using - * {@link #setContentView}) if {@link Window#FEATURE_CONTENT_TRANSITIONS} has been granted.

- * - * @return This window's content TransitionManager or null if none is set. - */ - @Override public TransitionManager super_getContentTransitionManager() { return super.getContentTransitionManager(); } - /** - * Calls {@link Window#getCurrentFocus} on the - * Window of this Activity to return the currently focused view. - * - * @return View The current View with focus or null. - * @see #getWindow - * @see Window#getCurrentFocus - */ @Nullable @Override public View super_getCurrentFocus() { @@ -4526,29 +2545,16 @@ public File super_getFilesDir() { return super.getFilesDir(); } - /** - * Return the FragmentManager for interacting with fragments associated - * with this activity. - */ - @Override public android.app.FragmentManager super_getFragmentManager() { return super.getFragmentManager(); } - /** - * Return the intent that started this activity. - */ - @Override public Intent super_getIntent() { return super.getIntent(); } - /** - * Convenience for calling - * {@link Window#getLayoutInflater}. - */ @NonNull @Override public LayoutInflater super_getLayoutInflater() { @@ -4560,21 +2566,11 @@ public Lifecycle super_getLifecycle() { return super.getLifecycle(); } - /** - * Return the LoaderManager for this activity, creating it if needed. - */ - @Override public android.app.LoaderManager super_getLoaderManager() { return super.getLoaderManager(); } - /** - * Returns class name for this activity with the package prefix removed. - * This is the default name used to read and write settings. - * - * @return The local class name. - */ @NonNull @Override public String super_getLocalClassName() { @@ -4631,72 +2627,23 @@ public String super_getPackageResourcePath() { return super.getPackageResourcePath(); } - /** - * Obtain an {@link Intent} that will launch an explicit target activity specified by - * this activity's logical parent. The logical parent is named in the application's manifest - * by the {@link android.R.attr#parentActivityName parentActivityName} attribute. - * Activity subclasses may override this method to modify the Intent returned by - * super.getParentActivityIntent() or to implement a different mechanism of retrieving - * the parent intent entirely. - * - * @return a new Intent targeting the defined parent of this activity or null if - * there is no valid parent. - */ @Nullable @Override public Intent super_getParentActivityIntent() { return super.getParentActivityIntent(); } - /** - * Retrieve a {@link SharedPreferences} object for accessing preferences - * that are private to this activity. This simply calls the underlying - * {@link #getSharedPreferences(String, int)} method by passing in this activity's - * class name as the preferences name. - * - * @param mode Operating mode. Use {@link #MODE_PRIVATE} for the default - * operation. - * @return Returns the single SharedPreferences instance that can be used - * to retrieve and modify the preference values. - */ - @Override public SharedPreferences super_getPreferences(final int mode) { return super.getPreferences(mode); } - /** - * Return information about who launched this activity. If the launching Intent - * contains an {@link Intent#EXTRA_REFERRER Intent.EXTRA_REFERRER}, - * that will be returned as-is; otherwise, if known, an - * {@link Intent#URI_ANDROID_APP_SCHEME android-app:} referrer URI containing the - * package name that started the Intent will be returned. This may return null if no - * referrer can be identified -- it is neither explicitly specified, nor is it known which - * application package was involved. - * - *

If called while inside the handling of {@link #onNewIntent}, this function will - * return the referrer that submitted that new intent to the activity. Otherwise, it - * always returns the referrer of the original Intent.

- * - *

Note that this is not a security feature -- you can not trust the - * referrer information, applications can spoof it.

- */ @Nullable @Override public Uri super_getReferrer() { return super.getReferrer(); } - /** - * Return the current requested orientation of the activity. This will - * either be the orientation requested in its component's manifest, or - * the last requested orientation given to - * {@link #setRequestedOrientation(int)}. - * - * @return Returns an orientation constant as used in - * {@link ActivityInfo#screenOrientation ActivityInfo.screenOrientation}. - */ - @Override public int super_getRequestedOrientation() { return super.getRequestedOrientation(); @@ -4744,13 +2691,6 @@ public String super_getSystemServiceName(final Class serviceClass) { return super.getSystemServiceName(serviceClass); } - /** - * Return the identifier of the task this activity is in. This identifier - * will remain the same for the lifetime of the activity. - * - * @return Task identifier, an opaque integer. - */ - @Override public int super_getTaskId() { return super.getTaskId(); @@ -4761,49 +2701,43 @@ public Resources.Theme super_getTheme() { return super.getTheme(); } - /** - * Retrieve the active {@link VoiceInteractor} that the user is going through to - * interact with this activity. - */ - @Override public VoiceInteractor super_getVoiceInteractor() { return super.getVoiceInteractor(); } + /** + * @deprecated + */ + @Override public Drawable super_getWallpaper() { return super.getWallpaper(); } + /** + * @deprecated + */ + @Override public int super_getWallpaperDesiredMinimumHeight() { return super.getWallpaperDesiredMinimumHeight(); } + /** + * @deprecated + */ + @Override public int super_getWallpaperDesiredMinimumWidth() { return super.getWallpaperDesiredMinimumWidth(); } - /** - * Retrieve the current {@link Window} for the activity. - * This can be used to directly access parts of the Window API that - * are not available through Activity/Screen. - * - * @return Window The current window, or null if the activity is not - * visual. - */ - @Override public Window super_getWindow() { return super.getWindow(); } - /** - * Retrieve the window manager for showing custom windows. - */ - @Override public WindowManager super_getWindowManager() { return super.getWindowManager(); @@ -4815,14 +2749,6 @@ public void super_grantUriPermission(final String toPackage, final Uri uri, super.grantUriPermission(toPackage, uri, modeFlags); } - /** - * Returns true if this activity's main window currently has window focus. - * Note that this is not the same as the view itself having focus. - * - * @return True if this activity's main window currently has window focus. - * @see #onWindowAttributesChanged(WindowManager.LayoutParams) - */ - @Override public boolean super_hasWindowFocus() { return super.hasWindowFocus(); @@ -4838,26 +2764,11 @@ public boolean super_isActivityTransitionRunning() { return super.isActivityTransitionRunning(); } - /** - * Check to see whether this activity is in the process of being destroyed in order to be - * recreated with a new configuration. This is often used in - * {@link #onStop} to determine whether the state needs to be cleaned up or will be passed - * on to the next instance of the activity via {@link #onRetainNonConfigurationInstance()}. - * - * @return If the activity is being torn down in order to be recreated with a new configuration, - * returns true; else returns false. - */ - @Override public boolean super_isChangingConfigurations() { return super.isChangingConfigurations(); } - /** - * Returns true if the final {@link #onDestroy()} call has been made - * on the Activity, so this instance is now dead. - */ - @Override public boolean super_isDestroyed() { return super.isDestroyed(); @@ -4868,71 +2779,26 @@ public boolean super_isDeviceProtectedStorage() { return super.isDeviceProtectedStorage(); } - /** - * Check to see whether this activity is in the process of finishing, - * either because you called {@link #finish} on it or someone else - * has requested that it finished. This is often used in - * {@link #onPause} to determine whether the activity is simply pausing or - * completely finishing. - * - * @return If the activity is finishing, returns true; else returns false. - * @see #finish - */ - @Override public boolean super_isFinishing() { return super.isFinishing(); } - /** - * Bit indicating that this activity is "immersive" and should not be - * interrupted by notifications if possible. - * - * This value is initially set by the manifest property - * android:immersive but may be changed at runtime by - * {@link #setImmersive}. - * - * @see #setImmersive(boolean) - * @see ActivityInfo#FLAG_IMMERSIVE - */ - @Override public boolean super_isImmersive() { return super.isImmersive(); } - /** - * Returns true if the activity is currently in multi-window mode. - * - * @return True if the activity is in multi-window mode. - * @see android.R.attr#resizeableActivity - */ - @Override public boolean super_isInMultiWindowMode() { return super.isInMultiWindowMode(); } - /** - * Returns true if the activity is currently in picture-in-picture mode. - * - * @return True if the activity is in picture-in-picture mode. - * @see android.R.attr#supportsPictureInPicture - */ - @Override public boolean super_isInPictureInPictureMode() { return super.isInPictureInPictureMode(); } - /** - * Queries whether the currently enabled voice interaction service supports returning - * a voice interactor for use by the activity. This is valid only for the duration of the - * activity. - * - * @return whether the current voice interaction service supports local voice interaction - */ - @Override public boolean super_isLocalVoiceInteractionSupported() { return super.isLocalVoiceInteractionSupported(); @@ -4943,37 +2809,16 @@ public boolean super_isRestricted() { return super.isRestricted(); } - /** - * Return whether this activity is the root of a task. The root is the - * first activity in a task. - * - * @return True if this is the root activity, else false. - */ - @Override public boolean super_isTaskRoot() { return super.isTaskRoot(); } - /** - * Check whether this activity is running as part of a voice interaction with the user. - * If true, it should perform its interaction with the user through the - * {@link VoiceInteractor} returned by {@link #getVoiceInteractor}. - */ - @Override public boolean super_isVoiceInteraction() { return super.isVoiceInteraction(); } - /** - * Like {@link #isVoiceInteraction}, but only returns true if this is also the root - * of a voice interaction. That is, returns true if this activity was directly - * started by the voice interaction service as the initiation of a voice interaction. - * Otherwise, for example if it was started by another activity while under voice - * interaction, returns false. - */ - @Override public boolean super_isVoiceInteractionRoot() { return super.isVoiceInteractionRoot(); @@ -4989,108 +2834,31 @@ public boolean super_moveSharedPreferencesFrom(final Context sourceContext, fina return super.moveSharedPreferencesFrom(sourceContext, name); } - /** - * Move the task containing this activity to the back of the activity - * stack. The activity's order within the task is unchanged. - * - * @param nonRoot If false then this only works if the activity is the root - * of a task; if true it will work for any activity in - * a task. - * @return If the task was moved (or it was already at the - * back) true is returned, else false. - */ - @Override public boolean super_moveTaskToBack(final boolean nonRoot) { return super.moveTaskToBack(nonRoot); } - /** - * Navigate from this activity to the activity specified by upIntent, finishing this activity - * in the process. If the activity indicated by upIntent already exists in the task's history, - * this activity and all others before the indicated activity in the history stack will be - * finished. - * - *

If the indicated activity does not appear in the history stack, this will finish - * each activity in this task until the root activity of the task is reached, resulting in - * an "in-app home" behavior. This can be useful in apps with a complex navigation hierarchy - * when an activity may be reached by a path not passing through a canonical parent - * activity.

- * - *

This method should be used when performing up navigation from within the same task - * as the destination. If up navigation should cross tasks in some cases, see - * {@link #shouldUpRecreateTask(Intent)}.

- * - * @param upIntent An intent representing the target destination for up navigation - * @return true if up navigation successfully reached the activity indicated by upIntent and - * upIntent was delivered to it. false if an instance of the indicated activity could - * not be found and this activity was simply finished normally. - */ - @Override public boolean super_navigateUpTo(final Intent upIntent) { return super.navigateUpTo(upIntent); } - /** - * This is called when a child activity of this one calls its - * {@link #navigateUpTo} method. The default implementation simply calls - * navigateUpTo(upIntent) on this activity (the parent). - * - * @param child The activity making the call. - * @param upIntent An intent representing the target destination for up navigation - * @return true if up navigation successfully reached the activity indicated by upIntent and - * upIntent was delivered to it. false if an instance of the indicated activity could - * not be found and this activity was simply finished normally. - */ - @Override public boolean super_navigateUpToFromChild(final Activity child, final Intent upIntent) { return super.navigateUpToFromChild(child, upIntent); } - /** - * Notifies the activity that an action mode has finished. - * Activity subclasses overriding this method should call the superclass implementation. - * - * @param mode The action mode that just finished. - */ - @Override public void super_onActionModeFinished(final android.view.ActionMode mode) { super.onActionModeFinished(mode); } - /** - * Notifies the Activity that an action mode has been started. - * Activity subclasses overriding this method should call the superclass implementation. - * - * @param mode The new action mode. - */ - @Override public void super_onActionModeStarted(final android.view.ActionMode mode) { super.onActionModeStarted(mode); } - /** - * Called when an activity you launched with an activity transition exposes this - * Activity through a returning activity transition, giving you the resultCode - * and any additional data from it. This method will only be called if the activity - * set a result code other than {@link #RESULT_CANCELED} and it supports activity - * transitions with {@link Window#FEATURE_ACTIVITY_TRANSITIONS}. - * - *

The purpose of this function is to let the called Activity send a hint about - * its state so that this underlying Activity can prepare to be exposed. A call to - * this method does not guarantee that the called Activity has or will be exiting soon. - * It only indicates that it will expose this Activity's Window and it has - * some data to pass to prepare it.

- * - * @param resultCode The integer result code returned by the child activity - * through its setResult(). - * @param data An Intent, which can return result data to the caller - */ - @Override public void super_onActivityReenter(final int resultCode, final Intent data) { super.onActivityReenter(resultCode, data); @@ -5113,26 +2881,11 @@ public void super_onAttachFragment(final Fragment fragment) { super.onAttachFragment(fragment); } - /** - * Called when a Fragment is being attached to this activity, immediately - * after the call to its {@link android.app.Fragment#onAttach Fragment.onAttach()} - * method and before {@link android.app.Fragment#onCreate Fragment.onCreate()}. - */ - @Override public void super_onAttachFragment(final android.app.Fragment fragment) { super.onAttachFragment(fragment); } - /** - * Called when the main window associated with the activity has been - * attached to the window manager. - * See {@link View#onAttachedToWindow() View.onAttachedToWindow()} - * for more information. - * - * @see View#onAttachedToWindow - */ - @Override public void super_onAttachedToWindow() { super.onAttachedToWindow(); @@ -5158,66 +2911,16 @@ public void super_onContentChanged() { super.onContentChanged(); } - /** - * This hook is called whenever an item in a context menu is selected. The - * default implementation simply returns false to have the normal processing - * happen (calling the item's Runnable or sending a message to its Handler - * as appropriate). You can use this method for any items for which you - * would like to do processing without those other facilities. - *

- * Use {@link 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. - * - * @param item The context menu item that was selected. - * @return boolean Return false to allow normal context menu processing to - * proceed, true to consume it here. - */ - @Override public boolean super_onContextItemSelected(final MenuItem item) { return super.onContextItemSelected(item); } - /** - * 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). - * - * @param menu The context menu that is being closed. - */ - @Override public void super_onContextMenuClosed(final Menu menu) { super.onContextMenuClosed(menu); } - /** - * Same as {@link #onCreate(Bundle)} but called for those activities created with - * the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. - * - * @param savedInstanceState if the activity is being re-initialized after - * previously being shut down then this Bundle contains the data it - * most - * recently supplied in {@link #onSaveInstanceState}. - * Note: Otherwise it is null. - * @param persistentState if the activity is being re-initialized after - * previously being shut down or powered off then this Bundle - * contains - * the data it most - * recently supplied to outPersistentState in {@link - * #onSaveInstanceState}. - * Note: Otherwise it is null. - * @see #onCreate(Bundle) - * @see #onStart - * @see #onSaveInstanceState - * @see #onRestoreInstanceState - * @see #onPostCreate - */ - @Override public void super_onCreate(@Nullable final Bundle savedInstanceState, @Nullable final PersistableBundle persistentState) { @@ -5229,41 +2932,12 @@ public void super_onCreate(@Nullable final Bundle savedInstanceState) { super.onCreate(savedInstanceState); } - /** - * Called when a context menu for the {@code view} is about to be shown. - * Unlike {@link #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 {@link AdapterView} subclasses, - * this can be found in the {@code menuInfo})). - *

- * Use {@link #onContextItemSelected(MenuItem)} to know when an - * item has been selected. - *

- * It is not safe to hold onto the context menu after this method returns. - */ - @Override public void super_onCreateContextMenu(final ContextMenu menu, final View v, final ContextMenu.ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); } - /** - * Generate a new description for this activity. This method is called - * before pausing the activity and can, if desired, return some textual - * description of its current state to be displayed to the user. - * - *

The default implementation returns null, which will cause you to - * inherit the description from the previous activity. If all activities - * return null, generally the label of the top activity will be used as the - * description. - * - * @return A description of what the user is doing. It should be short and - * sweet (only a few words). - * @see #onCreateThumbnail - * @see #onSaveInstanceState - * @see #onPause - */ @Nullable @Override public CharSequence super_onCreateDescription() { @@ -5271,7 +2945,7 @@ public CharSequence super_onCreateDescription() { } /** - * @deprecated Old no-arguments version of {@link #onCreateDialog(int, Bundle)}. + * @deprecated */ @Override @@ -5280,35 +2954,7 @@ public Dialog super_onCreateDialog(final int id) { } /** - * Callback for creating dialogs that are managed (saved and restored) for you - * by the activity. The default implementation calls through to - * {@link #onCreateDialog(int)} for compatibility. - * - * If you are targeting {@link Build.VERSION_CODES#HONEYCOMB} - * or later, consider instead using a {@link DialogFragment} instead. - * - *

If you use {@link #showDialog(int)}, the activity will call through to - * this method the first time, and hang onto it thereafter. Any dialog - * that is created by this method will automatically be saved and restored - * for you, including whether it is showing. - * - *

If you would like the activity to manage saving and restoring dialogs - * for you, you should override this method and handle any ids that are - * passed to {@link #showDialog}. - * - *

If you would like an opportunity to prepare your dialog before it is shown, - * override {@link #onPrepareDialog(int, Dialog, Bundle)}. - * - * @param id The id of the dialog. - * @param args The dialog arguments provided to {@link #showDialog(int, Bundle)}. - * @return The dialog. If you return null, the dialog will not be created. - * @see #onPrepareDialog(int, Dialog, Bundle) - * @see #showDialog(int, Bundle) - * @see #dismissDialog(int) - * @see #removeDialog(int) - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ @Nullable @Override @@ -5316,59 +2962,11 @@ public Dialog super_onCreateDialog(final int id, final Bundle args) { return super.onCreateDialog(id, args); } - /** - * Define the synthetic task stack that will be generated during Up navigation from - * a different task. - * - *

The default implementation of this method adds the parent chain of this activity - * as specified in the manifest to the supplied {@link android.app.TaskStackBuilder}. - * Applications - * may choose to override this method to construct the desired task stack in a different - * way.

- * - *

This method will be invoked by the default implementation of {@link #onNavigateUp()} - * if {@link #shouldUpRecreateTask(Intent)} returns true when supplied with the intent - * returned by {@link #getParentActivityIntent()}.

- * - *

Applications that wish to supply extra Intent parameters to the parent stack defined - * by the manifest should override {@link #onPrepareNavigateUpTaskStack(android.app.TaskStackBuilder)}.

- * - * @param builder An empty TaskStackBuilder - the application should add intents representing - * the desired task stack - */ - @Override public void super_onCreateNavigateUpTaskStack(final android.app.TaskStackBuilder builder) { super.onCreateNavigateUpTaskStack(builder); } - /** - * Initialize the contents of the Activity's standard options menu. You - * should place your menu items in to menu. - * - *

This is only called once, the first time the options menu is - * displayed. To update the menu every time it is displayed, see - * {@link #onPrepareOptionsMenu}. - * - *

The default implementation populates the menu with standard system - * menu items. These are placed in the {@link 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 - * {@link #onOptionsItemSelected} method to handle them there. - * - * @param menu The options menu in which you place your items. - * @return You must return true for the menu to be displayed; - * if you return false it will not be shown. - * @see #onPrepareOptionsMenu - * @see #onOptionsItemSelected - */ - @Override public boolean super_onCreateOptionsMenu(final Menu menu) { return super.onCreateOptionsMenu(menu); @@ -5379,13 +2977,6 @@ public boolean super_onCreatePanelMenu(final int featureId, final Menu menu) { return super.onCreatePanelMenu(featureId, menu); } - /** - * Default implementation of - * {@link Window.Callback#onCreatePanelView} - * for activities. This - * simply returns null so that all panel sub-windows will have the default - * menu behavior. - */ @Nullable @Override public View super_onCreatePanelView(final int featureId) { @@ -5397,25 +2988,6 @@ public void super_onCreateSupportNavigateUpTaskStack(@NonNull final TaskStackBui super.onCreateSupportNavigateUpTaskStack(builder); } - /** - * Generate a new thumbnail for this activity. This method is called before - * pausing the activity, and should draw into outBitmap the - * imagery for the desired thumbnail in the dimensions of that bitmap. It - * can use the given canvas, which is configured to draw into the - * bitmap, for rendering if desired. - * - *

The default implementation returns fails and does not draw a thumbnail; - * this will result in the platform creating its own thumbnail if needed. - * - * @param outBitmap The bitmap to contain the thumbnail. - * @param canvas Can be used to render into the bitmap. - * @return Return true if you have drawn into the bitmap; otherwise after - * you return it will be filled with a default thumbnail. - * @see #onCreateDescription - * @see #onSaveInstanceState - * @see #onPause - */ - @Override public boolean super_onCreateThumbnail(final Bitmap outBitmap, final Canvas canvas) { return super.onCreateThumbnail(outBitmap, canvas); @@ -5438,56 +3010,16 @@ public void super_onDestroy() { super.onDestroy(); } - /** - * Called when the main window associated with the activity has been - * detached from the window manager. - * See {@link View#onDetachedFromWindow() View.onDetachedFromWindow()} - * for more information. - * - * @see View#onDetachedFromWindow - */ - @Override public void super_onDetachedFromWindow() { super.onDetachedFromWindow(); } - /** - * Activities cannot draw during the period that their windows are animating in. In order - * to know when it is safe to begin drawing they can override this method which will be - * called when the entering animation has completed. - */ - @Override public void super_onEnterAnimationComplete() { super.onEnterAnimationComplete(); } - /** - * Called when a generic motion event was not handled by any of the - * views inside of the activity. - *

- * Generic motion events describe joystick movements, mouse hovers, track pad - * touches, scroll wheel movements and other input events. The - * {@link MotionEvent#getSource() source} of the motion event specifies - * the class of input that was received. Implementations of this method - * must examine the bits in the source before processing the event. - * The following code example shows how this is done. - *

- * Generic motion events with source class - * {@link InputDevice#SOURCE_CLASS_POINTER} - * are delivered to the view under the pointer. All other generic motion events are - * delivered to the focused view. - *

- * See {@link View#onGenericMotionEvent(MotionEvent)} for an example of how to - * handle this event. - *

- * - * @param event The generic motion event being processed. - * @return Return true if you have consumed the event, false if you haven't. - * The default implementation always returns false. - */ - @Override public boolean super_onGenericMotionEvent(final MotionEvent event) { return super.onGenericMotionEvent(event); @@ -5498,84 +3030,32 @@ public boolean super_onKeyDown(final int keyCode, final KeyEvent event) { return super.onKeyDown(keyCode, event); } - /** - * Default implementation of {@link KeyEvent.Callback#onKeyLongPress(int, KeyEvent) - * KeyEvent.Callback.onKeyLongPress()}: always returns false (doesn't handle - * the event). - */ - @Override public boolean super_onKeyLongPress(final int keyCode, final KeyEvent event) { return super.onKeyLongPress(keyCode, event); } - /** - * Default implementation of {@link KeyEvent.Callback#onKeyMultiple(int, int, KeyEvent) - * KeyEvent.Callback.onKeyMultiple()}: always returns false (doesn't handle - * the event). - */ - @Override public boolean super_onKeyMultiple(final int keyCode, final int repeatCount, final KeyEvent event) { return super.onKeyMultiple(keyCode, repeatCount, event); } - /** - * Called when a key shortcut event is not handled by any of the views in the Activity. - * Override this method to implement global key shortcuts for the Activity. - * Key shortcuts can also be implemented by setting the - * {@link MenuItem#setShortcut(char, char) shortcut} property of menu items. - * - * @param keyCode The value in event.getKeyCode(). - * @param event Description of the key event. - * @return True if the key shortcut was handled. - */ - @Override public boolean super_onKeyShortcut(final int keyCode, final KeyEvent event) { return super.onKeyShortcut(keyCode, event); } - /** - * Called when a key was released and not handled by any of the views - * inside of the activity. So, for example, key presses while the cursor - * is inside a TextView will not trigger the event (unless it is a navigation - * to another object) because TextView handles its own key presses. - * - *

The default implementation handles KEYCODE_BACK to stop the activity - * and go back. - * - * @return Return true to prevent this event from being propagated - * further, or false to indicate that you have not handled - * this event and it should continue to be propagated. - * @see #onKeyDown - * @see KeyEvent - */ - @Override public boolean super_onKeyUp(final int keyCode, final KeyEvent event) { return super.onKeyUp(keyCode, event); } - /** - * Callback to indicate that {@link #startLocalVoiceInteraction(Bundle)} has resulted in a - * voice interaction session being started. You can now retrieve a voice interactor using - * {@link #getVoiceInteractor()}. - */ - @Override public void super_onLocalVoiceInteractionStarted() { super.onLocalVoiceInteractionStarted(); } - /** - * Callback to indicate that the local voice interaction has stopped either - * because it was requested through a call to {@link #stopLocalVoiceInteraction()} - * or because it was canceled by the user. The previously acquired {@link VoiceInteractor} - * is no longer valid after this. - */ - @Override public void super_onLocalVoiceInteractionStopped() { super.onLocalVoiceInteractionStopped(); @@ -5602,43 +3082,11 @@ public void super_onMultiWindowModeChanged(final boolean isInMultiWindowMode, super.onMultiWindowModeChanged(isInMultiWindowMode, newConfig); } - /** - * This method is called whenever the user chooses to navigate Up within your application's - * activity hierarchy from the action bar. - * - *

If the attribute {@link android.R.attr#parentActivityName parentActivityName} - * was specified in the manifest for this activity or an activity-alias to it, - * default Up navigation will be handled automatically. If any activity - * along the parent chain requires extra Intent arguments, the Activity subclass - * should override the method {@link #onPrepareNavigateUpTaskStack(TaskStackBuilder)} - * to supply those arguments.

- * - *

See Tasks and Back - * Stack - * from the developer guide and Navigation - * from the design guide for more information about navigating within your app.

- * - *

See the {@link TaskStackBuilder} class and the Activity methods - * {@link #getParentActivityIntent()}, {@link #shouldUpRecreateTask(Intent)}, and - * {@link #navigateUpTo(Intent)} for help implementing custom Up navigation. - * The AppNavigation sample application in the Android SDK is also available for reference.

- * - * @return true if Up navigation completed successfully and this Activity was finished, - * false otherwise. - */ - @Override public boolean super_onNavigateUp() { return super.onNavigateUp(); } - /** - * 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). - * - * @param child The activity making the call. - */ - @Override public boolean super_onNavigateUpFromChild(final Activity child) { return super.onNavigateUpFromChild(child); @@ -5649,36 +3097,11 @@ public void super_onNewIntent(final Intent intent) { super.onNewIntent(intent); } - /** - * This hook is called whenever an item in your options menu is selected. - * The default implementation simply returns false to have the normal - * processing happen (calling the item's Runnable or sending a message to - * its Handler as appropriate). You can use this method for any items - * for which you would like to do processing without those other - * facilities. - * - *

Derived classes should call through to the base class for it to - * perform the default menu handling.

- * - * @param item The menu item that was selected. - * @return boolean Return false to allow normal menu processing to - * proceed, true to consume it here. - * @see #onCreateOptionsMenu - */ - @Override public boolean super_onOptionsItemSelected(final MenuItem item) { return super.onOptionsItemSelected(item); } - /** - * This hook is called whenever the options menu is being closed (either by the user canceling - * the menu with the back/menu button, or when an item is selected). - * - * @param menu The options menu as last shown or first initialized by - * onCreateOptionsMenu(). - */ - @Override public void super_onOptionsMenuClosed(final Menu menu) { super.onOptionsMenuClosed(menu); @@ -5705,17 +3128,6 @@ public void super_onPictureInPictureModeChanged(final boolean isInPictureInPictu super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig); } - /** - * This is the same as {@link #onPostCreate(Bundle)} but is called for activities - * created with the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. - * - * @param savedInstanceState The data most recently supplied in {@link #onSaveInstanceState} - * @param persistentState The data caming from the PersistableBundle first - * saved in {@link #onSaveInstanceState(Bundle, PersistableBundle)}. - * @see #onCreate - */ - @Override public void super_onPostCreate(@Nullable final Bundle savedInstanceState, @Nullable final PersistableBundle persistentState) { @@ -5733,8 +3145,7 @@ public void super_onPostResume() { } /** - * @deprecated Old no-arguments version of - * {@link #onPrepareDialog(int, Dialog, Bundle)}. + * @deprecated */ @Override @@ -5743,27 +3154,7 @@ public void super_onPrepareDialog(final int id, final Dialog dialog) { } /** - * Provides an opportunity to prepare a managed dialog before it is being - * shown. The default implementation calls through to - * {@link #onPrepareDialog(int, Dialog)} for compatibility. - * - *

- * Override this if you need to update a managed dialog based on the state - * of the application each time it is shown. For example, a time picker - * dialog might want to be updated with the current time. You should call - * through to the superclass's implementation. The default implementation - * will set this Activity as the owner activity on the Dialog. - * - * @param id The id of the managed dialog. - * @param dialog The dialog. - * @param args The dialog arguments provided to {@link #showDialog(int, Bundle)}. - * @see #onCreateDialog(int, Bundle) - * @see #showDialog(int) - * @see #dismissDialog(int) - * @see #removeDialog(int) - * @deprecated Use the new {@link DialogFragment} class with - * {@link FragmentManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ @Override @@ -5771,42 +3162,11 @@ public void super_onPrepareDialog(final int id, final Dialog dialog, final Bundl super.onPrepareDialog(id, dialog, args); } - /** - * Prepare the synthetic task stack that will be generated during Up navigation - * from a different task. - * - *

This method receives the {@link android.app.TaskStackBuilder} with the constructed series - * of - * Intents as generated by {@link #onCreateNavigateUpTaskStack(android.app.TaskStackBuilder)}. - * If any extra data should be added to these intents before launching the new task, - * the application should override this method and add that data here.

- * - * @param builder A TaskStackBuilder that has been populated with Intents by - * onCreateNavigateUpTaskStack. - */ - @Override public void super_onPrepareNavigateUpTaskStack(final android.app.TaskStackBuilder builder) { super.onPrepareNavigateUpTaskStack(builder); } - /** - * Prepare the Screen's standard options menu to be displayed. This is - * called right before the menu is shown, every time it is shown. You can - * use this method to efficiently enable/disable items or otherwise - * dynamically modify the contents. - * - *

The default implementation updates the system menu items based on the - * activity's state. Deriving classes should always call through to the - * base class implementation. - * - * @param menu The options menu as last shown or first initialized by - * onCreateOptionsMenu(). - * @return You must return true for the menu to be displayed; - * if you return false it will not be shown. - * @see #onCreateOptionsMenu - */ - @Override public boolean super_onPrepareOptionsMenu(final Menu menu) { return super.onPrepareOptionsMenu(menu); @@ -5827,43 +3187,11 @@ public void super_onPrepareSupportNavigateUpTaskStack(@NonNull final TaskStackBu super.onPrepareSupportNavigateUpTaskStack(builder); } - /** - * This is called when the user is requesting an assist, to provide references - * to content related to the current activity. Before being called, the - * {@code outContent} Intent is filled with the base Intent of the activity (the Intent - * returned by {@link #getIntent()}). The Intent's extras are stripped of any types - * that are not valid for {@link PersistableBundle} or non-framework Parcelables, and - * the flags {@link Intent#FLAG_GRANT_WRITE_URI_PERMISSION} and - * {@link Intent#FLAG_GRANT_PERSISTABLE_URI_PERMISSION} are cleared from the Intent. - * - *

Custom implementation may adjust the content intent to better reflect the top-level - * context of the activity, and fill in its ClipData with additional content of - * interest that the user is currently viewing. For example, an image gallery application - * that has launched in to an activity allowing the user to swipe through pictures should - * modify the intent to reference the current image they are looking it; such an - * application when showing a list of pictures should add a ClipData that has - * references to all of the pictures currently visible on screen.

- * - * @param outContent The assist content to return. - */ - @Override public void super_onProvideAssistContent(final AssistContent outContent) { super.onProvideAssistContent(outContent); } - /** - * This is called when the user is requesting an assist, to build a full - * {@link Intent#ACTION_ASSIST} Intent with all of the context of the current - * application. You can override this method to place into the bundle anything - * you would like to appear in the {@link Intent#EXTRA_ASSIST_CONTEXT} part - * of the assist Intent. - * - *

This function will be called after any global assist callbacks that had - * been registered with {@link Application#registerOnProvideAssistDataListener - * Application.registerOnProvideAssistDataListener}. - */ - @Override public void super_onProvideAssistData(final Bundle data) { super.onProvideAssistData(data); @@ -5875,13 +3203,6 @@ public void super_onProvideKeyboardShortcuts(final List d super.onProvideKeyboardShortcuts(data, menu, deviceId); } - /** - * Override to generate the desired referrer for the content currently being shown - * by the app. The default implementation returns null, meaning the referrer will simply - * be the android-app: of the package name of this activity. Return a non-null Uri to - * have that supplied as the {@link Intent#EXTRA_REFERRER} of any activities started from it. - */ - @Override public Uri super_onProvideReferrer() { return super.onProvideReferrer(); @@ -5893,79 +3214,17 @@ public void super_onRequestPermissionsResult(final int requestCode, super.onRequestPermissionsResult(requestCode, permissions, grantResults); } - /** - * Called after {@link #onStop} when the current activity is being - * re-displayed to the user (the user has navigated back to it). It will - * be followed by {@link #onStart} and then {@link #onResume}. - * - *

For activities that are using raw {@link Cursor} objects (instead of - * creating them through - * {@link #managedQuery(Uri, String[], String, String[], String)}, - * this is usually the place - * where the cursor should be requeried (because you had deactivated it in - * {@link #onStop}. - * - *

Derived classes must call through to the super class's - * implementation of this method. If they do not, an exception will be - * thrown.

- * - * @see #onStop - * @see #onStart - * @see #onResume - */ - @Override public void super_onRestart() { super.onRestart(); } - /** - * This is the same as {@link #onRestoreInstanceState(Bundle)} but is called for activities - * created with the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. The {@link PersistableBundle} passed - * came from the restored PersistableBundle first - * saved in {@link #onSaveInstanceState(Bundle, PersistableBundle)}. - * - *

This method is called between {@link #onStart} and - * {@link #onPostCreate}. - * - *

If this method is called {@link #onRestoreInstanceState(Bundle)} will not be called. - * - * @param savedInstanceState the data most recently supplied in {@link #onSaveInstanceState}. - * @param persistentState the data most recently supplied in {@link #onSaveInstanceState}. - * @see #onRestoreInstanceState(Bundle) - * @see #onCreate - * @see #onPostCreate - * @see #onResume - * @see #onSaveInstanceState - */ - @Override public void super_onRestoreInstanceState(final Bundle savedInstanceState, final PersistableBundle persistentState) { super.onRestoreInstanceState(savedInstanceState, persistentState); } - /** - * This method is called after {@link #onStart} when the activity is - * being re-initialized from a previously saved state, given here in - * savedInstanceState. Most implementations will simply use {@link #onCreate} - * to restore their state, but it is sometimes convenient to do it here - * after all of the initialization has been done or to allow subclasses to - * decide whether to use your default implementation. The default - * implementation of this method performs a restore of any view state that - * had previously been frozen by {@link #onSaveInstanceState}. - * - *

This method is called between {@link #onStart} and - * {@link #onPostCreate}. - * - * @param savedInstanceState the data most recently supplied in {@link #onSaveInstanceState}. - * @see #onCreate - * @see #onPostCreate - * @see #onResume - * @see #onSaveInstanceState - */ - @Override public void super_onRestoreInstanceState(final Bundle savedInstanceState) { super.onRestoreInstanceState(savedInstanceState); @@ -5981,21 +3240,6 @@ public void super_onResumeFragments() { super.onResumeFragments(); } - /** - * This is the same as {@link #onSaveInstanceState} but is called for activities - * created with the attribute {@link android.R.attr#persistableMode} set to - * persistAcrossReboots. The {@link PersistableBundle} passed - * in will be saved and presented in {@link #onCreate(Bundle, PersistableBundle)} - * the first time that this activity is restarted following the next device reboot. - * - * @param outState Bundle in which to place your saved state. - * @param outPersistentState State which will be saved across reboots. - * @see #onSaveInstanceState(Bundle) - * @see #onCreate - * @see #onRestoreInstanceState(Bundle, PersistableBundle) - * @see #onPause - */ - @Override public void super_onSaveInstanceState(final Bundle outState, final PersistableBundle outPersistentState) { @@ -6007,38 +3251,11 @@ public void super_onSaveInstanceState(final Bundle outState) { super.onSaveInstanceState(outState); } - /** - * This hook is called when the user signals the desire to start a search. - * - *

You can use this function as a simple way to launch the search UI, in response to a - * menu item, search button, or other widgets within your activity. Unless overidden, - * calling this function is the same as calling - * {@link #startSearch startSearch(null, false, null, false)}, which launches - * search for the current activity as specified in its manifest, see {@link SearchManager}. - * - *

You can override this function to force global search, e.g. in response to a dedicated - * search key, or to block search entirely (by simply returning false). - * - *

Note: when running in a {@link Configuration#UI_MODE_TYPE_TELEVISION}, the default - * implementation changes to simply return false and you must supply your own custom - * implementation if you want to support search.

- * - * @param searchEvent The {@link SearchEvent} that signaled this search. - * @return Returns {@code true} if search launched, and {@code false} if the activity does - * not respond to search. The default implementation always returns {@code true}, except - * when in {@link Configuration#UI_MODE_TYPE_TELEVISION} mode where it returns false. - * @see SearchManager - */ - @Override public boolean super_onSearchRequested(@Nullable final SearchEvent searchEvent) { return super.onSearchRequested(searchEvent); } - /** - * @see #onSearchRequested(SearchEvent) - */ - @Override public boolean super_onSearchRequested() { return super.onSearchRequested(); @@ -6088,35 +3305,11 @@ public void super_onTitleChanged(final CharSequence title, final int color) { super.onTitleChanged(title, color); } - /** - * 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. - * - * @param event The touch screen event being processed. - * @return Return true if you have consumed the event, false if you haven't. - * The default implementation always returns false. - */ - @Override public boolean super_onTouchEvent(final MotionEvent event) { return super.onTouchEvent(event); } - /** - * Called when the trackball was moved and not handled by any of the - * views inside of the activity. So, for example, if the trackball moves - * while focus is on a button, you will receive a call here because - * buttons do not normally do anything with trackball events. 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. - * - * @param event The trackball event being processed. - * @return Return true if you have consumed the event, false if you haven't. - * The default implementation always returns false. - */ - @Override public boolean super_onTrackballEvent(final MotionEvent event) { return super.onTrackballEvent(event); @@ -6127,64 +3320,18 @@ public void super_onTrimMemory(final int level) { super.onTrimMemory(level); } - /** - * Called whenever a key, touch, or trackball event is dispatched to the - * activity. Implement this method if you wish to know that the user has - * interacted with the device in some way while your activity is running. - * This callback and {@link #onUserLeaveHint} are intended to help - * activities manage status bar notifications intelligently; specifically, - * for helping activities determine the proper time to cancel a notfication. - * - *

All calls to your activity's {@link #onUserLeaveHint} callback will - * be accompanied by calls to {@link #onUserInteraction}. This - * ensures that your activity will be told of relevant user activity such - * as pulling down the notification pane and touching an item there. - * - *

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. - * - * @see #onUserLeaveHint() - */ - @Override public void super_onUserInteraction() { super.onUserInteraction(); } - /** - * 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, {@link #onUserLeaveHint} will be called, but - * when an incoming phone call causes the in-call Activity to be automatically - * brought to the foreground, {@link #onUserLeaveHint} will not be called on - * the activity being interrupted. In cases when it is invoked, this method - * is called right before the activity's {@link #onPause} callback. - * - *

This callback and {@link #onUserInteraction} are intended to help - * activities manage status bar notifications intelligently; specifically, - * for helping activities determine the proper time to cancel a notfication. - * - * @see #onUserInteraction() - */ - @Override public void super_onUserLeaveHint() { super.onUserLeaveHint(); } /** - * Called when a translucent activity over this activity is becoming opaque or another - * activity is being launched. Activities that override this method must call - * super.onVisibleBehindCanceled() or a SuperNotCalledException will be thrown. - * - *

When this method is called the activity has 500 msec to release any resources it may be - * using while visible in the background. - * If the activity has not returned from this method in 500 msec the system will destroy - * the activity and kill the process in order to recover the resources for another - * process. Otherwise {@link #onStop()} will be called following return. - * - * @see #requestVisibleBehind(boolean) + * @deprecated */ @Override @@ -6197,49 +3344,11 @@ public void super_onWindowAttributesChanged(final WindowManager.LayoutParams par super.onWindowAttributesChanged(params); } - /** - * Called when the current {@link Window} of the activity gains or loses - * focus. This is the best indicator of whether this activity is visible - * to the user. The default implementation clears the key tracking - * state, so should always be called. - * - *

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 (an - * activity that is stopped will not generally get window focus), you - * should not rely on any particular order between the callbacks here and - * those in the other lifecycle methods such as {@link #onResume}. - * - *

As a general rule, however, a resumed activity will have window - * focus... unless it has displayed other dialogs or popups that take - * input focus, in which case the activity itself will not have focus - * when the other windows have it. Likewise, the system may display - * system-level windows (such as the status bar notification panel or - * a system alert) which will temporarily take window input focus without - * pausing the foreground activity. - * - * @param hasFocus Whether the window of this activity has focus. - * @see #hasWindowFocus() - * @see #onResume - * @see View#onWindowFocusChanged(boolean) - */ - @Override public void super_onWindowFocusChanged(final boolean hasFocus) { super.onWindowFocusChanged(hasFocus); } - /** - * Give the Activity a chance to control the UI for an action mode requested - * by the system. - * - *

Note: If you are looking for a notification callback that an action mode - * has been started for this activity, see {@link #onActionModeStarted(android.view.ActionMode)}.

- * - * @param callback The callback that should control the new action mode - * @return The new action mode, or null if the activity does not want to - * provide special handling for this action mode. (It will be handled by the system.) - */ @Nullable @Override public android.view.ActionMode super_onWindowStartingActionMode( @@ -6247,9 +3356,6 @@ public android.view.ActionMode super_onWindowStartingActionMode( return super.onWindowStartingActionMode(callback); } - /** - * {@inheritDoc} - */ @Nullable @Override public android.view.ActionMode super_onWindowStartingActionMode( @@ -6264,14 +3370,6 @@ public ActionMode super_onWindowStartingSupportActionMode( return super.onWindowStartingSupportActionMode(callback); } - /** - * Programmatically opens the context menu for a particular {@code view}. - * The {@code view} should have been added via - * {@link #registerForContextMenu(View)}. - * - * @param view The view to show the context menu for. - */ - @Override public void super_openContextMenu(final View view) { super.openContextMenu(view); @@ -6305,48 +3403,20 @@ public SQLiteDatabase super_openOrCreateDatabase(final String name, final int mo return super.openOrCreateDatabase(name, mode, factory, errorHandler); } - /** - * Call immediately after one of the flavors of {@link #startActivity(Intent)} - * or {@link #finish} to specify an explicit transition animation to - * perform next. - * - *

As of {@link Build.VERSION_CODES#JELLY_BEAN} an alternative - * to using this with starting activities is to supply the desired animation - * information through a {@link ActivityOptions} bundle to - * {@link #startActivity(Intent, Bundle)} or a related function. This allows - * you to specify a custom animation even when starting an activity from - * outside the context of the current top activity. - * - * @param enterAnim A resource ID of the animation resource to use for - * the incoming activity. Use 0 for no animation. - * @param exitAnim A resource ID of the animation resource to use for - */ - @Override public void super_overridePendingTransition(final int enterAnim, final int exitAnim) { super.overridePendingTransition(enterAnim, exitAnim); } + /** + * @deprecated + */ + @Override public Drawable super_peekWallpaper() { return super.peekWallpaper(); } - /** - * Postpone the entering activity transition when Activity was started with - * {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * Pair[])}. - *

This method gives the Activity the ability to delay starting the entering and - * shared element transitions until all data is loaded. Until then, the Activity won't - * draw into its window, leaving the window transparent. This may also cause the - * returning animation to be delayed until data is ready. This method should be - * called in {@link #onCreate(Bundle)} or in - * {@link #onActivityReenter(int, Intent)}. - * {@link #startPostponedEnterTransition()} must be called to allow the Activity to - * start the transitions. If the Activity did not use - * {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * Pair[])}, then this method - * does nothing.

- */ - @Override public void super_postponeEnterTransition() { super.postponeEnterTransition(); @@ -6357,45 +3427,16 @@ public void super_putExtraData(final SupportActivity.ExtraData extraData) { super.putExtraData(extraData); } - /** - * Cause this Activity to be recreated with a new instance. This results - * in essentially the same flow as when the Activity is created due to - * a configuration change -- the current instance will go through its - * lifecycle to {@link #onDestroy} and a new instance then created after it. - */ - @Override public void super_recreate() { super.recreate(); } - /** - * Add a new {@link ComponentCallbacks} to the base application of the - * Context, which will be called at the same times as the ComponentCallbacks - * methods of activities and other components are called. Note that you - * must be sure to use {@link #unregisterComponentCallbacks} when - * appropriate in the future; this will not be removed for you. - * - * @param callback The interface to call. This can be either a - * {@link ComponentCallbacks} or {@link ComponentCallbacks2} interface. - */ - @Override public void super_registerComponentCallbacks(final ComponentCallbacks callback) { super.registerComponentCallbacks(callback); } - /** - * Registers a context menu to be shown for the given view (multiple views - * can show the context menu). This method will set the - * {@link OnCreateContextMenuListener} on the view to this activity, so - * {@link #onCreateContextMenu(ContextMenu, View, ContextMenuInfo)} will be - * called when it is time to show the context menu. - * - * @param view The view that should show a context menu. - * @see #unregisterForContextMenu(View) - */ - @Override public void super_registerForContextMenu(final View view) { super.registerForContextMenu(view); @@ -6426,97 +3467,41 @@ public Intent super_registerReceiver(final BroadcastReceiver receiver, return super.registerReceiver(receiver, filter, broadcastPermission, scheduler, flags); } - /** - * Ask that the local app instance of this activity be released to free up its memory. - * This is asking for the activity to be destroyed, but does not finish the activity -- - * a new instance of the activity will later be re-created if needed due to the user - * navigating back to it. - * - * @return Returns true if the activity was in a state that it has started the process - * of destroying its current instance; returns false if for any reason this could not - * be done: it is currently visible to the user, it is already being destroyed, it is - * being finished, it hasn't yet saved its state, etc. - */ - @Override public boolean super_releaseInstance() { return super.releaseInstance(); } + /** + * @deprecated + */ + @Override public void super_removeStickyBroadcast(final Intent intent) { super.removeStickyBroadcast(intent); } + /** + * @deprecated + */ + @Override public void super_removeStickyBroadcastAsUser(final Intent intent, final UserHandle user) { super.removeStickyBroadcastAsUser(intent, user); } - /** - * Report to the system that your app is now fully drawn, purely for diagnostic - * purposes (calling it does not impact the visible behavior of the activity). - * This is only used to help instrument application launch times, so that the - * app can report when it is fully in a usable state; without this, the only thing - * the system itself can determine is the point at which the activity's window - * is first drawn and displayed. To participate in app launch time - * measurement, you should always call this method after first launch (when - * {@link #onCreate(Bundle)} is called), at the point where you have - * entirely drawn your UI and populated with all of the significant data. You - * can safely call this method any time after first launch as well, in which case - * it will simply be ignored. - */ - @Override public void super_reportFullyDrawn() { super.reportFullyDrawn(); } - /** - * Create {@link DragAndDropPermissions} object bound to this activity and controlling the - * access permissions for content URIs associated with the {@link DragEvent}. - * - * @param event Drag event - * @return The {@link DragAndDropPermissions} object used to control access to the content URIs. - * Null if no content URIs are associated with the event or if permissions could not be - * granted. - */ - @Override public DragAndDropPermissions super_requestDragAndDropPermissions(final DragEvent event) { return super.requestDragAndDropPermissions(event); } /** - * Activities that want to remain visible behind a translucent activity above them must call - * this method anytime between the start of {@link #onResume()} and the return from - * {@link #onPause()}. If this call is successful then the activity will remain visible after - * {@link #onPause()} is called, and is allowed to continue playing media in the background. - * - *

The actions of this call are reset each time that this activity is brought to the - * front. That is, every time {@link #onResume()} is called the activity will be assumed - * to not have requested visible behind. Therefore, if you want this activity to continue to - * be visible in the background you must call this method again. - * - *

Only fullscreen opaque activities may make this call. I.e. this call is a nop - * for dialog and translucent activities. - * - *

Under all circumstances, the activity must stop playing and release resources prior to or - * within a call to {@link #onVisibleBehindCanceled()} or if this call returns false. - * - *

False will be returned any time this method is called between the return of onPause and - * the next call to onResume. - * - * @param visible true to notify the system that the activity wishes to be visible behind other - * translucent activities, false to indicate otherwise. Resources must be - * released when passing false to this method. - * @return the resulting visibiity state. If true the activity will remain visible beyond - * {@link #onPause()} if the next activity is translucent or not fullscreen. If false - * then the activity may not count on being visible behind other translucent activities, - * and must stop any media playback and release resources. - * Returning false may occur in lieu of a call to {@link #onVisibleBehindCanceled()} so - * the return value must be checked. - * @see #onVisibleBehindCanceled() + * @deprecated */ @Override @@ -6578,16 +3563,28 @@ public void super_sendOrderedBroadcastAsUser(final Intent intent, final UserHand scheduler, initialCode, initialData, initialExtras); } + /** + * @deprecated + */ + @Override public void super_sendStickyBroadcast(final Intent intent) { super.sendStickyBroadcast(intent); } + /** + * @deprecated + */ + @Override public void super_sendStickyBroadcastAsUser(final Intent intent, final UserHandle user) { super.sendStickyBroadcastAsUser(intent, user); } + /** + * @deprecated + */ + @Override public void super_sendStickyOrderedBroadcast(final Intent intent, final BroadcastReceiver resultReceiver, final Handler scheduler, final int initialCode, @@ -6596,6 +3593,10 @@ public void super_sendStickyOrderedBroadcast(final Intent intent, initialData, initialExtras); } + /** + * @deprecated + */ + @Override public void super_sendStickyOrderedBroadcastAsUser(final Intent intent, final UserHandle user, final BroadcastReceiver resultReceiver, final Handler scheduler, final int initialCode, @@ -6604,34 +3605,11 @@ public void super_sendStickyOrderedBroadcastAsUser(final Intent intent, final Us initialData, initialExtras); } - /** - * Set a {@link android.widget.Toolbar Toolbar} to act as the {@link ActionBar} for this - * Activity window. - * - *

When set to a non-null value the {@link #getActionBar()} method will return - * an {@link ActionBar} object that can be used to control the given toolbar as if it were - * a traditional window decor action bar. The toolbar's menu will be populated with the - * Activity's options menu and the navigation button will be wired through the standard - * {@link android.R.id#home home} menu select action.

- * - *

In order to use a Toolbar within the Activity's window content the application - * must not request the window feature {@link Window#FEATURE_ACTION_BAR FEATURE_ACTION_BAR}.

- * - * @param toolbar Toolbar to set as the Activity's action bar, or {@code null} to clear it - */ - @Override public void super_setActionBar(@Nullable final android.widget.Toolbar toolbar) { super.setActionBar(toolbar); } - /** - * Set the {@link TransitionManager} to use for default transitions in this window. - * Requires {@link Window#FEATURE_CONTENT_TRANSITIONS}. - * - * @param tm The TransitionManager to use for scene changes. - */ - @Override public void super_setContentTransitionManager(final TransitionManager tm) { super.setContentTransitionManager(tm); @@ -6657,15 +3635,6 @@ public void super_setEnterSharedElementCallback(final SharedElementCallback call super.setEnterSharedElementCallback(callback); } - /** - * When {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * View, String)} was used - * to start an Activity, callback - * will be called to handle shared elements on the launched Activity. This requires - * {@link Window#FEATURE_ACTIVITY_TRANSITIONS}. - * - * @param callback Used to manipulate shared element transitions on the launched Activity. - */ - @Override public void super_setEnterSharedElementCallback( final android.app.SharedElementCallback callback) { @@ -6677,62 +3646,22 @@ public void super_setExitSharedElementCallback(final SharedElementCallback liste super.setExitSharedElementCallback(listener); } - /** - * When {@link ActivityOptions#makeSceneTransitionAnimation(Activity, * View, String)} was used - * to start an Activity, callback - * will be called to handle shared elements on the launching Activity. Most - * calls will only come when returning from the started Activity. - * This requires {@link Window#FEATURE_ACTIVITY_TRANSITIONS}. - * - * @param callback Used to manipulate shared element transitions on the launching Activity. - */ - @Override public void super_setExitSharedElementCallback( final android.app.SharedElementCallback callback) { super.setExitSharedElementCallback(callback); } - /** - * Sets whether this activity is finished when touched outside its window's - * bounds. - */ - @Override public void super_setFinishOnTouchOutside(final boolean finish) { super.setFinishOnTouchOutside(finish); } - /** - * Adjust the current immersive mode setting. - * - * Note that changing this value will have no effect on the activity's - * {@link ActivityInfo} structure; that is, if - * android:immersive is set to true - * in the application's manifest entry for this activity, the {@link - * ActivityInfo#flags ActivityInfo.flags} member will - * always have its {@link ActivityInfo#FLAG_IMMERSIVE - * FLAG_IMMERSIVE} bit set. - * - * @see #isImmersive() - * @see ActivityInfo#FLAG_IMMERSIVE - */ - @Override public void super_setImmersive(final boolean i) { super.setImmersive(i); } - /** - * Change the intent returned by {@link #getIntent}. This holds a - * reference to the given intent; it does not copy it. Often used in - * conjunction with {@link #onNewIntent}. - * - * @param newIntent The new Intent object to return from getIntent - * @see #getIntent - * @see #onNewIntent - */ - @Override public void super_setIntent(final Intent newIntent) { super.setIntent(newIntent); @@ -6743,22 +3672,16 @@ public void super_setPictureInPictureParams(final PictureInPictureParams params) super.setPictureInPictureParams(params); } - /** - * Change the desired orientation of this activity. If the activity - * is currently in the foreground or otherwise impacting the screen - * orientation, the screen will immediately be changed (possibly causing - * the activity to be restarted). Otherwise, this will be used the next - * time the activity is visible. - * - * @param requestedOrientation An orientation constant as used in - * {@link ActivityInfo#screenOrientation ActivityInfo.screenOrientation}. - */ - @Override public void super_setRequestedOrientation(final int requestedOrientation) { super.setRequestedOrientation(requestedOrientation); } + @Override + public void super_setShowWhenLocked(final boolean showWhenLocked) { + super.setShowWhenLocked(showWhenLocked); + } + @Override public void super_setSupportActionBar(@Nullable final Toolbar toolbar) { super.setSupportActionBar(toolbar); @@ -6800,19 +3723,6 @@ public void super_setSupportProgressBarVisibility(final boolean visible) { super.setSupportProgressBarVisibility(visible); } - /** - * Sets information describing the task with this activity for presentation inside the Recents - * System UI. When {@link ActivityManager#getRecentTasks} is called, the activities of each task - * are traversed in order from the topmost activity to the bottommost. The traversal continues - * for each property until a suitable value is found. For each task the taskDescription will be - * returned in {@link ActivityManager.TaskDescription}. - * - * @param taskDescription The TaskDescription properties that describe the task with this - * activity - * @see ActivityManager#getRecentTasks - * @see ActivityManager.TaskDescription - */ - @Override public void super_setTaskDescription(final ActivityManager.TaskDescription taskDescription) { super.setTaskDescription(taskDescription); @@ -6823,39 +3733,18 @@ public void super_setTheme(@StyleRes final int resid) { super.setTheme(resid); } - /** - * Change the title associated with this activity. If this is a - * top-level activity, the title for its window will change. If it - * is an embedded activity, the parent can do whatever it wants - * with it. - */ - @Override public void super_setTitle(final CharSequence title) { super.setTitle(title); } - /** - * Change the title associated with this activity. If this is a - * top-level activity, the title for its window will change. If it - * is an embedded activity, the parent can do whatever it wants - * with it. - */ - @Override public void super_setTitle(final int titleId) { super.setTitle(titleId); } /** - * Change the color of the title associated with this activity. - *

- * This method is deprecated starting in API Level 11 and replaced by action - * bar styles. For information on styling the Action Bar, read the Action Bar developer - * guide. - * - * @deprecated Use action bar styles instead. + * @deprecated */ @Override @@ -6863,77 +3752,16 @@ public void super_setTitleColor(final int textColor) { super.setTitleColor(textColor); } - /** - * Control whether this activity's main window is visible. This is intended - * only for the special case of an activity that is not going to show a - * UI itself, but can't just finish prior to onResume() because it needs - * to wait for a service binding or such. Setting this to false allows - * you to prevent your UI from being shown during that time. - * - *

The default value for this is taken from the - * {@link android.R.attr#windowNoDisplay} attribute of the activity's theme. - */ + @Override + public void super_setTurnScreenOn(final boolean turnScreenOn) { + super.setTurnScreenOn(turnScreenOn); + } @Override public void super_setVisible(final boolean visible) { super.setVisible(visible); } - /** - * Enable or disable virtual reality (VR) mode for this Activity. - * - *

VR mode is a hint to Android system to switch to a mode optimized for VR applications - * while this Activity has user focus.

- * - *

It is recommended that applications additionally declare - * {@link android.R.attr#enableVrMode} in their manifest to allow for smooth activity - * transitions when switching between VR activities.

- * - *

If the requested {@link VrListenerService} component is not available, - * VR mode will not be started. Developers can handle this case as follows:

- * - *
-     * String servicePackage = "com.whatever.app";
-     * String serviceClass = "com.whatever.app.MyVrListenerService";
-     *
-     * // Name of the component of the VrListenerService to start.
-     * ComponentName serviceComponent = new ComponentName(servicePackage, serviceClass);
-     *
-     * try {
-     *    setVrModeEnabled(true, myComponentName);
-     * } catch (PackageManager.NameNotFoundException e) {
-     *        List<ApplicationInfo> installed = getPackageManager().getInstalledApplications(0);
-     *        boolean isInstalled = false;
-     *        for (ApplicationInfo app : installed) {
-     *            if (app.packageName.equals(servicePackage)) {
-     *                isInstalled = true;
-     *                break;
-     *            }
-     *        }
-     *        if (isInstalled) {
-     *            // Package is installed, but not enabled in Settings.  Let user enable it.
-     *            startActivity(new Intent(Settings.ACTION_VR_LISTENER_SETTINGS));
-     *        } else {
-     *            // Package is not installed.  Send an intent to download this.
-     *            sentIntentToLaunchAppStore(servicePackage);
-     *        }
-     * }
-     * 
- * - * @param enabled {@code true} to enable this mode. - * @param requestedComponent the name of the component to use as a - * {@link VrListenerService} while VR mode is enabled. - * @throws PackageManager.NameNotFoundException if the given component - * to run as a {@link VrListenerService} is not - * installed, or has - * not been enabled in user settings. - * @see PackageManager#FEATURE_VR_MODE - * @see PackageManager#FEATURE_VR_MODE_HIGH_PERFORMANCE - * @see VrListenerService - * @see Settings#ACTION_VR_LISTENER_SETTINGS - * @see android.R.attr#enableVrMode - */ - @Override public void super_setVrModeEnabled(final boolean enabled, @NonNull final ComponentName requestedComponent) @@ -6941,95 +3769,44 @@ public void super_setVrModeEnabled(final boolean enabled, super.setVrModeEnabled(enabled, requestedComponent); } + /** + * @deprecated + */ + @Override public void super_setWallpaper(final Bitmap bitmap) throws IOException { super.setWallpaper(bitmap); } + /** + * @deprecated + */ + @Override public void super_setWallpaper(final InputStream data) throws IOException { super.setWallpaper(data); } - /** - * Gets whether you should show UI with rationale for requesting a permission. - * You should do this only if you do not have the permission and the context in - * which the permission is requested does not clearly communicate to the user - * what would be the benefit from granting this permission. - *

- * For example, if you write a camera app, requesting the camera permission - * would be expected by the user and no rationale for why it is requested is - * needed. If however, the app needs location for tagging photos then a non-tech - * savvy user may wonder how location is related to taking photos. In this case - * you may choose to show UI with rationale of requesting this permission. - *

- * - * @param permission A permission your app wants to request. - * @return Whether you can show permission rationale UI. - * @see #checkSelfPermission(String) - * @see #requestPermissions(String[], int) - * @see #onRequestPermissionsResult(int, String[], int[]) - */ - @Override public boolean super_shouldShowRequestPermissionRationale(@NonNull final String permission) { return super.shouldShowRequestPermissionRationale(permission); } - /** - * Returns true if the app should recreate the task when navigating 'up' from this activity - * by using targetIntent. - * - *

If this method returns false the app can trivially call - * {@link #navigateUpTo(Intent)} using the same parameters to correctly perform - * up navigation. If this method returns false, the app should synthesize a new task stack - * by using {@link TaskStackBuilder} or another similar mechanism to perform up navigation.

- * - * @param targetIntent An intent representing the target destination for up navigation - * @return true if navigating up should recreate a new task stack, false if the same task - * should be used for the destination - */ - @Override public boolean super_shouldUpRecreateTask(final Intent targetIntent) { return super.shouldUpRecreateTask(targetIntent); } - /** - * Ask to have the current assistant shown to the user. This only works if the calling - * activity is the current foreground activity. It is the same as calling - * {@link VoiceInteractionService#showSession - * VoiceInteractionService.showSession} and requesting all of the possible context. - * The receiver will always see - * {@link VoiceInteractionSession#SHOW_SOURCE_APPLICATION} set. - * - * @return Returns true if the assistant was successfully invoked, else false. For example - * false will be returned if the caller is not the current top activity. - */ - @Override public boolean super_showAssist(final Bundle args) { return super.showAssist(args); } - /** - * Shows the user the system defined message for telling the user how to exit - * lock task mode. The task containing this activity must be in lock task mode at the time - * of this call for the message to be displayed. - */ - @Override public void super_showLockTaskEscapeMessage() { super.showLockTaskEscapeMessage(); } - /** - * Start an action mode of the default type {@link android.view.ActionMode#TYPE_PRIMARY}. - * - * @param callback Callback that will manage lifecycle events for this action mode - * @return The ActionMode that was started, or null if it was canceled - * @see android.view.ActionMode - */ @Nullable @Override public android.view.ActionMode super_startActionMode( @@ -7037,15 +3814,6 @@ public android.view.ActionMode super_startActionMode( return super.startActionMode(callback); } - /** - * Start an action mode of the given type. - * - * @param callback Callback that will manage lifecycle events for this action mode - * @param type One of {@link android.view.ActionMode#TYPE_PRIMARY} or {@link - * android.view.ActionMode#TYPE_FLOATING}. - * @return The ActionMode that was started, or null if it was canceled - * @see android.view.ActionMode - */ @Nullable @Override public android.view.ActionMode super_startActionMode( @@ -7053,79 +3821,21 @@ public android.view.ActionMode super_startActionMode( return super.startActionMode(callback, type); } - /** - * Same as {@link #startActivities(Intent[], Bundle)} with no options - * specified. - * - * @param intents The intents to start. - * @see #startActivities(Intent[], Bundle) - * @see #startActivityForResult - */ - @Override public void super_startActivities(final Intent[] intents) { super.startActivities(intents); } - /** - * Launch a new activity. You will not receive any information about when - * the activity exits. This implementation overrides the base version, - * providing information about - * the activity performing the launch. Because of this additional - * information, the {@link Intent#FLAG_ACTIVITY_NEW_TASK} launch flag is not - * required; if not specified, the new activity will be added to the - * task of the caller. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param intents The intents to start. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see #startActivities(Intent[]) - * @see #startActivityForResult - */ - @Override public void super_startActivities(final Intent[] intents, @Nullable final Bundle options) { super.startActivities(intents, options); } - /** - * Same as {@link #startActivity(Intent, Bundle)} with no options - * specified. - * - * @param intent The intent to start. - * @see #startActivity(Intent, Bundle) - * @see #startActivityForResult - */ - @Override public void super_startActivity(final Intent intent) { super.startActivity(intent); } - /** - * Launch a new activity. You will not receive any information about when - * the activity exits. This implementation overrides the base version, - * providing information about - * the activity performing the launch. Because of this additional - * information, the {@link Intent#FLAG_ACTIVITY_NEW_TASK} launch flag is not - * required; if not specified, the new activity will be added to the - * task of the caller. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param intent The intent to start. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see #startActivity(Intent) - * @see #startActivityForResult - */ - @Override public void super_startActivity(final Intent intent, @Nullable final Bundle options) { super.startActivity(intent, options); @@ -7142,40 +3852,12 @@ public void super_startActivityForResult(final Intent intent, final int requestC super.startActivityForResult(intent, requestCode, options); } - /** - * Same as calling {@link #startActivityFromChild(Activity, Intent, int, Bundle)} - * with no options. - * - * @param child The activity making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @see #startActivity - * @see #startActivityForResult - */ - @Override public void super_startActivityFromChild(@NonNull final Activity child, @RequiresPermission final Intent intent, final int requestCode) { super.startActivityFromChild(child, intent, requestCode); } - /** - * This is called when a child activity of this one calls its - * {@link #startActivity} or {@link #startActivityForResult} method. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param child The activity making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see #startActivity - * @see #startActivityForResult - */ - @Override public void super_startActivityFromChild(@NonNull final Activity child, @RequiresPermission final Intent intent, final int requestCode, @@ -7195,41 +3877,12 @@ public void super_startActivityFromFragment(final Fragment fragment, final Inten super.startActivityFromFragment(fragment, intent, requestCode, options); } - /** - * Same as calling {@link #startActivityFromFragment(android.app.Fragment, Intent, int, Bundle)} - * with no options. - * - * @param fragment The fragment making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @see android.app.Fragment#startActivity - * @see android.app.Fragment#startActivityForResult - */ - @Override public void super_startActivityFromFragment(@NonNull final android.app.Fragment fragment, @RequiresPermission final Intent intent, final int requestCode) { super.startActivityFromFragment(fragment, intent, requestCode); } - /** - * This is called when a Fragment in this activity calls its - * {@link android.app.Fragment#startActivity} or {@link android.app.Fragment#startActivityForResult} - * method. - * - *

This method throws {@link ActivityNotFoundException} - * if there was no Activity found to run the given Intent. - * - * @param fragment The fragment making the call. - * @param intent The intent to start. - * @param requestCode Reply request code. < 0 if reply is not requested. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @see android.app.Fragment#startActivity - * @see android.app.Fragment#startActivityForResult - */ - @Override public void super_startActivityFromFragment(@NonNull final android.app.Fragment fragment, @RequiresPermission final Intent intent, final int requestCode, @@ -7237,55 +3890,12 @@ public void super_startActivityFromFragment(@NonNull final android.app.Fragment super.startActivityFromFragment(fragment, intent, requestCode, options); } - /** - * Same as calling {@link #startActivityIfNeeded(Intent, int, Bundle)} - * with no options. - * - * @param intent The intent to start. - * @param requestCode If >= 0, this code will be returned in - * onActivityResult() when the activity exits, as described in - * {@link #startActivityForResult}. - * @return If a new activity was launched then true is returned; otherwise - * false is returned and you must handle the Intent yourself. - * @see #startActivity - * @see #startActivityForResult - */ - @Override public boolean super_startActivityIfNeeded(@RequiresPermission @NonNull final Intent intent, final int requestCode) { return super.startActivityIfNeeded(intent, requestCode); } - /** - * A special variation to launch an activity only if a new activity - * instance is needed to handle the given Intent. In other words, this is - * just like {@link #startActivityForResult(Intent, int)} except: if you are - * using the {@link Intent#FLAG_ACTIVITY_SINGLE_TOP} flag, or - * singleTask or singleTop - * {@link android.R.styleable#AndroidManifestActivity_launchMode launchMode}, - * and the activity - * that handles intent is the same as your currently running - * activity, then a new instance is not needed. In this case, instead of - * the normal behavior of calling {@link #onNewIntent} this function will - * return and you can handle the Intent yourself. - * - *

This function can only be called from a top-level activity; if it is - * called from a child activity, a runtime exception will be thrown. - * - * @param intent The intent to start. - * @param requestCode If >= 0, this code will be returned in - * onActivityResult() when the activity exits, as described in - * {@link #startActivityForResult}. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @return If a new activity was launched then true is returned; otherwise - * false is returned and you must handle the Intent yourself. - * @see #startActivity - * @see #startActivityForResult - */ - @Override public boolean super_startActivityIfNeeded(@RequiresPermission @NonNull final Intent intent, final int requestCode, @Nullable final Bundle options) { @@ -7303,20 +3913,6 @@ public boolean super_startInstrumentation(final ComponentName className, return super.startInstrumentation(className, profileFile, arguments); } - /** - * Same as calling {@link #startIntentSender(IntentSender, Intent, int, int, int, Bundle)} - * with no options. - * - * @param intent The IntentSender to launch. - * @param fillInIntent If non-null, this will be provided as the - * intent parameter to {@link IntentSender#sendIntent}. - * @param flagsMask Intent flags in the original IntentSender that you - * would like to change. - * @param flagsValues Desired values for any bits set in - * flagsMask - * @param extraFlags Always set to 0. - */ - @Override public void super_startIntentSender(final IntentSender intent, @Nullable final Intent fillInIntent, final int flagsMask, final int flagsValues, @@ -7324,26 +3920,6 @@ public void super_startIntentSender(final IntentSender intent, super.startIntentSender(intent, fillInIntent, flagsMask, flagsValues, extraFlags); } - /** - * Like {@link #startActivity(Intent, Bundle)}, but taking a IntentSender - * to start; see - * {@link #startIntentSenderForResult(IntentSender, int, Intent, int, int, int, Bundle)} - * for more information. - * - * @param intent The IntentSender to launch. - * @param fillInIntent If non-null, this will be provided as the - * intent parameter to {@link IntentSender#sendIntent}. - * @param flagsMask Intent flags in the original IntentSender that you - * would like to change. - * @param flagsValues Desired values for any bits set in - * flagsMask - * @param extraFlags Always set to 0. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. If options - * have also been supplied by the IntentSender, options given here will - */ - @Override public void super_startIntentSender(final IntentSender intent, @Nullable final Intent fillInIntent, final int flagsMask, final int flagsValues, @@ -7367,11 +3943,6 @@ public void super_startIntentSenderForResult(final IntentSender intent, final in extraFlags); } - /** - * Same as calling {@link #startIntentSenderFromChild(Activity, IntentSender, * int, Intent, - * int, int, int, Bundle)} with no options. - */ - @Override public void super_startIntentSenderFromChild(final Activity child, final IntentSender intent, final int requestCode, final Intent fillInIntent, final int flagsMask, @@ -7380,13 +3951,6 @@ public void super_startIntentSenderFromChild(final Activity child, final IntentS flagsValues, extraFlags); } - /** - * Like {@link #startActivityFromChild(Activity, Intent, int)}, but - * taking a IntentSender; see - * {@link #startIntentSenderForResult(IntentSender, int, Intent, int, int, int)} - * for more information. - */ - @Override public void super_startIntentSenderFromChild(final Activity child, final IntentSender intent, final int requestCode, final Intent fillInIntent, final int flagsMask, @@ -7405,70 +3969,18 @@ public void super_startIntentSenderFromFragment(final Fragment fragment, flagsValues, extraFlags, options); } - /** - * Starts a local voice interaction session. When ready, - * {@link #onLocalVoiceInteractionStarted()} is called. You can pass a bundle of private options - * to the registered voice interaction service. - * - * @param privateOptions a Bundle of private arguments to the current voice interaction service - */ - @Override public void super_startLocalVoiceInteraction(final Bundle privateOptions) { super.startLocalVoiceInteraction(privateOptions); } - /** - * Request to put this Activity in a mode where the user is locked to the - * current task. - * - * This will prevent the user from launching other apps, going to settings, or reaching the - * home screen. This does not include those apps whose {@link android.R.attr#lockTaskMode} - * values permit launching while locked. - * - * If {@link DevicePolicyManager#isLockTaskPermitted(String)} returns true or - * lockTaskMode=lockTaskModeAlways for this component then the app will go directly into - * Lock Task mode. The user will not be able to exit this mode until - * {@link Activity#stopLockTask()} is called. - * - * If {@link DevicePolicyManager#isLockTaskPermitted(String)} returns false - * then the system will prompt the user with a dialog requesting permission to enter - * this mode. When entered through this method the user can exit at any time through - * an action described by the request dialog. Calling stopLockTask will also exit the - * mode. - * - * @see android.R.attr#lockTaskMode - */ - @Override public void super_startLockTask() { super.startLockTask(); } /** - * This method allows the activity to take care of managing the given - * {@link Cursor}'s lifecycle for you based on the activity's lifecycle. - * That is, when the activity is stopped it will automatically call - * {@link Cursor#deactivate} on the given Cursor, and when it is later restarted - * it will call {@link Cursor#requery} for you. When the activity is - * destroyed, all managed Cursors will be closed automatically. - * - * If you are targeting {@link Build.VERSION_CODES#HONEYCOMB} - * or later, consider instead using {@link LoaderManager} instead, available - * via {@link #getLoaderManager()}. - * - *

Warning: Do not call {@link Cursor#close()} on cursor obtained from - * {@link #managedQuery}, because the activity will do that for you at the appropriate time. - * However, if you call {@link #stopManagingCursor} on a cursor from a managed query, the system - * will not automatically close the cursor and, in that case, you must call - * {@link Cursor#close()}.

- * - * @param c The Cursor to be managed. - * @see #managedQuery(Uri, String[], String, String[], String) - * @see #stopManagingCursor - * @deprecated Use the new {@link CursorLoader} class with - * {@link LoaderManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ @Override @@ -7476,104 +3988,23 @@ public void super_startManagingCursor(final Cursor c) { super.startManagingCursor(c); } - /** - * Same as calling {@link #startNextMatchingActivity(Intent, Bundle)} with - * no options. - * - * @param intent The intent to dispatch to the next activity. For - * correct behavior, this must be the same as the Intent that started - * your own activity; the only changes you can make are to the extras - * inside of it. - * @return Returns a boolean indicating whether there was another Activity - * to start: true if there was a next activity to start, false if there - * wasn't. In general, if true is returned you will then want to call - * finish() on yourself. - */ - @Override public boolean super_startNextMatchingActivity( @RequiresPermission @NonNull final Intent intent) { return super.startNextMatchingActivity(intent); } - /** - * Special version of starting an activity, for use when you are replacing - * other activity components. You can use this to hand the Intent off - * to the next Activity that can handle it. You typically call this in - * {@link #onCreate} with the Intent returned by {@link #getIntent}. - * - * @param intent The intent to dispatch to the next activity. For - * correct behavior, this must be the same as the Intent that started - * your own activity; the only changes you can make are to the extras - * inside of it. - * @param options Additional options for how the Activity should be started. - * See {@link Context#startActivity(Intent, Bundle) - * Context.startActivity(Intent, Bundle)} for more details. - * @return Returns a boolean indicating whether there was another Activity - * to start: true if there was a next activity to start, false if there - * wasn't. In general, if true is returned you will then want to call - * finish() on yourself. - */ - @Override public boolean super_startNextMatchingActivity(@RequiresPermission @NonNull final Intent intent, @Nullable final Bundle options) { return super.startNextMatchingActivity(intent, options); } - /** - * Begin postponed transitions after {@link #postponeEnterTransition()} was called. - * If postponeEnterTransition() was called, you must call startPostponedEnterTransition() - * to have your Activity start drawing. - */ - @Override public void super_startPostponedEnterTransition() { super.startPostponedEnterTransition(); } - /** - * This hook is called to launch the search UI. - * - *

It is typically called from onSearchRequested(), either directly from - * Activity.onSearchRequested() or from an overridden version in any given - * Activity. If your goal is simply to activate search, it is preferred to call - * onSearchRequested(), which may have been overridden elsewhere in your Activity. If your goal - * is to inject specific data such as context data, it is preferred to override - * onSearchRequested(), so that any callers to it will benefit from the override. - * - * @param initialQuery Any non-null non-empty string will be inserted as - * pre-entered text in the search query box. - * @param selectInitialQuery If true, the initial query will be preselected, which means that - * any further typing will replace it. This is useful for cases - * where - * an entire pre-formed - * query is being inserted. If false, the selection point will be - * placed at the end of the - * inserted query. This is useful when the inserted query is text - * that the user entered, - * and the user would expect to be able to keep typing. This - * parameter is only meaningful - * if initialQuery is a non-empty string. - * @param appSearchData An application can insert application-specific - * context here, in order to improve quality or specificity of its - * own - * searches. This data will be returned with SEARCH intent(s). Null - * if - * no extra data is required. - * @param globalSearch If false, this will only launch the search that has been - * specifically - * defined by the application (which is usually defined as a local - * search). If no default - * search is defined in the current application or activity, global - * search will be launched. - * If true, this will always launch a platform-global (e.g. - * web-based) - * search instead. - * @see SearchManager - * @see #onSearchRequested - */ - @Override public void super_startSearch(@Nullable final String initialQuery, final boolean selectInitialQuery, @Nullable final Bundle appSearchData, @@ -7592,54 +4023,18 @@ public ActionMode super_startSupportActionMode(@NonNull final ActionMode.Callbac return super.startSupportActionMode(callback); } - /** - * Request to terminate the current voice interaction that was previously started - * using {@link #startLocalVoiceInteraction(Bundle)}. When the interaction is - * terminated, {@link #onLocalVoiceInteractionStopped()} will be called. - */ - @Override public void super_stopLocalVoiceInteraction() { super.stopLocalVoiceInteraction(); } - /** - * Allow the user to switch away from the current task. - * - * Called to end the mode started by {@link Activity#startLockTask}. This - * can only be called by activities that have successfully called - * startLockTask previously. - * - * This will allow the user to exit this app and move onto other activities. - *

Note: This method should only be called when the activity is user-facing. That is, - * between onResume() and onPause(). - *

Note: If there are other tasks below this one that are also locked then calling this - * method will immediately finish this task and resume the previous locked one, remaining in - * lockTask mode. - * - * @see android.R.attr#lockTaskMode - * @see ActivityManager#getLockTaskModeState() - */ - @Override public void super_stopLockTask() { super.stopLockTask(); } /** - * Given a Cursor that was previously given to - * {@link #startManagingCursor}, stop the activity's management of that - * cursor. - * - *

Warning: After calling this method on a cursor from a managed query, - * the system will not automatically close the cursor and you must call - * {@link Cursor#close()}.

- * - * @param c The Cursor that was being managed. - * @see #startManagingCursor - * @deprecated Use the new {@link CursorLoader} class with - * {@link LoaderManager} instead; this is also - * available on older platforms through the Android compatibility package. + * @deprecated */ @Override @@ -7687,29 +4082,11 @@ public void super_supportStartPostponedEnterTransition() { super.supportStartPostponedEnterTransition(); } - /** - * Request that key events come to this activity. Use this if your - * activity has no views with focus, but the activity still wants - * a chance to process key events. - * - * @see Window#takeKeyEvents - */ - @Override public void super_takeKeyEvents(final boolean get) { super.takeKeyEvents(get); } - /** - * Similar to {@link #startSearch}, but actually fires off the search query after invoking - * the search dialog. Made available for testing purposes. - * - * @param query The query to trigger. If empty, the request will be ignored. - * @param appSearchData An application can insert application-specific - * context here, in order to improve quality or specificity of its own - * searches. This data will be returned with SEARCH intent(s). Null if - */ - @Override public void super_triggerSearch(final String query, @Nullable final Bundle appSearchData) { super.triggerSearch(query, appSearchData); @@ -7720,24 +4097,11 @@ public void super_unbindService(final ServiceConnection conn) { super.unbindService(conn); } - /** - * Remove a {@link ComponentCallbacks} object that was previously registered - * with {@link #registerComponentCallbacks(ComponentCallbacks)}. - */ - @Override public void super_unregisterComponentCallbacks(final ComponentCallbacks callback) { super.unregisterComponentCallbacks(callback); } - /** - * Prevents a context menu to be shown for the given view. This method will remove the - * {@link OnCreateContextMenuListener} on the view. - * - * @param view The view that should stop showing a context menu. - * @see #registerForContextMenu(View) - */ - @Override public void super_unregisterForContextMenu(final View view) { super.unregisterForContextMenu(view); @@ -7783,27 +4147,11 @@ public void supportStartPostponedEnterTransition() { delegate.supportStartPostponedEnterTransition(); } - /** - * Request that key events come to this activity. Use this if your - * activity has no views with focus, but the activity still wants - * a chance to process key events. - * - * @see Window#takeKeyEvents - */ @Override public void takeKeyEvents(final boolean get) { delegate.takeKeyEvents(get); } - /** - * Similar to {@link #startSearch}, but actually fires off the search query after invoking - * the search dialog. Made available for testing purposes. - * - * @param query The query to trigger. If empty, the request will be ignored. - * @param appSearchData An application can insert application-specific - * context here, in order to improve quality or specificity of its own - * searches. This data will be returned with SEARCH intent(s). Null if - */ @Override public void triggerSearch(final String query, @Nullable final Bundle appSearchData) { delegate.triggerSearch(query, appSearchData); @@ -7814,22 +4162,11 @@ public void unbindService(final ServiceConnection conn) { delegate.unbindService(conn); } - /** - * Remove a {@link ComponentCallbacks} object that was previously registered - * with {@link #registerComponentCallbacks(ComponentCallbacks)}. - */ @Override public void unregisterComponentCallbacks(final ComponentCallbacks callback) { delegate.unregisterComponentCallbacks(callback); } - /** - * Prevents a context menu to be shown for the given view. This method will remove the - * {@link OnCreateContextMenuListener} on the view. - * - * @param view The view that should stop showing a context menu. - * @see #registerForContextMenu(View) - */ @Override public void unregisterForContextMenu(final View view) { delegate.unregisterForContextMenu(view); diff --git a/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ICompositeActivity.java b/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ICompositeActivity.java index 49cfa4d..122fa72 100644 --- a/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ICompositeActivity.java +++ b/activity/src/main/java/com/pascalwelsch/compositeandroid/activity/ICompositeActivity.java @@ -707,6 +707,8 @@ void sendStickyOrderedBroadcastAsUser(final Intent intent, final UserHandle user void setRequestedOrientation(final int requestedOrientation); + void setShowWhenLocked(final boolean showWhenLocked); + void setSupportActionBar(@Nullable final Toolbar toolbar); void setSupportProgress(final int progress); @@ -727,6 +729,8 @@ void sendStickyOrderedBroadcastAsUser(final Intent intent, final UserHandle user void setTitleColor(final int textColor); + void setTurnScreenOn(final boolean turnScreenOn); + void setVisible(final boolean visible); void setVrModeEnabled(final boolean enabled, @NonNull final ComponentName requestedComponent) @@ -1453,6 +1457,8 @@ void super_sendStickyOrderedBroadcastAsUser(final Intent intent, final UserHandl void super_setRequestedOrientation(final int requestedOrientation); + void super_setShowWhenLocked(final boolean showWhenLocked); + void super_setSupportActionBar(@Nullable final Toolbar toolbar); void super_setSupportProgress(final int progress); @@ -1473,6 +1479,8 @@ void super_sendStickyOrderedBroadcastAsUser(final Intent intent, final UserHandl void super_setTitleColor(final int textColor); + void super_setTurnScreenOn(final boolean turnScreenOn); + void super_setVisible(final boolean visible); void super_setVrModeEnabled(final boolean enabled, diff --git a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/CompositeDialogFragment.java b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/CompositeDialogFragment.java index 2aeecb5..5409be5 100644 --- a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/CompositeDialogFragment.java +++ b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/CompositeDialogFragment.java @@ -118,6 +118,7 @@ public boolean getAllowReturnTransitionOverlap() { return delegate.getAllowReturnTransitionOverlap(); } + @Nullable @Override public Context getContext() { return delegate.getContext(); @@ -128,11 +129,13 @@ public Dialog getDialog() { return delegate.getDialog(); } + @Nullable @Override public Object getEnterTransition() { return delegate.getEnterTransition(); } + @Nullable @Override public Object getExitTransition() { return delegate.getExitTransition(); @@ -141,8 +144,9 @@ public Object getExitTransition() { /** * @deprecated */ + @NonNull @Override - public LayoutInflater getLayoutInflater(final Bundle savedFragmentState) { + public LayoutInflater getLayoutInflater(@Nullable final Bundle savedFragmentState) { return delegate.getLayoutInflater(savedFragmentState); } @@ -161,16 +165,19 @@ public Object getReenterTransition() { return delegate.getReenterTransition(); } + @Nullable @Override public Object getReturnTransition() { return delegate.getReturnTransition(); } + @Nullable @Override public Object getSharedElementEnterTransition() { return delegate.getSharedElementEnterTransition(); } + @Nullable @Override public Object getSharedElementReturnTransition() { return delegate.getSharedElementReturnTransition(); @@ -279,8 +286,8 @@ public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { @Nullable @Override - public View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container, - @Nullable final Bundle savedInstanceState) { + public View onCreateView(@NonNull final LayoutInflater inflater, + @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) { return delegate.onCreateView(inflater, container, savedInstanceState); } @@ -309,8 +316,9 @@ public void onDismiss(final DialogInterface dialog) { delegate.onDismiss(dialog); } + @NonNull @Override - public LayoutInflater onGetLayoutInflater(final Bundle savedInstanceState) { + public LayoutInflater onGetLayoutInflater(@Nullable final Bundle savedInstanceState) { return delegate.onGetLayoutInflater(savedInstanceState); } @@ -381,7 +389,7 @@ public void onResume() { } @Override - public void onSaveInstanceState(final Bundle outState) { + public void onSaveInstanceState(@NonNull final Bundle outState) { delegate.onSaveInstanceState(outState); } @@ -396,7 +404,7 @@ public void onStop() { } @Override - public void onViewCreated(final View view, @Nullable final Bundle savedInstanceState) { + public void onViewCreated(@NonNull final View view, @Nullable final Bundle savedInstanceState) { delegate.onViewCreated(view, savedInstanceState); } @@ -426,7 +434,7 @@ public void setAllowReturnTransitionOverlap(final boolean allow) { } @Override - public void setArguments(final Bundle args) { + public void setArguments(@Nullable final Bundle args) { delegate.setArguments(args); } @@ -441,7 +449,7 @@ public void setEnterSharedElementCallback(final SharedElementCallback callback) } @Override - public void setEnterTransition(final Object transition) { + public void setEnterTransition(@Nullable final Object transition) { delegate.setEnterTransition(transition); } @@ -451,7 +459,7 @@ public void setExitSharedElementCallback(final SharedElementCallback callback) { } @Override - public void setExitTransition(final Object transition) { + public void setExitTransition(@Nullable final Object transition) { delegate.setExitTransition(transition); } @@ -461,7 +469,7 @@ public void setHasOptionsMenu(final boolean hasMenu) { } @Override - public void setInitialSavedState(final Fragment.SavedState state) { + public void setInitialSavedState(@Nullable final Fragment.SavedState state) { delegate.setInitialSavedState(state); } @@ -471,7 +479,7 @@ public void setMenuVisibility(final boolean menuVisible) { } @Override - public void setReenterTransition(final Object transition) { + public void setReenterTransition(@Nullable final Object transition) { delegate.setReenterTransition(transition); } @@ -481,17 +489,17 @@ public void setRetainInstance(final boolean retain) { } @Override - public void setReturnTransition(final Object transition) { + public void setReturnTransition(@Nullable final Object transition) { delegate.setReturnTransition(transition); } @Override - public void setSharedElementEnterTransition(final Object transition) { + public void setSharedElementEnterTransition(@Nullable final Object transition) { delegate.setSharedElementEnterTransition(transition); } @Override - public void setSharedElementReturnTransition(final Object transition) { + public void setSharedElementReturnTransition(@Nullable final Object transition) { delegate.setSharedElementReturnTransition(transition); } @@ -506,7 +514,7 @@ public void setStyle(final int style, @StyleRes final int theme) { } @Override - public void setTargetFragment(final Fragment fragment, final int requestCode) { + public void setTargetFragment(@Nullable final Fragment fragment, final int requestCode) { delegate.setTargetFragment(fragment, requestCode); } @@ -599,6 +607,7 @@ public boolean super_getAllowReturnTransitionOverlap() { return super.getAllowReturnTransitionOverlap(); } + @Nullable @Override public Context super_getContext() { return super.getContext(); @@ -609,11 +618,13 @@ public Dialog super_getDialog() { return super.getDialog(); } + @Nullable @Override public Object super_getEnterTransition() { return super.getEnterTransition(); } + @Nullable @Override public Object super_getExitTransition() { return super.getExitTransition(); @@ -622,9 +633,9 @@ public Object super_getExitTransition() { /** * @deprecated */ - + @NonNull @Override - public LayoutInflater super_getLayoutInflater(final Bundle savedFragmentState) { + public LayoutInflater super_getLayoutInflater(@Nullable final Bundle savedFragmentState) { return super.getLayoutInflater(savedFragmentState); } @@ -643,16 +654,19 @@ public Object super_getReenterTransition() { return super.getReenterTransition(); } + @Nullable @Override public Object super_getReturnTransition() { return super.getReturnTransition(); } + @Nullable @Override public Object super_getSharedElementEnterTransition() { return super.getSharedElementEnterTransition(); } + @Nullable @Override public Object super_getSharedElementReturnTransition() { return super.getSharedElementReturnTransition(); @@ -765,7 +779,7 @@ public void super_onCreateOptionsMenu(final Menu menu, final MenuInflater inflat @Nullable @Override - public View super_onCreateView(final LayoutInflater inflater, + public View super_onCreateView(@NonNull final LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) { return super.onCreateView(inflater, container, savedInstanceState); } @@ -795,8 +809,9 @@ public void super_onDismiss(final DialogInterface dialog) { super.onDismiss(dialog); } + @NonNull @Override - public LayoutInflater super_onGetLayoutInflater(final Bundle savedInstanceState) { + public LayoutInflater super_onGetLayoutInflater(@Nullable final Bundle savedInstanceState) { return super.onGetLayoutInflater(savedInstanceState); } @@ -868,7 +883,7 @@ public void super_onResume() { } @Override - public void super_onSaveInstanceState(final Bundle outState) { + public void super_onSaveInstanceState(@NonNull final Bundle outState) { super.onSaveInstanceState(outState); } @@ -883,7 +898,8 @@ public void super_onStop() { } @Override - public void super_onViewCreated(final View view, @Nullable final Bundle savedInstanceState) { + public void super_onViewCreated(@NonNull final View view, + @Nullable final Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); } @@ -913,7 +929,7 @@ public void super_setAllowReturnTransitionOverlap(final boolean allow) { } @Override - public void super_setArguments(final Bundle args) { + public void super_setArguments(@Nullable final Bundle args) { super.setArguments(args); } @@ -928,7 +944,7 @@ public void super_setEnterSharedElementCallback(final SharedElementCallback call } @Override - public void super_setEnterTransition(final Object transition) { + public void super_setEnterTransition(@Nullable final Object transition) { super.setEnterTransition(transition); } @@ -938,7 +954,7 @@ public void super_setExitSharedElementCallback(final SharedElementCallback callb } @Override - public void super_setExitTransition(final Object transition) { + public void super_setExitTransition(@Nullable final Object transition) { super.setExitTransition(transition); } @@ -948,7 +964,7 @@ public void super_setHasOptionsMenu(final boolean hasMenu) { } @Override - public void super_setInitialSavedState(final Fragment.SavedState state) { + public void super_setInitialSavedState(@Nullable final Fragment.SavedState state) { super.setInitialSavedState(state); } @@ -958,7 +974,7 @@ public void super_setMenuVisibility(final boolean menuVisible) { } @Override - public void super_setReenterTransition(final Object transition) { + public void super_setReenterTransition(@Nullable final Object transition) { super.setReenterTransition(transition); } @@ -968,17 +984,17 @@ public void super_setRetainInstance(final boolean retain) { } @Override - public void super_setReturnTransition(final Object transition) { + public void super_setReturnTransition(@Nullable final Object transition) { super.setReturnTransition(transition); } @Override - public void super_setSharedElementEnterTransition(final Object transition) { + public void super_setSharedElementEnterTransition(@Nullable final Object transition) { super.setSharedElementEnterTransition(transition); } @Override - public void super_setSharedElementReturnTransition(final Object transition) { + public void super_setSharedElementReturnTransition(@Nullable final Object transition) { super.setSharedElementReturnTransition(transition); } @@ -993,7 +1009,7 @@ public void super_setStyle(final int style, @StyleRes final int theme) { } @Override - public void super_setTargetFragment(final Fragment fragment, final int requestCode) { + public void super_setTargetFragment(@Nullable final Fragment fragment, final int requestCode) { super.setTargetFragment(fragment, requestCode); } diff --git a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/CompositeFragment.java b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/CompositeFragment.java index 6d5ab65..391c77f 100644 --- a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/CompositeFragment.java +++ b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/CompositeFragment.java @@ -80,16 +80,19 @@ public boolean getAllowReturnTransitionOverlap() { return delegate.getAllowReturnTransitionOverlap(); } + @Nullable @Override public Context getContext() { return delegate.getContext(); } + @Nullable @Override public Object getEnterTransition() { return delegate.getEnterTransition(); } + @Nullable @Override public Object getExitTransition() { return delegate.getExitTransition(); @@ -98,8 +101,9 @@ public Object getExitTransition() { /** * @deprecated */ + @NonNull @Override - public LayoutInflater getLayoutInflater(final Bundle savedFragmentState) { + public LayoutInflater getLayoutInflater(@Nullable final Bundle savedFragmentState) { return delegate.getLayoutInflater(savedFragmentState); } @@ -118,16 +122,19 @@ public Object getReenterTransition() { return delegate.getReenterTransition(); } + @Nullable @Override public Object getReturnTransition() { return delegate.getReturnTransition(); } + @Nullable @Override public Object getSharedElementEnterTransition() { return delegate.getSharedElementEnterTransition(); } + @Nullable @Override public Object getSharedElementReturnTransition() { return delegate.getSharedElementReturnTransition(); @@ -210,8 +217,8 @@ public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { @Nullable @Override - public View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container, - @Nullable final Bundle savedInstanceState) { + public View onCreateView(@NonNull final LayoutInflater inflater, + @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) { return delegate.onCreateView(inflater, container, savedInstanceState); } @@ -235,8 +242,9 @@ public void onDetach() { delegate.onDetach(); } + @NonNull @Override - public LayoutInflater onGetLayoutInflater(final Bundle savedInstanceState) { + public LayoutInflater onGetLayoutInflater(@Nullable final Bundle savedInstanceState) { return delegate.onGetLayoutInflater(savedInstanceState); } @@ -307,7 +315,7 @@ public void onResume() { } @Override - public void onSaveInstanceState(final Bundle outState) { + public void onSaveInstanceState(@NonNull final Bundle outState) { delegate.onSaveInstanceState(outState); } @@ -322,7 +330,7 @@ public void onStop() { } @Override - public void onViewCreated(final View view, @Nullable final Bundle savedInstanceState) { + public void onViewCreated(@NonNull final View view, @Nullable final Bundle savedInstanceState) { delegate.onViewCreated(view, savedInstanceState); } @@ -352,7 +360,7 @@ public void setAllowReturnTransitionOverlap(final boolean allow) { } @Override - public void setArguments(final Bundle args) { + public void setArguments(@Nullable final Bundle args) { delegate.setArguments(args); } @@ -362,7 +370,7 @@ public void setEnterSharedElementCallback(final SharedElementCallback callback) } @Override - public void setEnterTransition(final Object transition) { + public void setEnterTransition(@Nullable final Object transition) { delegate.setEnterTransition(transition); } @@ -372,7 +380,7 @@ public void setExitSharedElementCallback(final SharedElementCallback callback) { } @Override - public void setExitTransition(final Object transition) { + public void setExitTransition(@Nullable final Object transition) { delegate.setExitTransition(transition); } @@ -382,7 +390,7 @@ public void setHasOptionsMenu(final boolean hasMenu) { } @Override - public void setInitialSavedState(final Fragment.SavedState state) { + public void setInitialSavedState(@Nullable final Fragment.SavedState state) { delegate.setInitialSavedState(state); } @@ -392,7 +400,7 @@ public void setMenuVisibility(final boolean menuVisible) { } @Override - public void setReenterTransition(final Object transition) { + public void setReenterTransition(@Nullable final Object transition) { delegate.setReenterTransition(transition); } @@ -402,22 +410,22 @@ public void setRetainInstance(final boolean retain) { } @Override - public void setReturnTransition(final Object transition) { + public void setReturnTransition(@Nullable final Object transition) { delegate.setReturnTransition(transition); } @Override - public void setSharedElementEnterTransition(final Object transition) { + public void setSharedElementEnterTransition(@Nullable final Object transition) { delegate.setSharedElementEnterTransition(transition); } @Override - public void setSharedElementReturnTransition(final Object transition) { + public void setSharedElementReturnTransition(@Nullable final Object transition) { delegate.setSharedElementReturnTransition(transition); } @Override - public void setTargetFragment(final Fragment fragment, final int requestCode) { + public void setTargetFragment(@Nullable final Fragment fragment, final int requestCode) { delegate.setTargetFragment(fragment, requestCode); } @@ -485,16 +493,19 @@ public boolean super_getAllowReturnTransitionOverlap() { return super.getAllowReturnTransitionOverlap(); } + @Nullable @Override public Context super_getContext() { return super.getContext(); } + @Nullable @Override public Object super_getEnterTransition() { return super.getEnterTransition(); } + @Nullable @Override public Object super_getExitTransition() { return super.getExitTransition(); @@ -503,9 +514,9 @@ public Object super_getExitTransition() { /** * @deprecated */ - + @NonNull @Override - public LayoutInflater super_getLayoutInflater(final Bundle savedFragmentState) { + public LayoutInflater super_getLayoutInflater(@Nullable final Bundle savedFragmentState) { return super.getLayoutInflater(savedFragmentState); } @@ -524,16 +535,19 @@ public Object super_getReenterTransition() { return super.getReenterTransition(); } + @Nullable @Override public Object super_getReturnTransition() { return super.getReturnTransition(); } + @Nullable @Override public Object super_getSharedElementEnterTransition() { return super.getSharedElementEnterTransition(); } + @Nullable @Override public Object super_getSharedElementReturnTransition() { return super.getSharedElementReturnTransition(); @@ -620,7 +634,7 @@ public void super_onCreateOptionsMenu(final Menu menu, final MenuInflater inflat @Nullable @Override - public View super_onCreateView(final LayoutInflater inflater, + public View super_onCreateView(@NonNull final LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) { return super.onCreateView(inflater, container, savedInstanceState); } @@ -645,8 +659,9 @@ public void super_onDetach() { super.onDetach(); } + @NonNull @Override - public LayoutInflater super_onGetLayoutInflater(final Bundle savedInstanceState) { + public LayoutInflater super_onGetLayoutInflater(@Nullable final Bundle savedInstanceState) { return super.onGetLayoutInflater(savedInstanceState); } @@ -718,7 +733,7 @@ public void super_onResume() { } @Override - public void super_onSaveInstanceState(final Bundle outState) { + public void super_onSaveInstanceState(@NonNull final Bundle outState) { super.onSaveInstanceState(outState); } @@ -733,7 +748,8 @@ public void super_onStop() { } @Override - public void super_onViewCreated(final View view, @Nullable final Bundle savedInstanceState) { + public void super_onViewCreated(@NonNull final View view, + @Nullable final Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); } @@ -763,7 +779,7 @@ public void super_setAllowReturnTransitionOverlap(final boolean allow) { } @Override - public void super_setArguments(final Bundle args) { + public void super_setArguments(@Nullable final Bundle args) { super.setArguments(args); } @@ -773,7 +789,7 @@ public void super_setEnterSharedElementCallback(final SharedElementCallback call } @Override - public void super_setEnterTransition(final Object transition) { + public void super_setEnterTransition(@Nullable final Object transition) { super.setEnterTransition(transition); } @@ -783,7 +799,7 @@ public void super_setExitSharedElementCallback(final SharedElementCallback callb } @Override - public void super_setExitTransition(final Object transition) { + public void super_setExitTransition(@Nullable final Object transition) { super.setExitTransition(transition); } @@ -793,7 +809,7 @@ public void super_setHasOptionsMenu(final boolean hasMenu) { } @Override - public void super_setInitialSavedState(final Fragment.SavedState state) { + public void super_setInitialSavedState(@Nullable final Fragment.SavedState state) { super.setInitialSavedState(state); } @@ -803,7 +819,7 @@ public void super_setMenuVisibility(final boolean menuVisible) { } @Override - public void super_setReenterTransition(final Object transition) { + public void super_setReenterTransition(@Nullable final Object transition) { super.setReenterTransition(transition); } @@ -813,22 +829,22 @@ public void super_setRetainInstance(final boolean retain) { } @Override - public void super_setReturnTransition(final Object transition) { + public void super_setReturnTransition(@Nullable final Object transition) { super.setReturnTransition(transition); } @Override - public void super_setSharedElementEnterTransition(final Object transition) { + public void super_setSharedElementEnterTransition(@Nullable final Object transition) { super.setSharedElementEnterTransition(transition); } @Override - public void super_setSharedElementReturnTransition(final Object transition) { + public void super_setSharedElementReturnTransition(@Nullable final Object transition) { super.setSharedElementReturnTransition(transition); } @Override - public void super_setTargetFragment(final Fragment fragment, final int requestCode) { + public void super_setTargetFragment(@Nullable final Fragment fragment, final int requestCode) { super.setTargetFragment(fragment, requestCode); } diff --git a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/DialogFragmentDelegate.java b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/DialogFragmentDelegate.java index ef5f7d5..c69b93e 100644 --- a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/DialogFragmentDelegate.java +++ b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/DialogFragmentDelegate.java @@ -163,7 +163,7 @@ public Object getExitTransition() { return mFragmentDelegate.getExitTransition(); } - public LayoutInflater getLayoutInflater(final Bundle savedFragmentState) { + public LayoutInflater getLayoutInflater(@Nullable final Bundle savedFragmentState) { return mFragmentDelegate.getLayoutInflater(savedFragmentState); } @@ -356,8 +356,8 @@ public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { mFragmentDelegate.onCreateOptionsMenu(menu, inflater); } - public View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container, - @Nullable final Bundle savedInstanceState) { + public View onCreateView(@NonNull final LayoutInflater inflater, + @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) { return mFragmentDelegate.onCreateView(inflater, container, savedInstanceState); } @@ -400,7 +400,7 @@ public void call(final DialogInterface dialog) { superCall.call(dialog); } - public LayoutInflater onGetLayoutInflater(final Bundle savedInstanceState) { + public LayoutInflater onGetLayoutInflater(@Nullable final Bundle savedInstanceState) { return mFragmentDelegate.onGetLayoutInflater(savedInstanceState); } @@ -455,7 +455,7 @@ public void onResume() { mFragmentDelegate.onResume(); } - public void onSaveInstanceState(final Bundle outState) { + public void onSaveInstanceState(@NonNull final Bundle outState) { mFragmentDelegate.onSaveInstanceState(outState); } @@ -467,7 +467,7 @@ public void onStop() { mFragmentDelegate.onStop(); } - public void onViewCreated(final View view, @Nullable final Bundle savedInstanceState) { + public void onViewCreated(@NonNull final View view, @Nullable final Bundle savedInstanceState) { mFragmentDelegate.onViewCreated(view, savedInstanceState); } @@ -491,7 +491,7 @@ public void setAllowReturnTransitionOverlap(final boolean allow) { mFragmentDelegate.setAllowReturnTransitionOverlap(allow); } - public void setArguments(final Bundle args) { + public void setArguments(@Nullable final Bundle args) { mFragmentDelegate.setArguments(args); } @@ -521,7 +521,7 @@ public void setEnterSharedElementCallback(final SharedElementCallback callback) mFragmentDelegate.setEnterSharedElementCallback(callback); } - public void setEnterTransition(final Object transition) { + public void setEnterTransition(@Nullable final Object transition) { mFragmentDelegate.setEnterTransition(transition); } @@ -529,7 +529,7 @@ public void setExitSharedElementCallback(final SharedElementCallback callback) { mFragmentDelegate.setExitSharedElementCallback(callback); } - public void setExitTransition(final Object transition) { + public void setExitTransition(@Nullable final Object transition) { mFragmentDelegate.setExitTransition(transition); } @@ -537,7 +537,7 @@ public void setHasOptionsMenu(final boolean hasMenu) { mFragmentDelegate.setHasOptionsMenu(hasMenu); } - public void setInitialSavedState(final Fragment.SavedState state) { + public void setInitialSavedState(@Nullable final Fragment.SavedState state) { mFragmentDelegate.setInitialSavedState(state); } @@ -545,7 +545,7 @@ public void setMenuVisibility(final boolean menuVisible) { mFragmentDelegate.setMenuVisibility(menuVisible); } - public void setReenterTransition(final Object transition) { + public void setReenterTransition(@Nullable final Object transition) { mFragmentDelegate.setReenterTransition(transition); } @@ -553,15 +553,15 @@ public void setRetainInstance(final boolean retain) { mFragmentDelegate.setRetainInstance(retain); } - public void setReturnTransition(final Object transition) { + public void setReturnTransition(@Nullable final Object transition) { mFragmentDelegate.setReturnTransition(transition); } - public void setSharedElementEnterTransition(final Object transition) { + public void setSharedElementEnterTransition(@Nullable final Object transition) { mFragmentDelegate.setSharedElementEnterTransition(transition); } - public void setSharedElementReturnTransition(final Object transition) { + public void setSharedElementReturnTransition(@Nullable final Object transition) { mFragmentDelegate.setSharedElementReturnTransition(transition); } @@ -610,7 +610,7 @@ public void call(final Integer style, final Integer theme) { superCall.call(style, theme); } - public void setTargetFragment(final Fragment fragment, final int requestCode) { + public void setTargetFragment(@Nullable final Fragment fragment, final int requestCode) { mFragmentDelegate.setTargetFragment(fragment, requestCode); } diff --git a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/FragmentDelegate.java b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/FragmentDelegate.java index db39aaf..fd8dfd5 100644 --- a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/FragmentDelegate.java +++ b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/FragmentDelegate.java @@ -186,7 +186,7 @@ public Object call() { return superCall.call(); } - public LayoutInflater getLayoutInflater(final Bundle savedFragmentState) { + public LayoutInflater getLayoutInflater(@Nullable final Bundle savedFragmentState) { if (mPlugins.isEmpty()) { return getOriginal().super_getLayoutInflater(savedFragmentState); } @@ -658,8 +658,8 @@ public void call(final Menu menu, final MenuInflater inflater) { superCall.call(menu, inflater); } - public View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container, - @Nullable final Bundle savedInstanceState) { + public View onCreateView(@NonNull final LayoutInflater inflater, + @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) { if (mPlugins.isEmpty()) { return getOriginal().super_onCreateView(inflater, container, savedInstanceState); } @@ -773,7 +773,7 @@ public void call() { superCall.call(); } - public LayoutInflater onGetLayoutInflater(final Bundle savedInstanceState) { + public LayoutInflater onGetLayoutInflater(@Nullable final Bundle savedInstanceState) { if (mPlugins.isEmpty()) { return getOriginal().super_onGetLayoutInflater(savedInstanceState); } @@ -1076,7 +1076,7 @@ public void call() { superCall.call(); } - public void onSaveInstanceState(final Bundle outState) { + public void onSaveInstanceState(@NonNull final Bundle outState) { if (mPlugins.isEmpty()) { getOriginal().super_onSaveInstanceState(outState); return; @@ -1142,7 +1142,7 @@ public void call() { superCall.call(); } - public void onViewCreated(final View view, @Nullable final Bundle savedInstanceState) { + public void onViewCreated(@NonNull final View view, @Nullable final Bundle savedInstanceState) { if (mPlugins.isEmpty()) { getOriginal().super_onViewCreated(view, savedInstanceState); return; @@ -1277,7 +1277,7 @@ public void call(final Boolean allow) { superCall.call(allow); } - public void setArguments(final Bundle args) { + public void setArguments(@Nullable final Bundle args) { if (mPlugins.isEmpty()) { getOriginal().super_setArguments(args); return; @@ -1322,7 +1322,7 @@ public void call(final SharedElementCallback callback) { superCall.call(callback); } - public void setEnterTransition(final Object transition) { + public void setEnterTransition(@Nullable final Object transition) { if (mPlugins.isEmpty()) { getOriginal().super_setEnterTransition(transition); return; @@ -1367,7 +1367,7 @@ public void call(final SharedElementCallback callback) { superCall.call(callback); } - public void setExitTransition(final Object transition) { + public void setExitTransition(@Nullable final Object transition) { if (mPlugins.isEmpty()) { getOriginal().super_setExitTransition(transition); return; @@ -1411,7 +1411,7 @@ public void call(final Boolean hasMenu) { superCall.call(hasMenu); } - public void setInitialSavedState(final Fragment.SavedState state) { + public void setInitialSavedState(@Nullable final Fragment.SavedState state) { if (mPlugins.isEmpty()) { getOriginal().super_setInitialSavedState(state); return; @@ -1456,7 +1456,7 @@ public void call(final Boolean menuVisible) { superCall.call(menuVisible); } - public void setReenterTransition(final Object transition) { + public void setReenterTransition(@Nullable final Object transition) { if (mPlugins.isEmpty()) { getOriginal().super_setReenterTransition(transition); return; @@ -1500,7 +1500,7 @@ public void call(final Boolean retain) { superCall.call(retain); } - public void setReturnTransition(final Object transition) { + public void setReturnTransition(@Nullable final Object transition) { if (mPlugins.isEmpty()) { getOriginal().super_setReturnTransition(transition); return; @@ -1522,7 +1522,7 @@ public void call(final Object transition) { superCall.call(transition); } - public void setSharedElementEnterTransition(final Object transition) { + public void setSharedElementEnterTransition(@Nullable final Object transition) { if (mPlugins.isEmpty()) { getOriginal().super_setSharedElementEnterTransition(transition); return; @@ -1545,7 +1545,7 @@ public void call(final Object transition) { superCall.call(transition); } - public void setSharedElementReturnTransition(final Object transition) { + public void setSharedElementReturnTransition(@Nullable final Object transition) { if (mPlugins.isEmpty()) { getOriginal().super_setSharedElementReturnTransition(transition); return; @@ -1568,7 +1568,7 @@ public void call(final Object transition) { superCall.call(transition); } - public void setTargetFragment(final Fragment fragment, final int requestCode) { + public void setTargetFragment(@Nullable final Fragment fragment, final int requestCode) { if (mPlugins.isEmpty()) { getOriginal().super_setTargetFragment(fragment, requestCode); return; diff --git a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/FragmentPlugin.java b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/FragmentPlugin.java index 602d1c7..0b036eb 100644 --- a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/FragmentPlugin.java +++ b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/FragmentPlugin.java @@ -85,7 +85,7 @@ public Fragment getFragment() { /** * @deprecated */ - public LayoutInflater getLayoutInflater(final Bundle savedFragmentState) { + public LayoutInflater getLayoutInflater(@Nullable final Bundle savedFragmentState) { verifyMethodCalledFromDelegate("getLayoutInflater(Bundle)"); return ((CallFun1) mSuperListeners.pop()).call(savedFragmentState); } @@ -199,8 +199,8 @@ public void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater) { ((CallVoid2) mSuperListeners.pop()).call(menu, inflater); } - public View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container, - @Nullable final Bundle savedInstanceState) { + public View onCreateView(@NonNull final LayoutInflater inflater, + @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) { verifyMethodCalledFromDelegate("onCreateView(LayoutInflater, ViewGroup, Bundle)"); return ((CallFun3) mSuperListeners.pop()) .call(inflater, container, savedInstanceState); @@ -226,7 +226,7 @@ public void onDetach() { ((CallVoid0) mSuperListeners.pop()).call(); } - public LayoutInflater onGetLayoutInflater(final Bundle savedInstanceState) { + public LayoutInflater onGetLayoutInflater(@Nullable final Bundle savedInstanceState) { verifyMethodCalledFromDelegate("onGetLayoutInflater(Bundle)"); return ((CallFun1) mSuperListeners.pop()).call(savedInstanceState); } @@ -300,7 +300,7 @@ public void onResume() { ((CallVoid0) mSuperListeners.pop()).call(); } - public void onSaveInstanceState(final Bundle outState) { + public void onSaveInstanceState(@NonNull final Bundle outState) { verifyMethodCalledFromDelegate("onSaveInstanceState(Bundle)"); ((CallVoid1) mSuperListeners.pop()).call(outState); } @@ -315,7 +315,7 @@ public void onStop() { ((CallVoid0) mSuperListeners.pop()).call(); } - public void onViewCreated(final View view, @Nullable final Bundle savedInstanceState) { + public void onViewCreated(@NonNull final View view, @Nullable final Bundle savedInstanceState) { verifyMethodCalledFromDelegate("onViewCreated(View, Bundle)"); ((CallVoid2) mSuperListeners.pop()).call(view, savedInstanceState); } @@ -345,7 +345,7 @@ public void setAllowReturnTransitionOverlap(final boolean allow) { ((CallVoid1) mSuperListeners.pop()).call(allow); } - public void setArguments(final Bundle args) { + public void setArguments(@Nullable final Bundle args) { verifyMethodCalledFromDelegate("setArguments(Bundle)"); ((CallVoid1) mSuperListeners.pop()).call(args); } @@ -355,7 +355,7 @@ public void setEnterSharedElementCallback(final SharedElementCallback callback) ((CallVoid1) mSuperListeners.pop()).call(callback); } - public void setEnterTransition(final Object transition) { + public void setEnterTransition(@Nullable final Object transition) { verifyMethodCalledFromDelegate("setEnterTransition(Object)"); ((CallVoid1) mSuperListeners.pop()).call(transition); } @@ -365,7 +365,7 @@ public void setExitSharedElementCallback(final SharedElementCallback callback) { ((CallVoid1) mSuperListeners.pop()).call(callback); } - public void setExitTransition(final Object transition) { + public void setExitTransition(@Nullable final Object transition) { verifyMethodCalledFromDelegate("setExitTransition(Object)"); ((CallVoid1) mSuperListeners.pop()).call(transition); } @@ -375,7 +375,7 @@ public void setHasOptionsMenu(final boolean hasMenu) { ((CallVoid1) mSuperListeners.pop()).call(hasMenu); } - public void setInitialSavedState(final Fragment.SavedState state) { + public void setInitialSavedState(@Nullable final Fragment.SavedState state) { verifyMethodCalledFromDelegate("setInitialSavedState(Fragment.SavedState)"); ((CallVoid1) mSuperListeners.pop()).call(state); } @@ -385,7 +385,7 @@ public void setMenuVisibility(final boolean menuVisible) { ((CallVoid1) mSuperListeners.pop()).call(menuVisible); } - public void setReenterTransition(final Object transition) { + public void setReenterTransition(@Nullable final Object transition) { verifyMethodCalledFromDelegate("setReenterTransition(Object)"); ((CallVoid1) mSuperListeners.pop()).call(transition); } @@ -395,22 +395,22 @@ public void setRetainInstance(final boolean retain) { ((CallVoid1) mSuperListeners.pop()).call(retain); } - public void setReturnTransition(final Object transition) { + public void setReturnTransition(@Nullable final Object transition) { verifyMethodCalledFromDelegate("setReturnTransition(Object)"); ((CallVoid1) mSuperListeners.pop()).call(transition); } - public void setSharedElementEnterTransition(final Object transition) { + public void setSharedElementEnterTransition(@Nullable final Object transition) { verifyMethodCalledFromDelegate("setSharedElementEnterTransition(Object)"); ((CallVoid1) mSuperListeners.pop()).call(transition); } - public void setSharedElementReturnTransition(final Object transition) { + public void setSharedElementReturnTransition(@Nullable final Object transition) { verifyMethodCalledFromDelegate("setSharedElementReturnTransition(Object)"); ((CallVoid1) mSuperListeners.pop()).call(transition); } - public void setTargetFragment(final Fragment fragment, final int requestCode) { + public void setTargetFragment(@Nullable final Fragment fragment, final int requestCode) { verifyMethodCalledFromDelegate("setTargetFragment(Fragment, Integer)"); ((CallVoid2) mSuperListeners.pop()).call(fragment, requestCode); } @@ -517,7 +517,7 @@ Object getExitTransition(final CallFun0 superCall) { } LayoutInflater getLayoutInflater(final CallFun1 superCall, - final Bundle savedFragmentState) { + @Nullable final Bundle savedFragmentState) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); return getLayoutInflater(savedFragmentState); @@ -675,7 +675,7 @@ void onCreateOptionsMenu(final CallVoid2 superCall, final Me } View onCreateView(final CallFun3 superCall, - final LayoutInflater inflater, @Nullable final ViewGroup container, + @NonNull final LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); @@ -712,7 +712,7 @@ void onDetach(final CallVoid0 superCall) { } LayoutInflater onGetLayoutInflater(final CallFun1 superCall, - final Bundle savedInstanceState) { + @Nullable final Bundle savedInstanceState) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); return onGetLayoutInflater(savedInstanceState); @@ -810,7 +810,7 @@ void onResume(final CallVoid0 superCall) { } } - void onSaveInstanceState(final CallVoid1 superCall, final Bundle outState) { + void onSaveInstanceState(final CallVoid1 superCall, @NonNull final Bundle outState) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); onSaveInstanceState(outState); @@ -831,7 +831,7 @@ void onStop(final CallVoid0 superCall) { } } - void onViewCreated(final CallVoid2 superCall, final View view, + void onViewCreated(final CallVoid2 superCall, @NonNull final View view, @Nullable final Bundle savedInstanceState) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); @@ -875,7 +875,7 @@ void setAllowReturnTransitionOverlap(final CallVoid1 superCall, final b } } - void setArguments(final CallVoid1 superCall, final Bundle args) { + void setArguments(final CallVoid1 superCall, @Nullable final Bundle args) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); setArguments(args); @@ -890,7 +890,7 @@ void setEnterSharedElementCallback(final CallVoid1 superC } } - void setEnterTransition(final CallVoid1 superCall, final Object transition) { + void setEnterTransition(final CallVoid1 superCall, @Nullable final Object transition) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); setEnterTransition(transition); @@ -905,7 +905,7 @@ void setExitSharedElementCallback(final CallVoid1 superCa } } - void setExitTransition(final CallVoid1 superCall, final Object transition) { + void setExitTransition(final CallVoid1 superCall, @Nullable final Object transition) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); setExitTransition(transition); @@ -920,7 +920,7 @@ void setHasOptionsMenu(final CallVoid1 superCall, final boolean hasMenu } void setInitialSavedState(final CallVoid1 superCall, - final Fragment.SavedState state) { + @Nullable final Fragment.SavedState state) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); setInitialSavedState(state); @@ -934,7 +934,8 @@ void setMenuVisibility(final CallVoid1 superCall, final boolean menuVis } } - void setReenterTransition(final CallVoid1 superCall, final Object transition) { + void setReenterTransition(final CallVoid1 superCall, + @Nullable final Object transition) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); setReenterTransition(transition); @@ -948,7 +949,7 @@ void setRetainInstance(final CallVoid1 superCall, final boolean retain) } } - void setReturnTransition(final CallVoid1 superCall, final Object transition) { + void setReturnTransition(final CallVoid1 superCall, @Nullable final Object transition) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); setReturnTransition(transition); @@ -956,7 +957,7 @@ void setReturnTransition(final CallVoid1 superCall, final Object transit } void setSharedElementEnterTransition(final CallVoid1 superCall, - final Object transition) { + @Nullable final Object transition) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); setSharedElementEnterTransition(transition); @@ -964,15 +965,15 @@ void setSharedElementEnterTransition(final CallVoid1 superCall, } void setSharedElementReturnTransition(final CallVoid1 superCall, - final Object transition) { + @Nullable final Object transition) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); setSharedElementReturnTransition(transition); } } - void setTargetFragment(final CallVoid2 superCall, final Fragment fragment, - final int requestCode) { + void setTargetFragment(final CallVoid2 superCall, + @Nullable final Fragment fragment, final int requestCode) { synchronized (mSuperListeners) { mSuperListeners.push(superCall); setTargetFragment(fragment, requestCode); diff --git a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/ICompositeFragment.java b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/ICompositeFragment.java index 8f72ee4..da95701 100644 --- a/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/ICompositeFragment.java +++ b/fragment/src/main/java/com/pascalwelsch/compositeandroid/fragment/ICompositeFragment.java @@ -47,7 +47,7 @@ void dump(final String prefix, final FileDescriptor fd, final PrintWriter writer Object getExitTransition(); - LayoutInflater getLayoutInflater(final Bundle savedFragmentState); + LayoutInflater getLayoutInflater(@Nullable final Bundle savedFragmentState); android.arch.lifecycle.Lifecycle getLifecycle(); @@ -90,7 +90,7 @@ void onCreateContextMenu(final ContextMenu menu, final View v, void onCreateOptionsMenu(final Menu menu, final MenuInflater inflater); - View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container, + View onCreateView(@NonNull final LayoutInflater inflater, @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState); void onDestroy(); @@ -101,7 +101,7 @@ View onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup conta void onDetach(); - LayoutInflater onGetLayoutInflater(final Bundle savedInstanceState); + LayoutInflater onGetLayoutInflater(@Nullable final Bundle savedInstanceState); void onHiddenChanged(final boolean hidden); @@ -130,13 +130,13 @@ void onRequestPermissionsResult(final int requestCode, @NonNull final String[] p void onResume(); - void onSaveInstanceState(final Bundle outState); + void onSaveInstanceState(@NonNull final Bundle outState); void onStart(); void onStop(); - void onViewCreated(final View view, @Nullable final Bundle savedInstanceState); + void onViewCreated(@NonNull final View view, @Nullable final Bundle savedInstanceState); void onViewStateRestored(@Nullable final Bundle savedInstanceState); @@ -148,33 +148,33 @@ void onRequestPermissionsResult(final int requestCode, @NonNull final String[] p void setAllowReturnTransitionOverlap(final boolean allow); - void setArguments(final Bundle args); + void setArguments(@Nullable final Bundle args); void setEnterSharedElementCallback(final SharedElementCallback callback); - void setEnterTransition(final Object transition); + void setEnterTransition(@Nullable final Object transition); void setExitSharedElementCallback(final SharedElementCallback callback); - void setExitTransition(final Object transition); + void setExitTransition(@Nullable final Object transition); void setHasOptionsMenu(final boolean hasMenu); - void setInitialSavedState(final Fragment.SavedState state); + void setInitialSavedState(@Nullable final Fragment.SavedState state); void setMenuVisibility(final boolean menuVisible); - void setReenterTransition(final Object transition); + void setReenterTransition(@Nullable final Object transition); void setRetainInstance(final boolean retain); - void setReturnTransition(final Object transition); + void setReturnTransition(@Nullable final Object transition); - void setSharedElementEnterTransition(final Object transition); + void setSharedElementEnterTransition(@Nullable final Object transition); - void setSharedElementReturnTransition(final Object transition); + void setSharedElementReturnTransition(@Nullable final Object transition); - void setTargetFragment(final Fragment fragment, final int requestCode); + void setTargetFragment(@Nullable final Fragment fragment, final int requestCode); void setUserVisibleHint(final boolean isVisibleToUser); @@ -208,7 +208,7 @@ void super_dump(final String prefix, final FileDescriptor fd, final PrintWriter Object super_getExitTransition(); - LayoutInflater super_getLayoutInflater(final Bundle savedFragmentState); + LayoutInflater super_getLayoutInflater(@Nullable final Bundle savedFragmentState); android.arch.lifecycle.Lifecycle super_getLifecycle(); @@ -251,8 +251,8 @@ void super_onCreateContextMenu(final ContextMenu menu, final View v, void super_onCreateOptionsMenu(final Menu menu, final MenuInflater inflater); - View super_onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup container, - @Nullable final Bundle savedInstanceState); + View super_onCreateView(@NonNull final LayoutInflater inflater, + @Nullable final ViewGroup container, @Nullable final Bundle savedInstanceState); void super_onDestroy(); @@ -262,7 +262,7 @@ View super_onCreateView(final LayoutInflater inflater, @Nullable final ViewGroup void super_onDetach(); - LayoutInflater super_onGetLayoutInflater(final Bundle savedInstanceState); + LayoutInflater super_onGetLayoutInflater(@Nullable final Bundle savedInstanceState); void super_onHiddenChanged(final boolean hidden); @@ -291,13 +291,13 @@ void super_onRequestPermissionsResult(final int requestCode, void super_onResume(); - void super_onSaveInstanceState(final Bundle outState); + void super_onSaveInstanceState(@NonNull final Bundle outState); void super_onStart(); void super_onStop(); - void super_onViewCreated(final View view, @Nullable final Bundle savedInstanceState); + void super_onViewCreated(@NonNull final View view, @Nullable final Bundle savedInstanceState); void super_onViewStateRestored(@Nullable final Bundle savedInstanceState); @@ -309,33 +309,33 @@ void super_onRequestPermissionsResult(final int requestCode, void super_setAllowReturnTransitionOverlap(final boolean allow); - void super_setArguments(final Bundle args); + void super_setArguments(@Nullable final Bundle args); void super_setEnterSharedElementCallback(final SharedElementCallback callback); - void super_setEnterTransition(final Object transition); + void super_setEnterTransition(@Nullable final Object transition); void super_setExitSharedElementCallback(final SharedElementCallback callback); - void super_setExitTransition(final Object transition); + void super_setExitTransition(@Nullable final Object transition); void super_setHasOptionsMenu(final boolean hasMenu); - void super_setInitialSavedState(final Fragment.SavedState state); + void super_setInitialSavedState(@Nullable final Fragment.SavedState state); void super_setMenuVisibility(final boolean menuVisible); - void super_setReenterTransition(final Object transition); + void super_setReenterTransition(@Nullable final Object transition); void super_setRetainInstance(final boolean retain); - void super_setReturnTransition(final Object transition); + void super_setReturnTransition(@Nullable final Object transition); - void super_setSharedElementEnterTransition(final Object transition); + void super_setSharedElementEnterTransition(@Nullable final Object transition); - void super_setSharedElementReturnTransition(final Object transition); + void super_setSharedElementReturnTransition(@Nullable final Object transition); - void super_setTargetFragment(final Fragment fragment, final int requestCode); + void super_setTargetFragment(@Nullable final Fragment fragment, final int requestCode); void super_setUserVisibleHint(final boolean isVisibleToUser);