[go: nahoru, domu]

Merge "SuppressWarnings for GenericLifecycleObserver" into androidx-master-dev
am: 89bd72efba

Change-Id: If851236abde443b1b151cfa6247f0b399c43a9d9
diff --git a/lifecycle/common/src/main/java/androidx/lifecycle/Lifecycling.java b/lifecycle/common/src/main/java/androidx/lifecycle/Lifecycling.java
index 9450466..2abb6ec 100644
--- a/lifecycle/common/src/main/java/androidx/lifecycle/Lifecycling.java
+++ b/lifecycle/common/src/main/java/androidx/lifecycle/Lifecycling.java
@@ -49,6 +49,7 @@
     /**
      * @deprecated Left for compatibility with lifecycle-runtime:2.0
      */
+    @SuppressWarnings("deprecation")
     @Deprecated
     @NonNull
     static GenericLifecycleObserver getCallback(final Object object) {
diff --git a/lifecycle/common/src/test/java/androidx/lifecycle/LifecyclingTest.java b/lifecycle/common/src/test/java/androidx/lifecycle/LifecyclingTest.java
index 7fd56fd..5854dce 100644
--- a/lifecycle/common/src/test/java/androidx/lifecycle/LifecyclingTest.java
+++ b/lifecycle/common/src/test/java/androidx/lifecycle/LifecyclingTest.java
@@ -87,6 +87,7 @@
     }
 
     // MUST BE HERE TILL Lifecycle 3.0.0 release for back-compatibility with other modules
+    @SuppressWarnings("deprecation")
     @Test
     public void testDeprecatedGenericLifecycleObserver() {
         GenericLifecycleObserver genericLifecycleObserver = new GenericLifecycleObserver() {
@@ -100,6 +101,7 @@
     }
 
     // MUST BE HERE TILL Lifecycle 3.0.0 release for back-compatibility with other modules
+    @SuppressWarnings("deprecation")
     @Test
     public void testDeprecatedLifecyclingCallback() {
         GenericLifecycleObserver genericLifecycleObserver = new GenericLifecycleObserver() {
diff --git a/lifecycle/runtime/src/test/java/androidx/lifecycle/LifecycleRegistryTest.java b/lifecycle/runtime/src/test/java/androidx/lifecycle/LifecycleRegistryTest.java
index f12bfd3..414fb28 100644
--- a/lifecycle/runtime/src/test/java/androidx/lifecycle/LifecycleRegistryTest.java
+++ b/lifecycle/runtime/src/test/java/androidx/lifecycle/LifecycleRegistryTest.java
@@ -81,6 +81,7 @@
         assertThat(mRegistry.getObserverCount(), is(0));
     }
 
+    @SuppressWarnings("deprecation")
     @Test
     public void addGenericAndObserve() {
         GenericLifecycleObserver generic = mock(GenericLifecycleObserver.class);