mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 14:15:14 +00:00
Log cleanup
This commit is contained in:
@@ -25,7 +25,6 @@ import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteOpenHelper;
|
||||
import android.util.Log;
|
||||
|
||||
public class AppDatabase {
|
||||
|
||||
|
@@ -80,7 +80,7 @@ public class NotificationFilterActivity extends ActionBarActivity {
|
||||
@Override
|
||||
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
|
||||
boolean checked = listView.isItemChecked(i);
|
||||
Log.e("NotificationFilterActivity", pkgName[i] + ":" + checked);
|
||||
//Log.e("NotificationFilterActivity", pkgName[i] + ":" + checked);
|
||||
appDatabase.open();
|
||||
appDatabase.updateEntry(pkgName[i], checked);
|
||||
appDatabase.close();
|
||||
|
@@ -176,8 +176,8 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
||||
sendNotification(notification, true);
|
||||
}
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e("NotificationsPlugin","Exception");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -365,7 +365,6 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
|
||||
public void run() {
|
||||
try {
|
||||
Thread.sleep(100);
|
||||
Log.e("onPackageReceived","Error when answering 'request': Service failed to start. Retrying...");
|
||||
sendCurrentNotifications(service);
|
||||
} catch (Exception e) {
|
||||
Log.e("onPackageReceived","Error when answering 'request': Service failed to start twice!");
|
||||
|
@@ -112,8 +112,8 @@ public class PluginFactory {
|
||||
availablePluginsInfo.put(pluginName, info); //Cache it
|
||||
return info;
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e("PluginFactory","getPluginInfo exception");
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -134,8 +134,8 @@ public class PluginFactory {
|
||||
plugin.setContext(context, device);
|
||||
return plugin;
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e("PluginFactory", "Could not instantiate plugin: "+pluginName);
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@@ -103,7 +103,7 @@ public class SharePlugin extends Plugin {
|
||||
try {
|
||||
if (np.hasPayload()) {
|
||||
|
||||
Log.e("SharePlugin", "hasPayload");
|
||||
Log.i("SharePlugin", "hasPayload");
|
||||
|
||||
final InputStream input = np.getPayload();
|
||||
final long fileLength = np.getPayloadSize();
|
||||
@@ -121,7 +121,7 @@ public class SharePlugin extends Plugin {
|
||||
//Append filename to the destination path
|
||||
final File destinationFullPath = new File(destinationDir, filename);
|
||||
|
||||
Log.e("SharePlugin", "destinationFullPath:" + destinationFullPath);
|
||||
//Log.e("SharePlugin", "destinationFullPath:" + destinationFullPath);
|
||||
|
||||
final NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
|
||||
@@ -165,7 +165,7 @@ public class SharePlugin extends Plugin {
|
||||
output.close();
|
||||
input.close();
|
||||
|
||||
Log.e("SharePlugin", "Transfer finished");
|
||||
Log.i("SharePlugin", "Transfer finished");
|
||||
|
||||
//Make sure it is added to the Android Gallery
|
||||
Intent mediaScanIntent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
|
||||
@@ -212,7 +212,7 @@ public class SharePlugin extends Plugin {
|
||||
}).start();
|
||||
|
||||
} else if (np.has("text")) {
|
||||
Log.e("SharePlugin", "hasText");
|
||||
Log.i("SharePlugin", "hasText");
|
||||
|
||||
String text = np.getString("text");
|
||||
if(android.os.Build.VERSION.SDK_INT >= 11) {
|
||||
@@ -227,13 +227,12 @@ public class SharePlugin extends Plugin {
|
||||
|
||||
String url = np.getString("url");
|
||||
|
||||
Log.e("SharePlugin", "hasUrl: "+url);
|
||||
Log.i("SharePlugin", "hasUrl: "+url);
|
||||
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
|
||||
browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
|
||||
//Do not launch it directly, show a notification instead
|
||||
//context.startActivity(browserIntent);
|
||||
//Do not launch url directly, show a notification instead
|
||||
|
||||
Resources res = context.getResources();
|
||||
TaskStackBuilder stackBuilder = TaskStackBuilder.create(context);
|
||||
|
@@ -160,8 +160,8 @@ public class ShareToReceiver extends ActionBarActivity {
|
||||
queuedSendUriList(device, uriList);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e("ShareToReceiver", "Exception");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
} else if (extras.containsKey(Intent.EXTRA_TEXT)) {
|
||||
@@ -237,8 +237,8 @@ public class ShareToReceiver extends ActionBarActivity {
|
||||
size = new File(uri.getPath()).length();
|
||||
np.setPayload(inputStream, size);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e("ShareToReceiver", "Could not obtain file size");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}else{
|
||||
@@ -273,8 +273,8 @@ public class ShareToReceiver extends ActionBarActivity {
|
||||
//For some reason this size can differ from the actual file size!
|
||||
size = cursor.getInt(column_index);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e("ShareToReceiver", "Could not obtain file size");
|
||||
e.printStackTrace();
|
||||
}
|
||||
} finally {
|
||||
cursor.close();
|
||||
@@ -335,7 +335,7 @@ public class ShareToReceiver extends ActionBarActivity {
|
||||
});
|
||||
|
||||
if (!uriList.isEmpty()) queuedSendUriList(device, uriList);
|
||||
else Log.e("ShareToReceiver", "All files sent");
|
||||
else Log.i("ShareToReceiver", "All files sent");
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -366,8 +366,8 @@ public class ShareToReceiver extends ActionBarActivity {
|
||||
});
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
Log.e("ShareToReceiver", "Exception sending files");
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user