global: get rid of nonnull gradle hack
Hacking things up via gradle is not right, and package-info.java poses problems with two modules, so instead we just apply it manually to every class. Remember to add this to new classes! Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
package com.wireguard.android.databinding;
|
||||
|
||||
import com.wireguard.util.NonNullForAll;
|
||||
|
||||
import androidx.databinding.BindingAdapter;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableList;
|
||||
@@ -35,6 +37,7 @@ import java9.util.Optional;
|
||||
*/
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@NonNullForAll
|
||||
public final class BindingAdapters {
|
||||
private BindingAdapters() {
|
||||
// Prevent instantiation.
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
package com.wireguard.android.databinding;
|
||||
|
||||
import com.wireguard.util.NonNullForAll;
|
||||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableList;
|
||||
import androidx.databinding.ViewDataBinding;
|
||||
@@ -22,6 +24,7 @@ import java.util.Objects;
|
||||
* Helper class for binding an ObservableList to the children of a ViewGroup.
|
||||
*/
|
||||
|
||||
@NonNullForAll
|
||||
class ItemChangeListener<T> {
|
||||
private final OnListChangedCallback<T> callback = new OnListChangedCallback<>(this);
|
||||
private final ViewGroup container;
|
||||
|
||||
+3
@@ -5,6 +5,8 @@
|
||||
|
||||
package com.wireguard.android.databinding;
|
||||
|
||||
import com.wireguard.util.NonNullForAll;
|
||||
|
||||
import android.content.Context;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.databinding.ObservableList;
|
||||
@@ -25,6 +27,7 @@ import java.lang.ref.WeakReference;
|
||||
* A generic {@code RecyclerView.Adapter} backed by a {@code ObservableKeyedList}.
|
||||
*/
|
||||
|
||||
@NonNullForAll
|
||||
public class ObservableKeyedRecyclerViewAdapter<K, E extends Keyed<? extends K>> extends Adapter<ObservableKeyedRecyclerViewAdapter.ViewHolder> {
|
||||
|
||||
private final OnListChangedCallback<E> callback = new OnListChangedCallback<>(this);
|
||||
|
||||
Reference in New Issue
Block a user