Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3709761c authored by Alan Viverette's avatar Alan Viverette Committed by android-build-merger
Browse files

Merge "Automatic casts for more findViewById implementations" into oc-dev am: 7458ea38

am: ee4b52af

Change-Id: Ie5ebcf1156e31da0b76d8f053a3c23f91e8ea7b9
parents 06d6b4d9 ee4b52af
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -3579,7 +3579,7 @@ package android.app {
    method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public void enterPictureInPictureMode();
    method public boolean enterPictureInPictureMode(android.app.PictureInPictureArgs);
    method public android.view.View findViewById(int);
    method public <T extends android.view.View> T findViewById(int);
    method public void finish();
    method public void finishActivity(int);
    method public void finishActivityFromChild(android.app.Activity, int);
@@ -4359,7 +4359,7 @@ package android.app {
    method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public boolean dispatchTouchEvent(android.view.MotionEvent);
    method public boolean dispatchTrackballEvent(android.view.MotionEvent);
    method public android.view.View findViewById(int);
    method public <T extends android.view.View> T findViewById(int);
    method public android.app.ActionBar getActionBar();
    method public final android.content.Context getContext();
    method public android.view.View getCurrentFocus();
@@ -46610,7 +46610,7 @@ package android.view {
    method public void clearFlags(int);
    method public abstract void closeAllPanels();
    method public abstract void closePanel(int);
    method public android.view.View findViewById(int);
    method public <T extends android.view.View> T findViewById(int);
    method public boolean getAllowEnterTransitionOverlap();
    method public boolean getAllowReturnTransitionOverlap();
    method public final android.view.WindowManager.LayoutParams getAttributes();
+3 −3
Original line number Diff line number Diff line
@@ -3704,7 +3704,7 @@ package android.app {
    method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public void enterPictureInPictureMode();
    method public boolean enterPictureInPictureMode(android.app.PictureInPictureArgs);
    method public android.view.View findViewById(int);
    method public <T extends android.view.View> T findViewById(int);
    method public void finish();
    method public void finishActivity(int);
    method public void finishActivityFromChild(android.app.Activity, int);
@@ -4511,7 +4511,7 @@ package android.app {
    method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public boolean dispatchTouchEvent(android.view.MotionEvent);
    method public boolean dispatchTrackballEvent(android.view.MotionEvent);
    method public android.view.View findViewById(int);
    method public <T extends android.view.View> T findViewById(int);
    method public android.app.ActionBar getActionBar();
    method public final android.content.Context getContext();
    method public android.view.View getCurrentFocus();
@@ -50141,7 +50141,7 @@ package android.view {
    method public void clearFlags(int);
    method public abstract void closeAllPanels();
    method public abstract void closePanel(int);
    method public android.view.View findViewById(int);
    method public <T extends android.view.View> T findViewById(int);
    method public boolean getAllowEnterTransitionOverlap();
    method public boolean getAllowReturnTransitionOverlap();
    method public final android.view.WindowManager.LayoutParams getAttributes();
+3 −3
Original line number Diff line number Diff line
@@ -3581,7 +3581,7 @@ package android.app {
    method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
    method public void enterPictureInPictureMode();
    method public boolean enterPictureInPictureMode(android.app.PictureInPictureArgs);
    method public android.view.View findViewById(int);
    method public <T extends android.view.View> T findViewById(int);
    method public void finish();
    method public void finishActivity(int);
    method public void finishActivityFromChild(android.app.Activity, int);
@@ -4371,7 +4371,7 @@ package android.app {
    method public boolean dispatchPopulateAccessibilityEvent(android.view.accessibility.AccessibilityEvent);
    method public boolean dispatchTouchEvent(android.view.MotionEvent);
    method public boolean dispatchTrackballEvent(android.view.MotionEvent);
    method public android.view.View findViewById(int);
    method public <T extends android.view.View> T findViewById(int);
    method public android.app.ActionBar getActionBar();
    method public final android.content.Context getContext();
    method public android.view.View getCurrentFocus();
@@ -47009,7 +47009,7 @@ package android.view {
    method public void clearFlags(int);
    method public abstract void closeAllPanels();
    method public abstract void closePanel(int);
    method public android.view.View findViewById(int);
    method public <T extends android.view.View> T findViewById(int);
    method public boolean getAllowEnterTransitionOverlap();
    method public boolean getAllowReturnTransitionOverlap();
    method public final android.view.WindowManager.LayoutParams getAttributes();
+11 −4
Original line number Diff line number Diff line
@@ -2443,13 +2443,20 @@ public class Activity extends ContextThemeWrapper
    }

    /**
     * Finds a view that was identified by the id attribute from the XML that
     * was processed in {@link #onCreate}.
     * Finds a view that was identified by the {@code android:id} XML attribute
     * that was processed in {@link #onCreate}.
     * <p>
     * <strong>Note:</strong> In most cases -- depending on compiler support --
     * the resulting view is automatically cast to the target class type. If
     * the target class type is unconstrained, an explicit cast may be
     * necessary.
     *
     * @return The view if found or null otherwise.
     * @param id the ID to search for
     * @return a view with given ID if found, or {@code null} otherwise
     * @see View#findViewById(int)
     */
    @Nullable
    public View findViewById(@IdRes int id) {
    public <T extends View> T findViewById(@IdRes int id) {
        return getWindow().findViewById(id);
    }

+14 −6
Original line number Diff line number Diff line
@@ -498,14 +498,22 @@ public class Dialog implements DialogInterface, Window.Callback,
    }

    /**
     * Finds a child view with the given identifier. Returns null if the
     * specified child view does not exist or the dialog has not yet been fully
     * created (for example, via {@link #show()} or {@link #create()}).
     * Finds the first descendant view with the given ID or {@code null} if the
     * ID is invalid (< 0), there is no matching view in the hierarchy, or the
     * dialog has not yet been fully created (for example, via {@link #show()}
     * or {@link #create()}).
     * <p>
     * <strong>Note:</strong> In most cases -- depending on compiler support --
     * the resulting view is automatically cast to the target class type. If
     * the target class type is unconstrained, an explicit cast may be
     * necessary.
     *
     * @param id the identifier of the view to find
     * @return The view with the given id or null.
     * @param id the ID to search for
     * @return a view with given ID if found, or {@code null} otherwise
     * @see View#findViewById(int)
     */
    public @Nullable View findViewById(@IdRes int id) {
    @Nullable
    public <T extends View> T findViewById(@IdRes int id) {
        return mWindow.findViewById(id);
    }

Loading