mirror of
https://github.com/moparisthebest/SSLDroid
synced 2024-10-31 15:25:03 -04:00
Added version info in service startup log message
Signed-off-by: Balint Kovacs <blint@blint.hu>
This commit is contained in:
parent
3e84ffc9b5
commit
8ade78aeb7
@ -3,7 +3,12 @@ package hu.blint.ssldroid;
|
||||
import hu.blint.ssldroid.TcpProxy;
|
||||
import android.app.*;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
import android.database.Cursor;
|
||||
import android.os.Build;
|
||||
import android.os.Build.VERSION;
|
||||
import android.os.IBinder;
|
||||
import android.util.Log;
|
||||
import hu.blint.ssldroid.db.SSLDroidDbAdapter;
|
||||
@ -61,7 +66,19 @@ public class SSLDroid extends Service {
|
||||
cursor.close();
|
||||
dbHelper.close();
|
||||
createNotification(0, true, "SSLDroid is running", "Started and serving "+tunnelcount+" tunnels");
|
||||
Log.d(TAG, "SSLDroid Service Started");
|
||||
//get the version
|
||||
int vcode = 0;
|
||||
String vname = "";
|
||||
PackageManager manager = this.getPackageManager();
|
||||
try {
|
||||
PackageInfo pkginfo = manager.getPackageInfo(this.getPackageName(), 0);
|
||||
vname = pkginfo.versionName;
|
||||
vcode = pkginfo.versionCode;
|
||||
} catch (NameNotFoundException e) {
|
||||
Log.d(TAG, "Error getting package version; error='"+e.toString()+"'");
|
||||
}
|
||||
//startup message
|
||||
Log.d(TAG, "SSLDroid Service Started; version='"+vcode +"', versionname='"+vname+"'");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user