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

Commit f9525bd3 authored by Paul Duffin's avatar Paul Duffin Committed by Automerger Merge Worker
Browse files

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

parents 2909a118 f8a9a6f8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -3701,7 +3701,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
@@ -738,7 +738,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
@@ -27534,7 +27534,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
@@ -1722,7 +1722,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);
    }