mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Add missing hotspot nullability annotations
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user