cleaned up binding and logging

This commit is contained in:
Nathan Freitas 2012-01-25 20:09:33 -05:00
parent 5dae040303
commit 493d6e22cd
1 changed files with 12 additions and 17 deletions

View File

@ -284,7 +284,6 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() { DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
switch (which){ switch (which){
case DialogInterface.BUTTON_POSITIVE: case DialogInterface.BUTTON_POSITIVE:
@ -340,9 +339,9 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
protected void onResume() { protected void onResume() {
super.onResume(); super.onResume();
if (!mIsBound)
bindService(); bindService();
if (getIntent() == null) if (getIntent() == null)
return; return;
@ -355,7 +354,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
{ {
DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() { DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
switch (which){ switch (which){
case DialogInterface.BUTTON_POSITIVE: case DialogInterface.BUTTON_POSITIVE:
@ -402,10 +401,6 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
else else
{ {
//setTitle(getString(R.string.app_name) + ' ' + getString(R.string.app_version));
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.cancelAll();
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
@ -722,7 +717,7 @@ public class Orbot extends Activity implements OnLongClickListener, TorConstants
mHandler.sendMessage(msg); mHandler.sendMessage(msg);
} }
@Override //this was when we displayed the log in the main Activity; can prob take this out now
public void logMessage(String value) throws RemoteException { public void logMessage(String value) throws RemoteException {
Message msg = mHandler.obtainMessage(TorServiceConstants.LOG_MSG); Message msg = mHandler.obtainMessage(TorServiceConstants.LOG_MSG);