mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Improve hotspot error fragment UI
* Use different highlighting for error message * Improve margins in fragment_hotspot_save_apk.xml * Address some review feedback
This commit is contained in:
committed by
Torsten Grote
parent
03cb1010e2
commit
aecd204efe
@@ -60,6 +60,7 @@ public class HotspotErrorFragment extends BaseFragment {
|
||||
public View onCreateView(LayoutInflater inflater,
|
||||
@Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
requireActivity().setTitle(R.string.error);
|
||||
return inflater
|
||||
.inflate(R.layout.fragment_hotspot_error, container, false);
|
||||
}
|
||||
|
||||
@@ -9,12 +9,9 @@ import org.briarproject.bramble.api.nullsafety.MethodsNotNullByDefault;
|
||||
import org.briarproject.bramble.api.nullsafety.ParametersNotNullByDefault;
|
||||
import org.briarproject.briar.R;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
@MethodsNotNullByDefault
|
||||
@ParametersNotNullByDefault
|
||||
@@ -22,9 +19,6 @@ public class HotspotHelpFragment extends Fragment {
|
||||
|
||||
public final static String TAG = HotspotHelpFragment.class.getName();
|
||||
|
||||
@Inject
|
||||
ViewModelProvider.Factory viewModelFactory;
|
||||
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater,
|
||||
@Nullable ViewGroup container,
|
||||
|
||||
@@ -42,6 +42,7 @@ import static android.os.Build.VERSION.SDK_INT;
|
||||
import static android.os.Environment.DIRECTORY_DOWNLOADS;
|
||||
import static android.os.Environment.getExternalStoragePublicDirectory;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static java.util.logging.Level.WARNING;
|
||||
import static java.util.logging.Logger.getLogger;
|
||||
import static org.briarproject.bramble.util.IoUtils.copyAndClose;
|
||||
import static org.briarproject.briar.BuildConfig.DEBUG;
|
||||
@@ -144,7 +145,9 @@ class HotspotViewModel extends DbViewModel
|
||||
|
||||
@Override
|
||||
public void onHotspotError(String error) {
|
||||
LOG.warning("Hotspot error: " + error);
|
||||
if (LOG.isLoggable(WARNING)) {
|
||||
LOG.warning("Hotspot error: " + error);
|
||||
}
|
||||
state.postValue(new HotspotError(error));
|
||||
ioExecutor.execute(webServerManager::stopWebServer);
|
||||
notificationManager.clearHotspotNotification();
|
||||
|
||||
Reference in New Issue
Block a user