More logging

This commit is contained in:
Albert Vaca Cintora
2023-06-04 19:20:21 +02:00
parent 79f805caeb
commit 337433000c
2 changed files with 5 additions and 2 deletions

View File

@@ -133,7 +133,6 @@ public class Device implements BaseLink.PacketReceiver {
// Remembered trusted device, we need to wait for a incoming Link to communicate
Device(@NonNull Context context, @NonNull String deviceId) throws CertificateException {
Log.i("Device","Loading trusted device");
this.context = context;
@@ -146,6 +145,8 @@ public class Device implements BaseLink.PacketReceiver {
this.deviceType = DeviceType.FromString(settings.getString("deviceType", "desktop"));
this.certificate = SslHelper.getDeviceCertificate(context, deviceId);
Log.i("Device","Loading trusted device: " + this.name);
//Assume every plugin is supported until addLink is called and we can get the actual list
supportedPlugins = new Vector<>(PluginFactory.getAvailablePlugins());

View File

@@ -86,7 +86,7 @@ internal fun updateAppWidget(
appWidgetManager: AppWidgetManager,
appWidgetId: Int
) {
Log.i("WidgetProvider", "updateAppWidget: $appWidgetId")
Log.d("WidgetProvider", "updateAppWidget: $appWidgetId")
val deviceId = loadWidgetDeviceIdPref(context, appWidgetId)
val device: Device? = if (deviceId != null) KdeConnect.getInstance().getDevice(deviceId) else null
@@ -100,6 +100,8 @@ internal fun updateAppWidget(
val setDevicePendingIntent = PendingIntent.getActivity(context, appWidgetId, setDeviceIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE)
views.setOnClickPendingIntent(R.id.runcommandWidgetTitleHeader, setDevicePendingIntent)
Log.d("WidgetProvider", "updateAppWidget device: " + if (device == null) "null" else device.name)
if (device == null) {
views.setTextViewText(R.id.runcommandWidgetTitle, context.getString(R.string.kde_connect))
views.setViewVisibility(R.id.run_commands_list, View.VISIBLE)