summaryrefslogtreecommitdiffstats
path: root/core/java/android/view/LayoutInflater.java
diff options
context:
space:
mode:
authorScott Kennedy <skennedy@google.com>2015-01-15 11:56:33 -0800
committerScott Kennedy <skennedy@google.com>2015-01-15 11:56:33 -0800
commitdb5fd42a03b35c9a6d4ddb3ac9c239911af6d29f (patch)
tree969f2cf5b6c770a0666d391dd8aa6d366791074f /core/java/android/view/LayoutInflater.java
parent069db2ae230d6b68a51e26435dd9627de0154ed7 (diff)
downloadframeworks_base-db5fd42a03b35c9a6d4ddb3ac9c239911af6d29f.zip
frameworks_base-db5fd42a03b35c9a6d4ddb3ac9c239911af6d29f.tar.gz
frameworks_base-db5fd42a03b35c9a6d4ddb3ac9c239911af6d29f.tar.bz2
Mark the root argument as @Nullable in LayoutInflater#inflate()
Change-Id: I174ff06268ece7a47ce22c98eb0377fa1b5a4a36
Diffstat (limited to 'core/java/android/view/LayoutInflater.java')
-rw-r--r--core/java/android/view/LayoutInflater.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/java/android/view/LayoutInflater.java b/core/java/android/view/LayoutInflater.java
index bb945dc..ac32430 100644
--- a/core/java/android/view/LayoutInflater.java
+++ b/core/java/android/view/LayoutInflater.java
@@ -16,6 +16,7 @@
package android.view;
+import android.annotation.Nullable;
import android.graphics.Canvas;
import android.os.Handler;
import android.os.Message;
@@ -367,7 +368,7 @@ public abstract class LayoutInflater {
* this is the root View; otherwise it is the root of the inflated
* XML file.
*/
- public View inflate(int resource, ViewGroup root) {
+ public View inflate(int resource, @Nullable ViewGroup root) {
return inflate(resource, root, root != null);
}
@@ -387,7 +388,7 @@ public abstract class LayoutInflater {
* this is the root View; otherwise it is the root of the inflated
* XML file.
*/
- public View inflate(XmlPullParser parser, ViewGroup root) {
+ public View inflate(XmlPullParser parser, @Nullable ViewGroup root) {
return inflate(parser, root, root != null);
}
@@ -408,7 +409,7 @@ public abstract class LayoutInflater {
* attachToRoot is true, this is root; otherwise it is the root of
* the inflated XML file.
*/
- public View inflate(int resource, ViewGroup root, boolean attachToRoot) {
+ public View inflate(int resource, @Nullable ViewGroup root, boolean attachToRoot) {
final Resources res = getContext().getResources();
if (DEBUG) {
Log.d(TAG, "INFLATING from resource: \"" + res.getResourceName(resource) + "\" ("
@@ -445,7 +446,7 @@ public abstract class LayoutInflater {
* attachToRoot is true, this is root; otherwise it is the root of
* the inflated XML file.
*/
- public View inflate(XmlPullParser parser, ViewGroup root, boolean attachToRoot) {
+ public View inflate(XmlPullParser parser, @Nullable ViewGroup root, boolean attachToRoot) {
synchronized (mConstructorArgs) {
Trace.traceBegin(Trace.TRACE_TAG_VIEW, "inflate");