diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2015-08-26 20:18:54 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-08-26 20:18:54 +0000 |
commit | bd343c1fbf05087094e1dbf40048137e3a3e08fa (patch) | |
tree | dc503e2cdb09cd36edae692280f14b7180a749e1 /tools | |
parent | 9b1ac26921b9c7aaf3c43c8094d81cfabc5cc085 (diff) | |
parent | b32e44ff0c5fd410720bb28c87bc9cea83556edf (diff) | |
download | frameworks_base-bd343c1fbf05087094e1dbf40048137e3a3e08fa.zip frameworks_base-bd343c1fbf05087094e1dbf40048137e3a3e08fa.tar.gz frameworks_base-bd343c1fbf05087094e1dbf40048137e3a3e08fa.tar.bz2 |
am b32e44ff: am a5ffed0b: LayoutLib: Change nullity annotations. [DO NOT MERGE]
* commit 'b32e44ff0c5fd410720bb28c87bc9cea83556edf':
LayoutLib: Change nullity annotations. [DO NOT MERGE]
Diffstat (limited to 'tools')
30 files changed, 50 insertions, 39 deletions
diff --git a/tools/layoutlib/.idea/misc.xml b/tools/layoutlib/.idea/misc.xml index 94bcd36..b474bdc 100644 --- a/tools/layoutlib/.idea/misc.xml +++ b/tools/layoutlib/.idea/misc.xml @@ -10,27 +10,29 @@ <type id="android" /> </component> <component name="NullableNotNullManager"> - <option name="myDefaultNullable" value="com.android.annotations.Nullable" /> - <option name="myDefaultNotNull" value="com.android.annotations.NonNull" /> + <option name="myDefaultNullable" value="android.annotation.Nullable" /> + <option name="myDefaultNotNull" value="android.annotation.NonNull" /> <option name="myNullables"> <value> - <list size="5"> + <list size="6"> <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" /> <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" /> <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" /> <item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" /> <item index="4" class="java.lang.String" itemvalue="com.android.annotations.Nullable" /> + <item index="5" class="java.lang.String" itemvalue="android.annotation.Nullable" /> </list> </value> </option> <option name="myNotNulls"> <value> - <list size="5"> + <list size="6"> <item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" /> <item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" /> <item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" /> <item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" /> <item index="4" class="java.lang.String" itemvalue="com.android.annotations.NonNull" /> + <item index="5" class="java.lang.String" itemvalue="android.annotation.NonNull" /> </list> </value> </option> diff --git a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java index 1397acb..56936eb 100644 --- a/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java +++ b/tools/layoutlib/bridge/src/android/content/res/BridgeTypedArray.java @@ -16,7 +16,6 @@ package android.content.res; -import com.android.annotations.Nullable; import com.android.ide.common.rendering.api.AttrResourceValue; import com.android.ide.common.rendering.api.LayoutLog; import com.android.ide.common.rendering.api.RenderResources; @@ -33,6 +32,7 @@ import com.android.resources.ResourceType; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; +import android.annotation.Nullable; import android.content.res.Resources.Theme; import android.graphics.drawable.Drawable; import android.util.DisplayMetrics; diff --git a/tools/layoutlib/bridge/src/android/content/res/Resources_Theme_Delegate.java b/tools/layoutlib/bridge/src/android/content/res/Resources_Theme_Delegate.java index 4bd83e9..5d36b2c 100644 --- a/tools/layoutlib/bridge/src/android/content/res/Resources_Theme_Delegate.java +++ b/tools/layoutlib/bridge/src/android/content/res/Resources_Theme_Delegate.java @@ -16,7 +16,6 @@ package android.content.res; -import com.android.annotations.Nullable; import com.android.ide.common.rendering.api.ResourceReference; import com.android.ide.common.rendering.api.StyleResourceValue; import com.android.layoutlib.bridge.android.BridgeContext; @@ -25,6 +24,7 @@ import com.android.layoutlib.bridge.impl.RenderSessionImpl; import com.android.resources.ResourceType; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; +import android.annotation.Nullable; import android.content.res.Resources.NotFoundException; import android.content.res.Resources.Theme; import android.util.AttributeSet; diff --git a/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java index 9cf777d..d858953 100644 --- a/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java @@ -16,13 +16,13 @@ package android.graphics; -import com.android.annotations.Nullable; import com.android.layoutlib.bridge.Bridge; import com.android.layoutlib.bridge.impl.DelegateManager; import com.android.ninepatch.NinePatchChunk; import com.android.resources.Density; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; +import android.annotation.Nullable; import android.content.res.BridgeResources.NinePatchInputStream; import android.graphics.BitmapFactory.Options; import android.graphics.Bitmap_Delegate.BitmapCreateFlags; diff --git a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java index 8d24d38..57a8bbc 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java @@ -22,6 +22,7 @@ import com.android.layoutlib.bridge.impl.DelegateManager; import com.android.resources.Density; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; +import android.annotation.Nullable; import android.graphics.Bitmap.Config; import android.os.Parcel; diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java index 4d2d100..0b95cf3 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java @@ -23,6 +23,7 @@ import com.android.layoutlib.bridge.impl.GcSnapshot; import com.android.layoutlib.bridge.impl.PorterDuffUtility; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; +import android.annotation.Nullable; import android.graphics.Bitmap.Config; import android.text.TextUtils; diff --git a/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java index 42de4ec..857e6d0 100644 --- a/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/FontFamily_Delegate.java @@ -16,14 +16,14 @@ package android.graphics; -import com.android.annotations.NonNull; -import com.android.annotations.Nullable; import com.android.ide.common.rendering.api.AssetRepository; import com.android.ide.common.rendering.api.LayoutLog; import com.android.layoutlib.bridge.Bridge; import com.android.layoutlib.bridge.impl.DelegateManager; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; +import android.annotation.NonNull; +import android.annotation.Nullable; import android.content.res.AssetManager; import android.content.res.BridgeAssetManager; diff --git a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java index 7b07404..9355474 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java @@ -21,6 +21,8 @@ import com.android.layoutlib.bridge.Bridge; import com.android.layoutlib.bridge.impl.DelegateManager; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; +import android.annotation.NonNull; +import android.annotation.Nullable; import android.graphics.FontFamily_Delegate.FontVariant; import android.graphics.Paint.FontMetrics; import android.graphics.Paint.FontMetricsInt; diff --git a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java index b9460b4..85e65e6 100644 --- a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java +++ b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java @@ -16,10 +16,10 @@ package android.graphics; -import com.android.annotations.NonNull; import com.android.layoutlib.bridge.impl.DelegateManager; import com.android.tools.layoutlib.annotations.LayoutlibDelegate; +import android.annotation.NonNull; import android.graphics.FontFamily_Delegate.FontVariant; import java.awt.Font; diff --git a/tools/layoutlib/bridge/src/android/view/ShadowPainter.java b/tools/layoutlib/bridge/src/android/view/ShadowPainter.java index 2f93bc8..f09fffd 100644 --- a/tools/layoutlib/bridge/src/android/view/ShadowPainter.java +++ b/tools/layoutlib/bridge/src/android/view/ShadowPainter.java @@ -16,7 +16,7 @@ package android.view; -import com.android.annotations.NonNull; +import android.annotation.NonNull; import java.awt.Graphics2D; import java.awt.Image; diff --git a/tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java b/tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java index d5170aa..edb5eff 100644 --- a/tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java +++ b/tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java @@ -16,9 +16,8 @@ package android.view.accessibility; -import com.android.annotations.NonNull; - import android.accessibilityservice.AccessibilityServiceInfo; +import android.annotation.NonNull; import android.content.Context; import android.content.pm.ServiceInfo; import android.view.IWindow; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java index c6d60f8..653c3c7 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java @@ -19,7 +19,6 @@ package com.android.layoutlib.bridge; import static com.android.ide.common.rendering.api.Result.Status.ERROR_UNKNOWN; import static com.android.ide.common.rendering.api.Result.Status.SUCCESS; -import com.android.annotations.NonNull; import com.android.ide.common.rendering.api.Capability; import com.android.ide.common.rendering.api.DrawableParams; import com.android.ide.common.rendering.api.Features; @@ -39,6 +38,7 @@ import com.android.util.Pair; import com.ibm.icu.util.ULocale; import libcore.io.MemoryMappedFile_Delegate; +import android.annotation.NonNull; import android.content.res.BridgeAssetManager; import android.graphics.Bitmap; import android.graphics.FontFamily_Delegate; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java index 6b54cb6..6951558 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java @@ -17,7 +17,6 @@ package com.android.layoutlib.bridge.android; import android.os.IBinder; -import com.android.annotations.Nullable; import com.android.ide.common.rendering.api.AssetRepository; import com.android.ide.common.rendering.api.ILayoutPullParser; import com.android.ide.common.rendering.api.LayoutLog; @@ -37,6 +36,7 @@ import com.android.util.Pair; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; +import android.annotation.Nullable; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.ContentResolver; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/RecyclerViewUtil.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/RecyclerViewUtil.java index e4c7288..5e5b3c9 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/RecyclerViewUtil.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/support/RecyclerViewUtil.java @@ -16,8 +16,6 @@ package com.android.layoutlib.bridge.android.support; -import com.android.annotations.NonNull; -import com.android.annotations.Nullable; import com.android.ide.common.rendering.api.LayoutLog; import com.android.ide.common.rendering.api.LayoutlibCallback; import com.android.ide.common.rendering.api.SessionParams; @@ -25,6 +23,8 @@ import com.android.layoutlib.bridge.Bridge; import com.android.layoutlib.bridge.android.BridgeContext; import com.android.layoutlib.bridge.android.RenderParamsFlags; +import android.annotation.NonNull; +import android.annotation.Nullable; import android.content.Context; import android.view.View; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/AppCompatActionBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/AppCompatActionBar.java index dd1f661..8b8cc38 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/AppCompatActionBar.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/AppCompatActionBar.java @@ -16,8 +16,6 @@ package com.android.layoutlib.bridge.bars; -import com.android.annotations.NonNull; -import com.android.annotations.Nullable; import com.android.ide.common.rendering.api.RenderResources; import com.android.ide.common.rendering.api.ResourceValue; import com.android.ide.common.rendering.api.SessionParams; @@ -26,6 +24,8 @@ import com.android.layoutlib.bridge.android.BridgeContext; import com.android.layoutlib.bridge.impl.ResourceHelper; import com.android.resources.ResourceType; +import android.annotation.NonNull; +import android.annotation.Nullable; import android.content.Context; import android.graphics.drawable.Drawable; import android.view.ContextThemeWrapper; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/BridgeActionBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/BridgeActionBar.java index 3d1a9b9..a19b689 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/BridgeActionBar.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/BridgeActionBar.java @@ -16,7 +16,6 @@ package com.android.layoutlib.bridge.bars; -import com.android.annotations.NonNull; import com.android.ide.common.rendering.api.ActionBarCallback; import com.android.ide.common.rendering.api.ActionBarCallback.HomeButtonStyle; import com.android.ide.common.rendering.api.RenderResources; @@ -24,6 +23,7 @@ import com.android.ide.common.rendering.api.ResourceValue; import com.android.ide.common.rendering.api.SessionParams; import com.android.layoutlib.bridge.android.BridgeContext; +import android.annotation.NonNull; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java index bc1a41d..90a1c75 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/CustomBar.java @@ -16,7 +16,6 @@ package com.android.layoutlib.bridge.bars; -import com.android.annotations.NonNull; import com.android.ide.common.rendering.api.RenderResources; import com.android.ide.common.rendering.api.ResourceValue; import com.android.ide.common.rendering.api.StyleResourceValue; @@ -32,6 +31,7 @@ import com.android.resources.ResourceType; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; +import android.annotation.NonNull; import android.content.Context; import android.content.res.ColorStateList; import android.graphics.Bitmap; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FrameworkActionBar.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FrameworkActionBar.java index a1c9065..bb3d13f 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FrameworkActionBar.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FrameworkActionBar.java @@ -16,8 +16,6 @@ package com.android.layoutlib.bridge.bars; -import com.android.annotations.NonNull; -import com.android.annotations.Nullable; import com.android.ide.common.rendering.api.RenderResources; import com.android.ide.common.rendering.api.ResourceValue; import com.android.ide.common.rendering.api.SessionParams; @@ -27,6 +25,8 @@ import com.android.internal.view.menu.MenuItemImpl; import com.android.layoutlib.bridge.android.BridgeContext; import com.android.layoutlib.bridge.impl.ResourceHelper; +import android.annotation.NonNull; +import android.annotation.Nullable; import android.content.Context; import android.content.res.TypedArray; import android.util.DisplayMetrics; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FrameworkActionBarWrapper.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FrameworkActionBarWrapper.java index 44c2cd8..daad602 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FrameworkActionBarWrapper.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/FrameworkActionBarWrapper.java @@ -16,8 +16,6 @@ package com.android.layoutlib.bridge.bars; -import com.android.annotations.NonNull; -import com.android.annotations.Nullable; import com.android.ide.common.rendering.api.ActionBarCallback; import com.android.ide.common.rendering.api.RenderResources; import com.android.ide.common.rendering.api.ResourceValue; @@ -31,6 +29,8 @@ import com.android.internal.widget.DecorToolbar; import com.android.layoutlib.bridge.android.BridgeContext; import com.android.layoutlib.bridge.impl.ResourceHelper; +import android.annotation.NonNull; +import android.annotation.Nullable; import android.app.ActionBar; import android.app.ActionBar.Tab; import android.app.ActionBar.TabListener; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/DelegateManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/DelegateManager.java index 261cc98..7f2a7ae 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/DelegateManager.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/DelegateManager.java @@ -19,6 +19,7 @@ package com.android.layoutlib.bridge.impl; import com.android.layoutlib.bridge.util.Debug; import com.android.layoutlib.bridge.util.SparseWeakArray; +import android.annotation.Nullable; import android.util.SparseArray; import java.lang.ref.WeakReference; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ParserFactory.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ParserFactory.java index 646f960..6e67f59 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ParserFactory.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ParserFactory.java @@ -17,12 +17,12 @@ package com.android.layoutlib.bridge.impl; -import com.android.annotations.NonNull; -import com.android.annotations.Nullable; - import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; +import android.annotation.NonNull; +import android.annotation.Nullable; + import java.io.BufferedInputStream; import java.io.ByteArrayInputStream; import java.io.File; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java index 5ded389..3dec301 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java @@ -16,8 +16,6 @@ package com.android.layoutlib.bridge.impl; -import com.android.annotations.NonNull; -import com.android.annotations.Nullable; import com.android.ide.common.rendering.api.AdapterBinding; import com.android.ide.common.rendering.api.HardwareConfig; import com.android.ide.common.rendering.api.IAnimationListener; @@ -68,6 +66,8 @@ import android.animation.Animator; import android.animation.AnimatorInflater; import android.animation.LayoutTransition; import android.animation.LayoutTransition.TransitionListener; +import android.annotation.NonNull; +import android.annotation.Nullable; import android.app.Fragment_Delegate; import android.graphics.Bitmap; import android.graphics.Bitmap_Delegate; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java index a3fde866..ca77193 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java @@ -17,7 +17,6 @@ package com.android.layoutlib.bridge.impl; import com.android.SdkConstants; -import com.android.annotations.NonNull; import com.android.ide.common.rendering.api.DensityBasedResourceValue; import com.android.ide.common.rendering.api.LayoutLog; import com.android.ide.common.rendering.api.RenderResources; @@ -32,6 +31,7 @@ import com.android.resources.Density; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; +import android.annotation.NonNull; import android.content.res.ColorStateList; import android.content.res.Resources.Theme; import android.graphics.Bitmap; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/DynamicIdMap.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/DynamicIdMap.java index 979aa33..08a8faf 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/DynamicIdMap.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/DynamicIdMap.java @@ -16,10 +16,10 @@ package com.android.layoutlib.bridge.util; -import com.android.annotations.NonNull; import com.android.resources.ResourceType; import com.android.util.Pair; +import android.annotation.NonNull; import android.util.SparseArray; import java.util.HashMap; diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ReflectionUtils.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ReflectionUtils.java index 8e61edf..b324451 100644 --- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ReflectionUtils.java +++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/util/ReflectionUtils.java @@ -16,8 +16,8 @@ package com.android.layoutlib.bridge.util; -import com.android.annotations.NonNull; -import com.android.annotations.Nullable; +import android.annotation.NonNull; +import android.annotation.Nullable; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParserTest.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParserTest.java index 4623f69..77c997b 100644 --- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParserTest.java +++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/android/BridgeXmlBlockParserTest.java @@ -16,7 +16,6 @@ package com.android.layoutlib.bridge.android; -import com.android.annotations.NonNull; import com.android.layoutlib.bridge.impl.ParserFactory; import org.junit.AfterClass; @@ -27,6 +26,8 @@ import org.w3c.dom.Node; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; +import android.annotation.NonNull; + import static org.junit.Assert.assertEquals; public class BridgeXmlBlockParserTest { diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/ImageUtils.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/ImageUtils.java index d7e5486..16911bd 100644 --- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/ImageUtils.java +++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/ImageUtils.java @@ -16,7 +16,7 @@ package com.android.layoutlib.bridge.intensive; -import com.android.annotations.NonNull; +import android.annotation.NonNull; import java.awt.AlphaComposite; import java.awt.Color; diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java index ca01791..9394253 100644 --- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java +++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/Main.java @@ -16,7 +16,6 @@ package com.android.layoutlib.bridge.intensive; -import com.android.annotations.NonNull; import com.android.ide.common.rendering.api.LayoutLog; import com.android.ide.common.rendering.api.RenderSession; import com.android.ide.common.rendering.api.Result; @@ -39,6 +38,8 @@ import com.android.utils.ILogger; import org.junit.Before; import org.junit.Test; +import android.annotation.NonNull; + import java.io.File; import java.io.FileFilter; import java.io.IOException; diff --git a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/setup/LayoutLibTestCallback.java b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/setup/LayoutLibTestCallback.java index ab682fd..6c16ed0 100644 --- a/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/setup/LayoutLibTestCallback.java +++ b/tools/layoutlib/bridge/tests/src/com/android/layoutlib/bridge/intensive/setup/LayoutLibTestCallback.java @@ -17,8 +17,6 @@ package com.android.layoutlib.bridge.intensive.setup; import com.android.SdkConstants; -import com.android.annotations.NonNull; -import com.android.annotations.Nullable; import com.android.ide.common.rendering.api.ActionBarCallback; import com.android.ide.common.rendering.api.AdapterBinding; import com.android.ide.common.rendering.api.ILayoutPullParser; @@ -35,6 +33,9 @@ import org.kxml2.io.KXmlParser; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; +import android.annotation.NonNull; +import android.annotation.Nullable; + import java.io.File; import java.lang.reflect.Constructor; import java.lang.reflect.Field; diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/Main.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/Main.java index fa570c8..456ea0f 100644 --- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/Main.java +++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/Main.java @@ -118,6 +118,8 @@ public class Main { "android.app.DatePickerDialog", // b.android.com/28318 "android.app.TimePickerDialog", // b.android.com/61515 "com.android.internal.view.menu.ActionMenu", + "android.annotation.NonNull", // annotations + "android.annotation.Nullable", // annotations }, excludeClasses, new String[] { |