Loading core/java/android/app/Activity.java +3 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading core/java/android/app/Dialog.java +3 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading core/java/android/service/dreams/DreamService.java +3 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading core/java/android/view/View.java +3 −1 Original line number Diff line number Diff line Loading @@ -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; core/java/android/view/Window.java +3 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading Loading
core/java/android/app/Activity.java +3 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading
core/java/android/app/Dialog.java +3 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading
core/java/android/service/dreams/DreamService.java +3 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading
core/java/android/view/View.java +3 −1 Original line number Diff line number Diff line Loading @@ -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;
core/java/android/view/Window.java +3 −1 Original line number Diff line number Diff line Loading @@ -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); } Loading