OSDN Git Service

Not specify return val of View#onSaveInstanceState
authorPhilip P. Moltmann <moltmann@google.com>
Thu, 11 May 2017 22:32:15 +0000 (15:32 -0700)
committerPhilip P. Moltmann <moltmann@google.com>
Thu, 11 May 2017 22:32:15 +0000 (15:32 -0700)
.. as the comment was incorrect since a long time.

Bug: 37802299
Test: compiled
Change-Id: I10fe0b1c0f7f4ccaade38c87136a3785f2685798

core/java/android/view/View.java

index d8eb950..3ab22e6 100644 (file)
@@ -17266,15 +17266,14 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
      * item in a list view.
      *
      * @return Returns a Parcelable object containing the view's current dynamic
-     *         state, or null if there is nothing interesting to save. The
-     *         default implementation returns null.
+     *         state, or null if there is nothing interesting to save.
      * @see #onRestoreInstanceState(android.os.Parcelable)
      * @see #saveHierarchyState(android.util.SparseArray)
      * @see #dispatchSaveInstanceState(android.util.SparseArray)
      * @see #setSaveEnabled(boolean)
      */
     @CallSuper
-    protected Parcelable onSaveInstanceState() {
+    @Nullable protected Parcelable onSaveInstanceState() {
         mPrivateFlags |= PFLAG_SAVE_STATE_CALLED;
         if (mStartActivityRequestWho != null || isAutofilled()
                 || mAccessibilityViewId > LAST_APP_ACCESSIBILITY_ID) {