mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-19 14:19:53 +01:00
Add a couple of code cleanups.
This commit is contained in:
@@ -303,11 +303,13 @@ public class KeyAgreementFragment extends BaseEventFragment
|
|||||||
status.setText(listener.keyAgreementStarted());
|
status.setText(listener.keyAgreementStarted());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@UiThread
|
||||||
private void keyAgreementAborted(boolean remoteAborted) {
|
private void keyAgreementAborted(boolean remoteAborted) {
|
||||||
reset();
|
reset();
|
||||||
listener.keyAgreementAborted(remoteAborted);
|
listener.keyAgreementAborted(remoteAborted);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@UiThread
|
||||||
private void keyAgreementFinished(KeyAgreementResult result) {
|
private void keyAgreementFinished(KeyAgreementResult result) {
|
||||||
statusView.setVisibility(VISIBLE);
|
statusView.setVisibility(VISIBLE);
|
||||||
status.setText(listener.keyAgreementFinished(result));
|
status.setText(listener.keyAgreementFinished(result));
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ package org.briarproject.briar.android.navdrawer;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.UiThread;
|
|
||||||
|
|
||||||
import org.briarproject.bramble.api.db.DatabaseExecutor;
|
import org.briarproject.bramble.api.db.DatabaseExecutor;
|
||||||
import org.briarproject.bramble.api.db.DbException;
|
import org.briarproject.bramble.api.db.DbException;
|
||||||
@@ -84,7 +83,6 @@ public class NavDrawerControllerImpl extends DbControllerImpl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onActivityDestroy() {
|
public void onActivityDestroy() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -94,21 +92,16 @@ public class NavDrawerControllerImpl extends DbControllerImpl
|
|||||||
if (LOG.isLoggable(INFO)) {
|
if (LOG.isLoggable(INFO)) {
|
||||||
LOG.info("TransportEnabledEvent: " + id.getString());
|
LOG.info("TransportEnabledEvent: " + id.getString());
|
||||||
}
|
}
|
||||||
transportStateUpdate(id, true);
|
listener.stateUpdate(id, true);
|
||||||
} else if (e instanceof TransportDisabledEvent) {
|
} else if (e instanceof TransportDisabledEvent) {
|
||||||
TransportId id = ((TransportDisabledEvent) e).getTransportId();
|
TransportId id = ((TransportDisabledEvent) e).getTransportId();
|
||||||
if (LOG.isLoggable(INFO)) {
|
if (LOG.isLoggable(INFO)) {
|
||||||
LOG.info("TransportDisabledEvent: " + id.getString());
|
LOG.info("TransportDisabledEvent: " + id.getString());
|
||||||
}
|
}
|
||||||
transportStateUpdate(id, false);
|
listener.stateUpdate(id, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@UiThread
|
|
||||||
private void transportStateUpdate(TransportId id, boolean enabled) {
|
|
||||||
listener.stateUpdate(id, enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void showExpiryWarning(ResultHandler<ExpiryWarning> handler) {
|
public void showExpiryWarning(ResultHandler<ExpiryWarning> handler) {
|
||||||
if (!IS_DEBUG_BUILD && !IS_BETA_BUILD) {
|
if (!IS_DEBUG_BUILD && !IS_BETA_BUILD) {
|
||||||
@@ -190,7 +183,6 @@ public class NavDrawerControllerImpl extends DbControllerImpl
|
|||||||
@Override
|
@Override
|
||||||
public boolean isTransportRunning(TransportId transportId) {
|
public boolean isTransportRunning(TransportId transportId) {
|
||||||
Plugin plugin = pluginManager.getPlugin(transportId);
|
Plugin plugin = pluginManager.getPlugin(transportId);
|
||||||
|
|
||||||
return plugin != null && plugin.isRunning();
|
return plugin != null && plugin.isRunning();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user