Add missing hotspot nullability annotations

This commit is contained in:
Torsten Grote
2021-05-26 09:57:49 -03:00
committed by Sebastian Kürten
parent a5d8faef3c
commit 5cc280be61
3 changed files with 8 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import android.content.Intent;
import android.net.wifi.WifiManager;
import android.provider.Settings;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import org.briarproject.briar.R;
import androidx.activity.result.ActivityResult;
@@ -29,6 +30,7 @@ import static org.briarproject.briar.android.util.UiUtils.getGoToSettingsListene
* As soon as {@link #checkAndRequestConditions()} returns true,
* all conditions are fulfilled.
*/
@NotNullByDefault
class ConditionManager {
private enum Permission {

View File

@@ -2,8 +2,11 @@ package org.briarproject.briar.android.hotspot;
import android.graphics.Bitmap;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import androidx.annotation.Nullable;
@NotNullByDefault
abstract class HotspotState {
static class StartingHotspot extends HotspotState {

View File

@@ -31,6 +31,7 @@ import androidx.annotation.UiThread;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import static java.util.Objects.requireNonNull;
import static java.util.logging.Logger.getLogger;
@NotNullByDefault
@@ -136,7 +137,8 @@ class HotspotViewModel extends DbViewModel
@Override
@IoExecutor
public void onWebServerStarted(WebsiteConfig websiteConfig) {
state.postValue(new HotspotStarted(networkConfig, websiteConfig));
NetworkConfig nc = requireNonNull(networkConfig);
state.postValue(new HotspotStarted(nc, websiteConfig));
networkConfig = null;
}