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

Commit f8a9a6f8 authored by Paul Duffin's avatar Paul Duffin Committed by Gerrit Code Review
Browse files

Merge "Remove TODO(b/347672184) and explain why @Nullable is not used" into main

parents b1e9e2f4 ea0fc95a
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3678,7 +3678,9 @@ public class Activity extends ContextThemeWrapper
     * @see View#findViewById(int)
     * @see Activity#requireViewById(int)
     */
    /* TODO(b/347672184): Re-add @Nullable */
    // Strictly speaking this should be marked as @Nullable but the nullability of the return value
    // is deliberately left unspecified as idiomatically correct code can make assumptions either
    // way based on local context, e.g. layout specification.
    public <T extends View> T findViewById(@IdRes int id) {
        return getWindow().findViewById(id);
    }
+3 −1
Original line number Diff line number Diff line
@@ -565,7 +565,9 @@ public class Dialog implements DialogInterface, Window.Callback,
     * @see View#findViewById(int)
     * @see Dialog#requireViewById(int)
     */
    /* TODO(b/347672184): Re-add @Nullable */
    // Strictly speaking this should be marked as @Nullable but the nullability of the return value
    // is deliberately left unspecified as idiomatically correct code can make assumptions either
    // way based on local context, e.g. layout specification.
    public <T extends View> T findViewById(@IdRes int id) {
        return mWindow.findViewById(id);
    }
+3 −1
Original line number Diff line number Diff line
@@ -536,7 +536,9 @@ public class DreamService extends Service implements Window.Callback {
     * @see View#findViewById(int)
     * @see DreamService#requireViewById(int)
     */
    /* TODO(b/347672184): Re-add @Nullable */
    // Strictly speaking this should be marked as @Nullable but the nullability of the return value
    // is deliberately left unspecified as idiomatically correct code can make assumptions either
    // way based on local context, e.g. layout specification.
    public <T extends View> T findViewById(@IdRes int id) {
        return getWindow().findViewById(id);
    }
+3 −1
Original line number Diff line number Diff line
@@ -27294,7 +27294,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     * @return a view with given ID if found, or {@code null} otherwise
     * @see View#requireViewById(int)
     */
    /* TODO(b/347672184): Re-add @Nullable */
    // Strictly speaking this should be marked as @Nullable but the nullability of the return value
    // is deliberately left unspecified as idiomatically correct code can make assumptions either
    // way based on local context, e.g. layout specification.
    public final <T extends View> T findViewById(@IdRes int id) {
        if (id == NO_ID) {
            return null;
+3 −1
Original line number Diff line number Diff line
@@ -1712,7 +1712,9 @@ public abstract class Window {
     * @see View#findViewById(int)
     * @see Window#requireViewById(int)
     */
    /* TODO(b/347672184): Re-add @Nullable */
    // Strictly speaking this should be marked as @Nullable but the nullability of the return value
    // is deliberately left unspecified as idiomatically correct code can make assumptions either
    // way based on local context, e.g. layout specification.
    public <T extends View> T findViewById(@IdRes int id) {
        return getDecorView().findViewById(id);
    }