mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-21 07:09:56 +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.net.wifi.WifiManager;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
|
|
||||||
|
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||||
import org.briarproject.briar.R;
|
import org.briarproject.briar.R;
|
||||||
|
|
||||||
import androidx.activity.result.ActivityResult;
|
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,
|
* As soon as {@link #checkAndRequestConditions()} returns true,
|
||||||
* all conditions are fulfilled.
|
* all conditions are fulfilled.
|
||||||
*/
|
*/
|
||||||
|
@NotNullByDefault
|
||||||
class ConditionManager {
|
class ConditionManager {
|
||||||
|
|
||||||
private enum Permission {
|
private enum Permission {
|
||||||
|
|||||||
@@ -2,8 +2,11 @@ package org.briarproject.briar.android.hotspot;
|
|||||||
|
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
|
|
||||||
|
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||||
|
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
|
|
||||||
|
@NotNullByDefault
|
||||||
abstract class HotspotState {
|
abstract class HotspotState {
|
||||||
|
|
||||||
static class StartingHotspot extends HotspotState {
|
static class StartingHotspot extends HotspotState {
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import androidx.annotation.UiThread;
|
|||||||
import androidx.lifecycle.LiveData;
|
import androidx.lifecycle.LiveData;
|
||||||
import androidx.lifecycle.MutableLiveData;
|
import androidx.lifecycle.MutableLiveData;
|
||||||
|
|
||||||
|
import static java.util.Objects.requireNonNull;
|
||||||
import static java.util.logging.Logger.getLogger;
|
import static java.util.logging.Logger.getLogger;
|
||||||
|
|
||||||
@NotNullByDefault
|
@NotNullByDefault
|
||||||
@@ -136,7 +137,8 @@ class HotspotViewModel extends DbViewModel
|
|||||||
@Override
|
@Override
|
||||||
@IoExecutor
|
@IoExecutor
|
||||||
public void onWebServerStarted(WebsiteConfig websiteConfig) {
|
public void onWebServerStarted(WebsiteConfig websiteConfig) {
|
||||||
state.postValue(new HotspotStarted(networkConfig, websiteConfig));
|
NetworkConfig nc = requireNonNull(networkConfig);
|
||||||
|
state.postValue(new HotspotStarted(nc, websiteConfig));
|
||||||
networkConfig = null;
|
networkConfig = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user