mark TorService methods from EventHandler as overridden

This keeps me from getting confused...
This commit is contained in:
Hans-Christoph Steiner 2015-06-09 12:16:17 -04:00
parent 86593df6fb
commit 82f82e1c10
1 changed files with 7 additions and 21 deletions

View File

@ -1401,11 +1401,9 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
startService(intent); startService(intent);
} }
@Override
public void message(String severity, String msg) { public void message(String severity, String msg) {
logNotice(severity + ": " + msg); logNotice(severity + ": " + msg);
if (msg.indexOf(TOR_CONTROL_PORT_MSG_BOOTSTRAP_DONE)!=-1) if (msg.indexOf(TOR_CONTROL_PORT_MSG_BOOTSTRAP_DONE)!=-1)
@ -1413,23 +1411,18 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
mCurrentStatus = STATUS_ON; mCurrentStatus = STATUS_ON;
sendCallbackStatus(mCurrentStatus); sendCallbackStatus(mCurrentStatus);
showToolbarNotification(getString(R.string.status_activated), NOTIFY_ID, R.drawable.ic_stat_tor); showToolbarNotification(getString(R.string.status_activated), NOTIFY_ID, R.drawable.ic_stat_tor);
} }
} }
@Override
public void newDescriptors(List<String> orList) { public void newDescriptors(List<String> orList) {
} }
@Override
public void orConnStatus(String status, String orName) { public void orConnStatus(String status, String orName) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("orConnStatus ("); sb.append("orConnStatus (");
sb.append(parseNodeName(orName) ); sb.append(parseNodeName(orName) );
@ -1437,10 +1430,9 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
sb.append(status); sb.append(status);
debug(sb.toString()); debug(sb.toString());
} }
@Override
public void streamStatus(String status, String streamID, String target) { public void streamStatus(String status, String streamID, String target) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -1450,10 +1442,9 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
sb.append(status); sb.append(status);
logNotice(sb.toString()); logNotice(sb.toString());
} }
@Override
public void unrecognized(String type, String msg) { public void unrecognized(String type, String msg) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
@ -1463,10 +1454,9 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
sb.append(msg); sb.append(msg);
logNotice(sb.toString()); logNotice(sb.toString());
} }
@Override
public void bandwidthUsed(long read, long written) { public void bandwidthUsed(long read, long written) {
if (read != lastRead || written != lastWritten) if (read != lastRead || written != lastWritten)
@ -1488,15 +1478,12 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
mTotalTrafficWritten += written; mTotalTrafficWritten += written;
mTotalTrafficRead += read; mTotalTrafficRead += read;
} }
lastWritten = written; lastWritten = written;
lastRead = read; lastRead = read;
sendCallbackStatusMessage(lastWritten, lastRead, mTotalTrafficWritten, mTotalTrafficRead); sendCallbackStatusMessage(lastWritten, lastRead, mTotalTrafficWritten, mTotalTrafficRead);
} }
private String formatCount(long count) { private String formatCount(long count) {
@ -1516,7 +1503,6 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
public void circuitStatus(String status, String circID, String path) { public void circuitStatus(String status, String circID, String path) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("Circuit ("); sb.append("Circuit (");
sb.append((circID)); sb.append((circID));