Dump linphone version to the log on each startup.
This commit is contained in:
parent
656d0d720a
commit
034673dea5
1 changed files with 16 additions and 0 deletions
|
@ -34,6 +34,8 @@ import android.app.PendingIntent;
|
||||||
import android.app.Service;
|
import android.app.Service;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
import android.content.pm.PackageInfo;
|
||||||
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
import android.media.MediaPlayer;
|
import android.media.MediaPlayer;
|
||||||
import android.media.RingtoneManager;
|
import android.media.RingtoneManager;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
@ -106,6 +108,7 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
|
||||||
|
|
||||||
// Dump some debugging information to the logs
|
// Dump some debugging information to the logs
|
||||||
Hacks.dumpDeviceInformation();
|
Hacks.dumpDeviceInformation();
|
||||||
|
dumpInstalledLinphoneInformation();
|
||||||
|
|
||||||
mNotificationMgr = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
|
mNotificationMgr = (NotificationManager) this.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||||
mNotif = new Notification(R.drawable.status_level, "", System.currentTimeMillis());
|
mNotif = new Notification(R.drawable.status_level, "", System.currentTimeMillis());
|
||||||
|
@ -124,6 +127,19 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private void dumpInstalledLinphoneInformation() {
|
||||||
|
PackageInfo info = null;
|
||||||
|
try {
|
||||||
|
info = getPackageManager().getPackageInfo(getPackageName(),0);
|
||||||
|
} catch (NameNotFoundException nnfe) {}
|
||||||
|
|
||||||
|
if (info != null) {
|
||||||
|
Log.i(LinphoneManager.TAG, "Linphone version is " + info.versionCode);
|
||||||
|
} else {
|
||||||
|
Log.i(LinphoneManager.TAG, "Linphone version is unkown");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void sendNotification(int level, int textId) {
|
private void sendNotification(int level, int textId) {
|
||||||
mNotif.iconLevel = level;
|
mNotif.iconLevel = level;
|
||||||
mNotif.when=System.currentTimeMillis();
|
mNotif.when=System.currentTimeMillis();
|
||||||
|
|
Loading…
Reference in a new issue