add some call integration debug aids

This commit is contained in:
Daniel Gultsch 2024-04-04 09:57:01 +02:00
parent b90906b973
commit c294a24f4e
No known key found for this signature in database
GPG key ID: F43D18AD2A0982C2
3 changed files with 14 additions and 12 deletions

View file

@ -82,7 +82,7 @@ dependencies {
implementation 'com.google.guava:guava:32.1.3-android' implementation 'com.google.guava:guava:32.1.3-android'
quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.13.28' quicksyImplementation 'io.michaelrocks:libphonenumber-android:8.13.28'
implementation 'im.conversations.webrtc:webrtc-android:119.0.0' implementation 'im.conversations.webrtc:webrtc-android:119.0.1'
} }
ext { ext {

View file

@ -357,6 +357,7 @@ public class CallIntegrationConnectionService extends ConnectionService {
try { try {
service.getSystemService(TelecomManager.class).placeCall(address, extras); service.getSystemService(TelecomManager.class).placeCall(address, extras);
} catch (final SecurityException e) { } catch (final SecurityException e) {
Log.e(Config.LOGTAG, "call integration not available", e);
Toast.makeText(service, R.string.call_integration_not_available, Toast.LENGTH_LONG) Toast.makeText(service, R.string.call_integration_not_available, Toast.LENGTH_LONG)
.show(); .show();
} }

View file

@ -2,26 +2,28 @@ package eu.siacs.conversations.ui;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.os.Build;
import android.preference.Preference; import android.preference.Preference;
import android.util.AttributeSet; import android.util.AttributeSet;
import com.google.common.base.Strings;
import eu.siacs.conversations.BuildConfig; import eu.siacs.conversations.BuildConfig;
import eu.siacs.conversations.R; import eu.siacs.conversations.R;
import eu.siacs.conversations.utils.PhoneHelper;
public class AboutPreference extends Preference { public class AboutPreference extends Preference {
public AboutPreference(final Context context, final AttributeSet attrs, final int defStyle) { public AboutPreference(final Context context, final AttributeSet attrs, final int defStyle) {
super(context, attrs, defStyle); super(context, attrs, defStyle);
setSummaryAndTitle(context); setSummaryAndTitle(context);
} }
public AboutPreference(final Context context, final AttributeSet attrs) { public AboutPreference(final Context context, final AttributeSet attrs) {
super(context, attrs); super(context, attrs);
setSummaryAndTitle(context); setSummaryAndTitle(context);
} }
private void setSummaryAndTitle(final Context context) { private void setSummaryAndTitle(final Context context) {
setSummary(String.format("%s %s", BuildConfig.APP_NAME, BuildConfig.VERSION_NAME)); setSummary(String.format("%s%s %s (%s)", BuildConfig.APP_NAME, BuildConfig.VERSION_NAME, im.conversations.webrtc.BuildConfig.WEBRTC_VERSION, Strings.nullToEmpty(Build.DEVICE)));
setTitle(context.getString(R.string.title_activity_about_x, BuildConfig.APP_NAME)); setTitle(context.getString(R.string.title_activity_about_x, BuildConfig.APP_NAME));
} }
@ -32,4 +34,3 @@ public class AboutPreference extends Preference {
getContext().startActivity(intent); getContext().startActivity(intent);
} }
} }