From 67ea8b2936343526ff0b3f476c515f0e11dbb272 Mon Sep 17 00:00:00 2001 From: Eric Kuck Date: Thu, 12 Jul 2018 19:10:35 -0500 Subject: global: Add nullity annotations Signed-off-by: Eric Kuck --- .gitignore | 1 + .idea/codeStyles/Project.xml | 2 + app/build.gradle | 3 + app/nonnull.gradle | 87 ++++++++++++++++++++++ .../java/com/wireguard/android/Application.java | 34 +++++---- .../com/wireguard/android/QuickTileService.java | 11 ++- .../wireguard/android/activity/BaseActivity.java | 15 ++-- .../wireguard/android/activity/MainActivity.java | 39 ++++++---- .../android/activity/SettingsActivity.java | 13 ++-- .../android/activity/ThemeChangeAwareActivity.java | 5 +- .../android/activity/TunnelCreatorActivity.java | 5 +- .../com/wireguard/android/backend/GoBackend.java | 10 ++- .../wireguard/android/backend/WgQuickBackend.java | 7 +- .../android/databinding/ItemChangeListener.java | 16 ++-- .../ObservableKeyedRecyclerViewAdapter.java | 21 ++++-- .../android/fragment/AppListDialogFragment.java | 16 +--- .../wireguard/android/fragment/BaseFragment.java | 15 ++-- .../android/fragment/TunnelDetailFragment.java | 22 ++++-- .../android/fragment/TunnelEditorFragment.java | 38 ++++++---- .../android/fragment/TunnelListFragment.java | 40 ++++++---- .../wireguard/android/model/ApplicationData.java | 12 +-- .../java/com/wireguard/android/model/Tunnel.java | 29 ++++---- .../com/wireguard/android/model/TunnelManager.java | 17 ++--- .../android/preference/LogExporterPreference.java | 5 +- .../preference/ToolsInstallerPreference.java | 8 +- .../android/preference/VersionPreference.java | 5 +- .../android/preference/ZipExporterPreference.java | 5 +- .../wireguard/android/util/ExceptionLoggers.java | 6 +- .../android/util/ObservableKeyedArrayList.java | 16 ++-- .../util/ObservableSortedKeyedArrayList.java | 10 +-- .../java/com/wireguard/android/util/RootShell.java | 11 +-- .../android/util/SharedLibraryLoader.java | 3 +- .../com/wireguard/android/util/ToolsInstaller.java | 8 +- .../wireguard/android/widget/KeyInputFilter.java | 3 +- .../wireguard/android/widget/NameInputFilter.java | 3 +- .../wireguard/android/widget/SlashDrawable.java | 29 ++------ .../com/wireguard/android/widget/ToggleSwitch.java | 13 ++-- .../android/widget/fab/FloatingActionsMenu.java | 18 ++--- .../widget/fab/LabeledFloatingActionButton.java | 9 ++- .../android/widget/fab/TouchDelegateGroup.java | 8 +- .../main/java/com/wireguard/config/Attribute.java | 7 +- app/src/main/java/com/wireguard/config/Config.java | 26 +++---- .../java/com/wireguard/config/InetAddresses.java | 2 - .../java/com/wireguard/config/InetNetwork.java | 5 +- .../main/java/com/wireguard/config/Interface.java | 53 ++++++++----- app/src/main/java/com/wireguard/config/Peer.java | 51 +++++++------ .../main/java/com/wireguard/crypto/Curve25519.java | 4 +- .../java/com/wireguard/util/NonNullForAll.java | 25 +++++++ 48 files changed, 481 insertions(+), 310 deletions(-) create mode 100644 app/nonnull.gradle create mode 100644 app/src/main/java/com/wireguard/util/NonNullForAll.java diff --git a/.gitignore b/.gitignore index 3dde301c..d85bf2d3 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ build/ *.iml *.jks keystore.properties +package-info.java diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml index 56aadf89..b9a1bf45 100644 --- a/.idea/codeStyles/Project.xml +++ b/.idea/codeStyles/Project.xml @@ -94,6 +94,8 @@