Browse Source

.editorconfig part 2: Import optimization

pull/559/head
TacoTheDank 5 years ago
parent
commit
dab7f2de52
  1. 18
      app/src/main/java/org/transdroid/core/app/search/SearchHelper.java
  2. 4
      app/src/main/java/org/transdroid/core/app/search/SearchResult.java
  3. 6
      app/src/main/java/org/transdroid/core/app/settings/RssfeedSetting.java
  4. 2
      app/src/main/java/org/transdroid/core/app/settings/SettingsUtils.java
  5. 6
      app/src/main/java/org/transdroid/core/app/settings/WebsearchSetting.java
  6. 4
      app/src/main/java/org/transdroid/core/gui/DetailsActivity.java
  7. 10
      app/src/main/java/org/transdroid/core/gui/DetailsFragment.java
  8. 9
      app/src/main/java/org/transdroid/core/gui/ServerPickerDialog.java
  9. 3
      app/src/main/java/org/transdroid/core/gui/TorrentTasksExecutor.java
  10. 28
      app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java
  11. 11
      app/src/main/java/org/transdroid/core/gui/TorrentsFragment.java
  12. 17
      app/src/main/java/org/transdroid/core/gui/lists/DetailsAdapter.java
  13. 4
      app/src/main/java/org/transdroid/core/gui/lists/LocalTorrent.java
  14. 4
      app/src/main/java/org/transdroid/core/gui/lists/MergeAdapter.java
  15. 7
      app/src/main/java/org/transdroid/core/gui/lists/PiecesMapView.java
  16. 6
      app/src/main/java/org/transdroid/core/gui/lists/SimpleListItemAdapter.java
  17. 4
      app/src/main/java/org/transdroid/core/gui/lists/SimpleListItemSpinnerAdapter.java
  18. 6
      app/src/main/java/org/transdroid/core/gui/lists/TorrentFilePriorityLayout.java
  19. 4
      app/src/main/java/org/transdroid/core/gui/lists/TorrentProgressBar.java
  20. 6
      app/src/main/java/org/transdroid/core/gui/lists/TorrentStatusLayout.java
  21. 7
      app/src/main/java/org/transdroid/core/gui/log/DatabaseHelper.java
  22. 4
      app/src/main/java/org/transdroid/core/gui/log/ErrorLogEntry.java
  23. 14
      app/src/main/java/org/transdroid/core/gui/log/ErrorLogSender.java
  24. 12
      app/src/main/java/org/transdroid/core/gui/navigation/DialogHelper.java
  25. 7
      app/src/main/java/org/transdroid/core/gui/navigation/NavigationHelper.java
  26. 6
      app/src/main/java/org/transdroid/core/gui/navigation/SelectionManagerMode.java
  27. 4
      app/src/main/java/org/transdroid/core/gui/navigation/SelectionModificationSpinner.java
  28. 10
      app/src/main/java/org/transdroid/core/gui/navigation/StatusType.java
  29. 4
      app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssFragment.java
  30. 15
      app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java
  31. 4
      app/src/main/java/org/transdroid/core/gui/rss/RssFeedsFragment.java
  32. 7
      app/src/main/java/org/transdroid/core/gui/rss/RssItemsFragment.java
  33. 4
      app/src/main/java/org/transdroid/core/gui/search/FilePickerHelper.java
  34. 9
      app/src/main/java/org/transdroid/core/gui/search/SearchActivity.java
  35. 10
      app/src/main/java/org/transdroid/core/gui/search/SearchResultView.java
  36. 6
      app/src/main/java/org/transdroid/core/gui/search/SearchResultsFragment.java
  37. 1
      app/src/main/java/org/transdroid/core/gui/search/UrlEntryDialog.java
  38. 6
      app/src/main/java/org/transdroid/core/gui/settings/AboutDialog.java
  39. 6
      app/src/main/java/org/transdroid/core/gui/settings/ChangelogDialog.java
  40. 12
      app/src/main/java/org/transdroid/core/gui/settings/WebsearchSettingsActivity.java
  41. 6
      app/src/main/java/org/transdroid/core/rssparser/Channel.java
  42. 4
      app/src/main/java/org/transdroid/core/rssparser/Item.java
  43. 1
      app/src/main/java/org/transdroid/core/rssparser/RssParser.java
  44. 8
      app/src/main/java/org/transdroid/core/seedbox/SeedboxSettings.java
  45. 10
      app/src/main/java/org/transdroid/core/seedbox/SeedboxSettingsImpl.java
  46. 8
      app/src/main/java/org/transdroid/core/seedbox/XirvikDediSettings.java
  47. 8
      app/src/main/java/org/transdroid/core/seedbox/XirvikSemiSettings.java
  48. 8
      app/src/main/java/org/transdroid/core/seedbox/XirvikSharedSettings.java
  49. 2
      app/src/main/java/org/transdroid/core/service/ConnectivityHelper.java
  50. 3
      app/src/main/java/org/transdroid/core/service/ControlService.java
  51. 5
      app/src/main/java/org/transdroid/core/service/RssCheckerJob.java
  52. 3
      app/src/main/java/org/transdroid/core/service/ServerCheckerJobRunner.java
  53. 7
      app/src/main/java/org/transdroid/core/widget/ListWidgetConfigActivity.java
  54. 12
      app/src/main/java/org/transdroid/core/widget/ListWidgetPreviewAdapter.java
  55. 3
      app/src/main/java/org/transdroid/core/widget/ListWidgetProvider.java
  56. 9
      app/src/main/java/org/transdroid/core/widget/ListWidgetViewsService.java
  57. 5
      app/src/main/java/org/transdroid/daemon/Aria2c/Aria2Adapter.java
  58. 6
      app/src/main/java/org/transdroid/daemon/BitComet/BitCometAdapter.java
  59. 6
      app/src/main/java/org/transdroid/daemon/Deluge/DelugeRemoteRssChannel.java
  60. 4
      app/src/main/java/org/transdroid/daemon/Deluge/DelugeRemoteRssItem.java
  61. 113
      app/src/main/java/org/transdroid/daemon/Deluge/DelugeRpcAdapter.java
  62. 4
      app/src/main/java/org/transdroid/daemon/Deluge/DelugeRpcClient.java
  63. 16
      app/src/main/java/org/transdroid/daemon/DummyAdapter.java
  64. 12
      app/src/main/java/org/transdroid/daemon/Ktorrent/FileListParser.java
  65. 12
      app/src/main/java/org/transdroid/daemon/Ktorrent/StatsParser.java
  66. 3
      app/src/main/java/org/transdroid/daemon/Synology/SynologyAdapter.java
  67. 12
      app/src/main/java/org/transdroid/daemon/Tfb4rt/StatsParser.java
  68. 24
      app/src/main/java/org/transdroid/daemon/Tfb4rt/Tfb4rtAdapter.java
  69. 6
      app/src/main/java/org/transdroid/daemon/Torrent.java
  70. 8
      app/src/main/java/org/transdroid/daemon/TorrentFile.java
  71. 3
      app/src/main/java/org/transdroid/daemon/Ttorrent/TtorrentAdapter.java
  72. 22
      app/src/main/java/org/transdroid/daemon/Vuze/VuzeAdapter.java
  73. 26
      app/src/main/java/org/transdroid/daemon/Vuze/VuzeXmlOverHttpClient.java
  74. 4
      app/src/main/java/org/transdroid/daemon/task/AddByFileTask.java
  75. 4
      app/src/main/java/org/transdroid/daemon/task/AddByMagnetUrlTask.java
  76. 4
      app/src/main/java/org/transdroid/daemon/task/AddByUrlTask.java
  77. 4
      app/src/main/java/org/transdroid/daemon/task/GetFileListTaskSuccessResult.java
  78. 4
      app/src/main/java/org/transdroid/daemon/task/RemoveTask.java
  79. 6
      app/src/main/java/org/transdroid/daemon/task/RetrieveTaskSuccessResult.java
  80. 4
      app/src/main/java/org/transdroid/daemon/task/SetAlternativeModeTask.java
  81. 4
      app/src/main/java/org/transdroid/daemon/task/SetDownloadLocationTask.java
  82. 4
      app/src/main/java/org/transdroid/daemon/task/SetFilePriorityTask.java
  83. 4
      app/src/main/java/org/transdroid/daemon/task/SetLabelTask.java
  84. 6
      app/src/main/java/org/transdroid/daemon/task/SetTrackersTask.java
  85. 4
      app/src/main/java/org/transdroid/daemon/task/SetTransferRatesTask.java
  86. 4
      app/src/main/java/org/transdroid/daemon/task/StartAllTask.java
  87. 4
      app/src/main/java/org/transdroid/daemon/task/StartTask.java
  88. 4
      app/src/main/java/org/transdroid/multipart/BitCometFilePart.java
  89. 4
      app/src/main/java/org/transdroid/multipart/Utf8StringPart.java
  90. 1
      app/src/main/res/layout/list_item_widget_dark.xml

18
app/src/main/java/org/transdroid/core/app/search/SearchHelper.java

@ -16,6 +16,15 @@ @@ -16,6 +16,15 @@
*/
package org.transdroid.core.app.search;
import android.content.ContentProviderClient;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.EBean.Scope;
import org.androidannotations.annotations.RootContext;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
@ -23,15 +32,6 @@ import java.net.URLEncoder; @@ -23,15 +32,6 @@ import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.EBean.Scope;
import org.androidannotations.annotations.RootContext;
import android.content.ContentProviderClient;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
@EBean(scope = Scope.Singleton)
public class SearchHelper {

4
app/src/main/java/org/transdroid/core/app/search/SearchResult.java

@ -16,11 +16,11 @@ @@ -16,11 +16,11 @@
*/
package org.transdroid.core.app.search;
import java.util.Date;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Date;
/**
* Represents a search result as retrieved by querying the Torrent Search package.
*

6
app/src/main/java/org/transdroid/core/app/settings/RssfeedSetting.java

@ -16,12 +16,12 @@ @@ -16,12 +16,12 @@
*/
package org.transdroid.core.app.settings;
import java.util.Date;
import android.net.Uri;
import android.text.TextUtils;
import org.transdroid.core.gui.lists.SimpleListItem;
import android.net.Uri;
import android.text.TextUtils;
import java.util.Date;
/**
* Represents a user-specified RSS feed.

2
app/src/main/java/org/transdroid/core/app/settings/SettingsUtils.java

@ -1,8 +1,6 @@ @@ -1,8 +1,6 @@
package org.transdroid.core.app.settings;
import android.content.Context;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.app.AppCompatDelegate;

6
app/src/main/java/org/transdroid/core/app/settings/WebsearchSetting.java

@ -16,12 +16,12 @@ @@ -16,12 +16,12 @@
*/
package org.transdroid.core.app.settings;
import org.transdroid.core.gui.lists.SimpleListItem;
import org.transdroid.core.gui.search.SearchSetting;
import android.net.Uri;
import android.text.TextUtils;
import org.transdroid.core.gui.lists.SimpleListItem;
import org.transdroid.core.gui.search.SearchSetting;
/**
* Represents a user-specified website that can be searched (by starting the browser, rather than in-app)
*

4
app/src/main/java/org/transdroid/core/gui/DetailsActivity.java

@ -57,8 +57,6 @@ import org.transdroid.daemon.TorrentFile; @@ -57,8 +57,6 @@ import org.transdroid.daemon.TorrentFile;
import org.transdroid.daemon.task.DaemonTaskFailureResult;
import org.transdroid.daemon.task.DaemonTaskResult;
import org.transdroid.daemon.task.DaemonTaskSuccessResult;
import org.transdroid.daemon.task.ToggleSequentialDownloadTask;
import org.transdroid.daemon.task.ToggleFirstLastPieceDownloadTask;
import org.transdroid.daemon.task.ForceRecheckTask;
import org.transdroid.daemon.task.GetFileListTask;
import org.transdroid.daemon.task.GetFileListTaskSuccessResult;
@ -75,6 +73,8 @@ import org.transdroid.daemon.task.SetLabelTask; @@ -75,6 +73,8 @@ import org.transdroid.daemon.task.SetLabelTask;
import org.transdroid.daemon.task.SetTrackersTask;
import org.transdroid.daemon.task.StartTask;
import org.transdroid.daemon.task.StopTask;
import org.transdroid.daemon.task.ToggleFirstLastPieceDownloadTask;
import org.transdroid.daemon.task.ToggleSequentialDownloadTask;
import java.util.ArrayList;
import java.util.List;

10
app/src/main/java/org/transdroid/core/gui/DetailsFragment.java

@ -23,11 +23,6 @@ import android.content.ClipboardManager; @@ -23,11 +23,6 @@ import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.ActionMenuView;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuItem;
@ -37,6 +32,10 @@ import android.widget.ListView; @@ -37,6 +32,10 @@ import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.ActionMenuView;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.nispok.snackbar.Snackbar;
import com.nispok.snackbar.SnackbarManager;
import com.nispok.snackbar.enums.SnackbarType;
@ -50,7 +49,6 @@ import org.androidannotations.annotations.OptionsItem; @@ -50,7 +49,6 @@ import org.androidannotations.annotations.OptionsItem;
import org.androidannotations.annotations.ViewById;
import org.transdroid.R;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.core.app.settings.SystemSettings_;
import org.transdroid.core.gui.lists.DetailsAdapter;
import org.transdroid.core.gui.lists.SimpleListItemAdapter;
import org.transdroid.core.gui.navigation.Label;

9
app/src/main/java/org/transdroid/core/gui/ServerPickerDialog.java

@ -16,18 +16,17 @@ @@ -16,18 +16,17 @@
*/
package org.transdroid.core.gui;
import java.util.List;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import android.os.Bundle;
import org.transdroid.R;
import org.transdroid.core.app.settings.ServerSetting;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import java.util.List;
public class ServerPickerDialog extends DialogFragment {

3
app/src/main/java/org/transdroid/core/gui/TorrentTasksExecutor.java

@ -16,9 +16,6 @@ @@ -16,9 +16,6 @@
*/
package org.transdroid.core.gui;
import androidx.appcompat.widget.ActionMenuView;
import androidx.appcompat.widget.Toolbar;
import org.transdroid.daemon.Priority;
import org.transdroid.daemon.Torrent;
import org.transdroid.daemon.TorrentFile;

28
app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java

@ -24,16 +24,6 @@ import android.net.Uri; @@ -24,16 +24,6 @@ import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import androidx.annotation.NonNull;
import androidx.core.view.MenuItemCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.ActionMenuView;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@ -43,6 +33,15 @@ import android.widget.AdapterView; @@ -43,6 +33,15 @@ import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.ActionMenuView;
import androidx.appcompat.widget.SearchView;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.MenuItemCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import com.getbase.floatingactionbutton.FloatingActionButton;
import com.getbase.floatingactionbutton.FloatingActionsMenu;
import com.nispok.snackbar.Snackbar;
@ -88,7 +87,10 @@ import org.transdroid.core.gui.rss.RssFeedsActivity_; @@ -88,7 +87,10 @@ import org.transdroid.core.gui.rss.RssFeedsActivity_;
import org.transdroid.core.gui.search.FilePickerHelper;
import org.transdroid.core.gui.search.UrlEntryDialog;
import org.transdroid.core.gui.settings.MainSettingsActivity_;
import org.transdroid.core.service.*;
import org.transdroid.core.service.AppUpdateJob;
import org.transdroid.core.service.ConnectivityHelper;
import org.transdroid.core.service.RssCheckerJob;
import org.transdroid.core.service.ServerCheckerJob;
import org.transdroid.core.widget.ListWidgetProvider;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.DaemonException;
@ -104,8 +106,6 @@ import org.transdroid.daemon.task.AddByUrlTask; @@ -104,8 +106,6 @@ import org.transdroid.daemon.task.AddByUrlTask;
import org.transdroid.daemon.task.DaemonTaskFailureResult;
import org.transdroid.daemon.task.DaemonTaskResult;
import org.transdroid.daemon.task.DaemonTaskSuccessResult;
import org.transdroid.daemon.task.ToggleSequentialDownloadTask;
import org.transdroid.daemon.task.ToggleFirstLastPieceDownloadTask;
import org.transdroid.daemon.task.ForceRecheckTask;
import org.transdroid.daemon.task.GetFileListTask;
import org.transdroid.daemon.task.GetFileListTaskSuccessResult;
@ -126,6 +126,8 @@ import org.transdroid.daemon.task.SetTrackersTask; @@ -126,6 +126,8 @@ import org.transdroid.daemon.task.SetTrackersTask;
import org.transdroid.daemon.task.SetTransferRatesTask;
import org.transdroid.daemon.task.StartTask;
import org.transdroid.daemon.task.StopTask;
import org.transdroid.daemon.task.ToggleFirstLastPieceDownloadTask;
import org.transdroid.daemon.task.ToggleSequentialDownloadTask;
import org.transdroid.daemon.util.HttpHelper;
import java.io.File;

11
app/src/main/java/org/transdroid/core/gui/TorrentsFragment.java

@ -18,12 +18,6 @@ package org.transdroid.core.gui; @@ -18,12 +18,6 @@ package org.transdroid.core.gui;
import android.app.Fragment;
import android.content.Context;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.ActionMenuView;
import androidx.appcompat.widget.Toolbar;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuItem;
@ -33,6 +27,11 @@ import android.widget.ListView; @@ -33,6 +27,11 @@ import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.ActionMenuView;
import androidx.appcompat.widget.Toolbar;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import com.getbase.floatingactionbutton.FloatingActionsMenu;
import org.androidannotations.annotations.AfterViews;

17
app/src/main/java/org/transdroid/core/gui/lists/DetailsAdapter.java

@ -16,21 +16,20 @@ @@ -16,21 +16,20 @@
*/
package org.transdroid.core.gui.lists;
import java.util.ArrayList;
import java.util.List;
import org.transdroid.R;
import org.transdroid.core.gui.navigation.*;
import org.transdroid.core.gui.lists.PiecesMapView;
import org.transdroid.daemon.Torrent;
import org.transdroid.daemon.TorrentFile;
import android.content.Context;
import android.text.util.Linkify;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import org.transdroid.R;
import org.transdroid.core.gui.navigation.FilterSeparatorView_;
import org.transdroid.daemon.Torrent;
import org.transdroid.daemon.TorrentFile;
import java.util.ArrayList;
import java.util.List;
/**
* List adapter that holds a header view showing torrent details and show the list list contained by the torrent.
*

4
app/src/main/java/org/transdroid/core/gui/lists/LocalTorrent.java

@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
*/
package org.transdroid.core.gui.lists;
import java.util.Locale;
import android.content.res.Resources;
import org.transdroid.R;
import org.transdroid.daemon.DaemonException;
@ -25,7 +25,7 @@ import org.transdroid.daemon.TorrentStatus; @@ -25,7 +25,7 @@ import org.transdroid.daemon.TorrentStatus;
import org.transdroid.daemon.util.FileSizeConverter;
import org.transdroid.daemon.util.TimespanConverter;
import android.content.res.Resources;
import java.util.Locale;
/**
* Wrapper around Torrent to provide some addition getters that give translatable or otherwise formatted Strings of

4
app/src/main/java/org/transdroid/core/gui/lists/MergeAdapter.java

@ -16,8 +16,6 @@ @@ -16,8 +16,6 @@
*/
package org.transdroid.core.gui.lists;
import java.util.ArrayList;
import android.database.DataSetObserver;
import android.view.View;
import android.view.ViewGroup;
@ -27,6 +25,8 @@ import android.widget.ListAdapter; @@ -27,6 +25,8 @@ import android.widget.ListAdapter;
import android.widget.SectionIndexer;
import android.widget.TextView;
import java.util.ArrayList;
/**
* An adapter that can contain many other adapters and shows them in sequence. Taken from
* http://stackoverflow.com/questions/7964259/android-attaching-multiple-adapters-to-one-adapter and based on the Apache

7
app/src/main/java/org/transdroid/core/gui/lists/PiecesMapView.java

@ -1,15 +1,14 @@ @@ -1,15 +1,14 @@
package org.transdroid.core.gui.lists;
import org.transdroid.R;
import android.content.Context;
import android.view.View;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.view.View;
import org.transdroid.R;
import java.util.ArrayList;
import java.util.List;
import java.lang.Math;
class PiecesMapView extends View {

6
app/src/main/java/org/transdroid/core/gui/lists/SimpleListItemAdapter.java

@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
*/
package org.transdroid.core.gui.lists;
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import java.util.ArrayList;
import java.util.List;
public class SimpleListItemAdapter extends BaseAdapter {
private final Context context;

4
app/src/main/java/org/transdroid/core/gui/lists/SimpleListItemSpinnerAdapter.java

@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
*/
package org.transdroid.core.gui.lists;
import java.util.List;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import java.util.List;
/**
* A wrapper around {@link ArrayAdapter} that contains {@link SimpleListItem}s which simply show their name in the
* Spinner. The standard Android spinner resources are used for the layout.

6
app/src/main/java/org/transdroid/core/gui/lists/TorrentFilePriorityLayout.java

@ -16,9 +16,6 @@ @@ -16,9 +16,6 @@
*/
package org.transdroid.core.gui.lists;
import org.transdroid.R;
import org.transdroid.daemon.Priority;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
@ -26,6 +23,9 @@ import android.graphics.RectF; @@ -26,6 +23,9 @@ import android.graphics.RectF;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import org.transdroid.R;
import org.transdroid.daemon.Priority;
/**
* A relative layout that that is checkable (to be used in a contextual action bar) and shows a coloured bar in the far
* left indicating the priority of the represented file. The darker the green, the higher the priority, while grey means

4
app/src/main/java/org/transdroid/core/gui/lists/TorrentProgressBar.java

@ -16,8 +16,6 @@ @@ -16,8 +16,6 @@
*/
package org.transdroid.core.gui.lists;
import org.transdroid.R;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
@ -26,6 +24,8 @@ import android.graphics.RectF; @@ -26,6 +24,8 @@ import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.View;
import org.transdroid.R;
/**
* Draws a progress bar indicating the download progress as well as the torrent status.
*

6
app/src/main/java/org/transdroid/core/gui/lists/TorrentStatusLayout.java

@ -16,9 +16,6 @@ @@ -16,9 +16,6 @@
*/
package org.transdroid.core.gui.lists;
import org.transdroid.R;
import org.transdroid.daemon.TorrentStatus;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
@ -26,6 +23,9 @@ import android.graphics.RectF; @@ -26,6 +23,9 @@ import android.graphics.RectF;
import android.util.AttributeSet;
import android.widget.RelativeLayout;
import org.transdroid.R;
import org.transdroid.daemon.TorrentStatus;
/**
* A relative layout that is checkable (to be used in a contextual action bar) and shows a coloured bar in the far left
* indicating the status of the represented torrent. Active downloads are blue, seeding torrents are green, errors are

7
app/src/main/java/org/transdroid/core/gui/log/DatabaseHelper.java

@ -16,19 +16,18 @@ @@ -16,19 +16,18 @@
*/
package org.transdroid.core.gui.log;
import java.sql.SQLException;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
import androidx.annotation.Keep;
import android.util.Log;
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper;
import com.j256.ormlite.support.ConnectionSource;
import com.j256.ormlite.table.TableUtils;
import java.sql.SQLException;
/**
* Helper to access the database to access persisting objects.
*

4
app/src/main/java/org/transdroid/core/gui/log/ErrorLogEntry.java

@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
*/
package org.transdroid.core.gui.log;
import java.util.Date;
import android.os.Parcel;
import android.os.Parcelable;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import java.util.Date;
/**
* Represents an error log entry to be registered in the database.
*

14
app/src/main/java/org/transdroid/core/gui/log/ErrorLogSender.java

@ -16,8 +16,11 @@ @@ -16,8 +16,11 @@
*/
package org.transdroid.core.gui.log;
import java.sql.SQLException;
import java.util.List;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import com.j256.ormlite.dao.Dao;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EBean;
@ -26,11 +29,8 @@ import org.transdroid.R; @@ -26,11 +29,8 @@ import org.transdroid.R;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.core.gui.navigation.NavigationHelper;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Intent;
import com.j256.ormlite.dao.Dao;
import java.sql.SQLException;
import java.util.List;
@EBean
public class ErrorLogSender {

12
app/src/main/java/org/transdroid/core/gui/navigation/DialogHelper.java

@ -16,12 +16,6 @@ @@ -16,12 +16,6 @@
*/
package org.transdroid.core.gui.navigation;
import java.io.Serializable;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.Extra;
import org.transdroid.core.gui.*;
import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
@ -32,6 +26,12 @@ import android.view.MenuInflater; @@ -32,6 +26,12 @@ import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.Window;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.Extra;
import org.transdroid.core.gui.TorrentsActivity_;
import java.io.Serializable;
/**
* Helper class that show a dialog either as pop-up or as full screen activity. Should be used by calling
* {@link #showDialog(Context, DialogSpecification)} with in instance of the dialog specification that should be shown,

7
app/src/main/java/org/transdroid/core/gui/navigation/NavigationHelper.java

@ -26,15 +26,14 @@ import android.content.pm.PackageManager; @@ -26,15 +26,14 @@ import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Build;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.TypefaceSpan;
import androidx.annotation.NonNull;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.text.Spannable;
import android.text.SpannableString;
import android.text.style.TypefaceSpan;
import com.afollestad.materialdialogs.DialogAction;
import com.afollestad.materialdialogs.MaterialDialog;
import com.nostra13.universalimageloader.cache.disc.impl.ext.LruDiskCache;

6
app/src/main/java/org/transdroid/core/gui/navigation/SelectionManagerMode.java

@ -16,9 +16,6 @@ @@ -16,9 +16,6 @@
*/
package org.transdroid.core.gui.navigation;
import org.transdroid.core.gui.navigation.SelectionModificationSpinner.OnModificationActionSelectedListener;
import org.transdroid.daemon.Finishable;
import android.content.Context;
import android.util.SparseBooleanArray;
import android.view.ActionMode;
@ -28,6 +25,9 @@ import android.view.ViewGroup; @@ -28,6 +25,9 @@ import android.view.ViewGroup;
import android.widget.AbsListView.MultiChoiceModeListener;
import android.widget.ListView;
import org.transdroid.core.gui.navigation.SelectionModificationSpinner.OnModificationActionSelectedListener;
import org.transdroid.daemon.Finishable;
/**
* A helper to implement {@link ListView} selection modification behaviour with the {@link SelectionModificationSpinner}
* by implementing the specific actions and providing a title based on the number of currently selected items. It is

4
app/src/main/java/org/transdroid/core/gui/navigation/SelectionModificationSpinner.java

@ -16,8 +16,6 @@ @@ -16,8 +16,6 @@
*/
package org.transdroid.core.gui.navigation;
import org.transdroid.R;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
@ -25,6 +23,8 @@ import android.widget.ArrayAdapter; @@ -25,6 +23,8 @@ import android.widget.ArrayAdapter;
import android.widget.Spinner;
import android.widget.TextView;
import org.transdroid.R;
/**
* Spinner that holds actions that can be performed on list selections. The spinner itself has some title, which can for
* example be used to show the number of selected items.

10
app/src/main/java/org/transdroid/core/gui/navigation/StatusType.java

@ -16,16 +16,16 @@ @@ -16,16 +16,16 @@
*/
package org.transdroid.core.gui.navigation;
import java.util.Arrays;
import java.util.List;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import org.transdroid.R;
import org.transdroid.core.gui.lists.SimpleListItem;
import org.transdroid.daemon.Torrent;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Arrays;
import java.util.List;
/**
* Enumeration of all status types, which filter the list of shown torrents based on transfer activity.

4
app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssFragment.java

@ -17,14 +17,14 @@ @@ -17,14 +17,14 @@
package org.transdroid.core.gui.remoterss;
import androidx.fragment.app.Fragment;
import android.view.View;
import android.widget.ArrayAdapter;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EFragment;

15
app/src/main/java/org/transdroid/core/gui/rss/RssFeedsActivity.java

@ -22,21 +22,18 @@ import android.net.Uri; @@ -22,21 +22,18 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.material.tabs.TabLayout;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.viewpager.widget.PagerAdapter;
import androidx.viewpager.widget.ViewPager;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import com.google.android.material.tabs.TabLayout;
import com.nispok.snackbar.Snackbar;
import com.nispok.snackbar.SnackbarManager;
import com.nispok.snackbar.enums.SnackbarType;

4
app/src/main/java/org/transdroid/core/gui/rss/RssFeedsFragment.java

@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
*/
package org.transdroid.core.gui.rss;
import androidx.fragment.app.Fragment;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ListView;
import android.widget.TextView;
import androidx.fragment.app.Fragment;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EFragment;

7
app/src/main/java/org/transdroid/core/gui/rss/RssItemsFragment.java

@ -23,10 +23,6 @@ import android.content.ClipboardManager; @@ -23,10 +23,6 @@ import android.content.ClipboardManager;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import androidx.fragment.app.Fragment;
import androidx.appcompat.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.ActionMode;
import android.view.Menu;
@ -37,6 +33,9 @@ import android.widget.ListView; @@ -37,6 +33,9 @@ import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import com.nispok.snackbar.Snackbar;
import com.nispok.snackbar.SnackbarManager;

4
app/src/main/java/org/transdroid/core/gui/search/FilePickerHelper.java

@ -16,8 +16,6 @@ @@ -16,8 +16,6 @@
*/
package org.transdroid.core.gui.search;
import org.transdroid.R;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.AlertDialog;
@ -27,6 +25,8 @@ import android.content.DialogInterface.OnClickListener; @@ -27,6 +25,8 @@ import android.content.DialogInterface.OnClickListener;
import android.content.Intent;
import android.net.Uri;
import org.transdroid.R;
import java.lang.ref.WeakReference;
public class FilePickerHelper {

9
app/src/main/java/org/transdroid/core/gui/search/SearchActivity.java

@ -23,11 +23,6 @@ import android.net.Uri; @@ -23,11 +23,6 @@ import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.provider.SearchRecentSuggestions;
import androidx.core.view.MenuItemCompat;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@ -38,6 +33,10 @@ import android.widget.SearchView; @@ -38,6 +33,10 @@ import android.widget.SearchView;
import android.widget.Spinner;
import android.widget.TextView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.view.MenuItemCompat;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity;

10
app/src/main/java/org/transdroid/core/gui/search/SearchResultView.java

@ -16,16 +16,16 @@ @@ -16,16 +16,16 @@
*/
package org.transdroid.core.gui.search;
import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;
import org.transdroid.R;
import org.transdroid.core.app.search.SearchResult;
import android.content.Context;
import android.text.format.DateUtils;
import android.widget.RelativeLayout;
import android.widget.TextView;
import org.androidannotations.annotations.EViewGroup;
import org.androidannotations.annotations.ViewById;
import org.transdroid.R;
import org.transdroid.core.app.search.SearchResult;
/**
* View that represents a {@link SearchResult} object from an in-app search
*

6
app/src/main/java/org/transdroid/core/gui/search/SearchResultsFragment.java

@ -20,9 +20,6 @@ import android.app.Fragment; @@ -20,9 +20,6 @@ import android.app.Fragment;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import androidx.appcompat.app.AppCompatActivity;
import android.text.TextUtils;
import android.view.ActionMode;
import android.view.Menu;
@ -34,6 +31,8 @@ import android.widget.ProgressBar; @@ -34,6 +31,8 @@ import android.widget.ProgressBar;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.app.AppCompatActivity;
import com.nispok.snackbar.Snackbar;
import com.nispok.snackbar.SnackbarManager;
@ -50,7 +49,6 @@ import org.transdroid.core.app.search.SearchHelper; @@ -50,7 +49,6 @@ import org.transdroid.core.app.search.SearchHelper;
import org.transdroid.core.app.search.SearchHelper.SearchSortOrder;
import org.transdroid.core.app.search.SearchResult;
import org.transdroid.core.app.search.SearchSite;
import org.transdroid.core.app.settings.SystemSettings_;
import org.transdroid.core.gui.TorrentsActivity_;
import org.transdroid.core.gui.navigation.NavigationHelper_;
import org.transdroid.core.gui.navigation.SelectionManagerMode;

1
app/src/main/java/org/transdroid/core/gui/search/UrlEntryDialog.java

@ -19,7 +19,6 @@ package org.transdroid.core.gui.search; @@ -19,7 +19,6 @@ package org.transdroid.core.gui.search;
import android.content.ClipboardManager;
import android.content.Context;
import android.net.Uri;
import android.text.InputType;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;

6
app/src/main/java/org/transdroid/core/gui/settings/AboutDialog.java

@ -16,13 +16,13 @@ @@ -16,13 +16,13 @@
*/
package org.transdroid.core.gui.settings;
import org.transdroid.R;
import org.transdroid.core.gui.navigation.DialogHelper;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import org.transdroid.R;
import org.transdroid.core.gui.navigation.DialogHelper;
/**
* Fragment that shows info about the application developer and used open source libraries.
*

6
app/src/main/java/org/transdroid/core/gui/settings/ChangelogDialog.java

@ -16,13 +16,13 @@ @@ -16,13 +16,13 @@
*/
package org.transdroid.core.gui.settings;
import org.transdroid.R;
import org.transdroid.core.gui.navigation.DialogHelper;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import org.transdroid.R;
import org.transdroid.core.gui.navigation.DialogHelper;
/**
* Fragment that shows recent app changes.
*

12
app/src/main/java/org/transdroid/core/gui/settings/WebsearchSettingsActivity.java

@ -16,12 +16,6 @@ @@ -16,12 +16,6 @@
*/
package org.transdroid.core.gui.settings;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
import org.androidannotations.annotations.OptionsMenu;
import org.transdroid.R;
import org.transdroid.core.app.settings.*;
import android.annotation.TargetApi;
import android.app.AlertDialog;
import android.app.Dialog;
@ -31,6 +25,12 @@ import android.content.Intent; @@ -31,6 +25,12 @@ import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.OptionsItem;
import org.androidannotations.annotations.OptionsMenu;
import org.transdroid.R;
import org.transdroid.core.app.settings.ApplicationSettings_;
/**
* Activity that allows for a configuration of a web search site. The key can be supplied to update an existing web
* search site setting instead of creating a new one.

6
app/src/main/java/org/transdroid/core/rssparser/Channel.java

@ -4,13 +4,13 @@ @@ -4,13 +4,13 @@
*/
package org.transdroid.core.rssparser;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import android.os.Parcel;
import android.os.Parcelable;
public class Channel implements Parcelable {
private int id;

4
app/src/main/java/org/transdroid/core/rssparser/Item.java

@ -4,12 +4,12 @@ @@ -4,12 +4,12 @@
*/
package org.transdroid.core.rssparser;
import java.util.Date;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Date;
public class Item implements Parcelable {
private int id;

1
app/src/main/java/org/transdroid/core/rssparser/RssParser.java

@ -11,7 +11,6 @@ import org.apache.http.client.methods.HttpGet; @@ -11,7 +11,6 @@ import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.BasicHttpParams;

8
app/src/main/java/org/transdroid/core/seedbox/SeedboxSettings.java

@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
*/
package org.transdroid.core.seedbox;
import java.util.List;
import org.transdroid.core.app.settings.ServerSetting;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import org.transdroid.core.app.settings.ServerSetting;
import java.util.List;
/**
* Interface to implement by any seedbox type (as appears in the {@link SeedboxProvider} enum) to access and modify
* seedbox settings for a certain seedbox provider.

10
app/src/main/java/org/transdroid/core/seedbox/SeedboxSettingsImpl.java

@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
*/
package org.transdroid.core.seedbox;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import org.transdroid.core.app.settings.ServerSetting;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Abstract class that acts as a helper for actual {@link SeedboxSettings} implementations by implementing some

8
app/src/main/java/org/transdroid/core/seedbox/XirvikDediSettings.java

@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
*/
package org.transdroid.core.seedbox;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.OS;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.OS;
/**
* Implementation of {@link SeedboxSettings} for the Xirvik dedicated seedbox.
*

8
app/src/main/java/org/transdroid/core/seedbox/XirvikSemiSettings.java

@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
*/
package org.transdroid.core.seedbox;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.OS;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.OS;
/**
* Implementation of {@link SeedboxSettings} for a Xirvik semi-dedicated seedbox.
*

8
app/src/main/java/org/transdroid/core/seedbox/XirvikSharedSettings.java

@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
*/
package org.transdroid.core.seedbox;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.OS;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.OS;
/**
* Implementation of {@link SeedboxSettings} for a Xirvik shared seedbox.
*

2
app/src/main/java/org/transdroid/core/service/ConnectivityHelper.java

@ -24,9 +24,9 @@ import android.content.pm.PackageManager; @@ -24,9 +24,9 @@ import android.content.pm.PackageManager;
import android.net.ConnectivityManager;
import android.net.wifi.WifiManager;
import androidx.appcompat.app.AlertDialog;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.appcompat.app.AlertDialog;
import org.androidannotations.annotations.EBean;
import org.androidannotations.annotations.EBean.Scope;

3
app/src/main/java/org/transdroid/core/service/ControlService.java

@ -10,7 +10,8 @@ import org.transdroid.core.app.settings.ApplicationSettings; @@ -10,7 +10,8 @@ import org.transdroid.core.app.settings.ApplicationSettings;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.core.gui.log.Log;
import org.transdroid.core.widget.ListWidgetConfig;
import org.transdroid.core.widget.*;
import org.transdroid.core.widget.ListWidgetProvider;
import org.transdroid.core.widget.ListWidgetProvider_;
import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.task.DaemonTask;
import org.transdroid.daemon.task.DaemonTaskResult;

5
app/src/main/java/org/transdroid/core/service/RssCheckerJob.java

@ -26,12 +26,7 @@ import com.evernote.android.job.JobRequest; @@ -26,12 +26,7 @@ import com.evernote.android.job.JobRequest;
import org.transdroid.core.app.settings.NotificationSettings;
import org.transdroid.core.app.settings.NotificationSettings_;
import org.transdroid.core.app.settings.SystemSettings;
import org.transdroid.core.app.settings.SystemSettings_;
import org.transdroid.core.gui.log.Log_;
import org.transdroid.core.gui.navigation.NavigationHelper_;
import java.util.concurrent.TimeUnit;
public class RssCheckerJob extends Job {

3
app/src/main/java/org/transdroid/core/service/ServerCheckerJobRunner.java

@ -20,11 +20,10 @@ import android.app.NotificationManager; @@ -20,11 +20,10 @@ import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
import androidx.core.app.NotificationCompat;
import android.text.TextUtils;
import com.evernote.android.job.Job;
import org.androidannotations.annotations.Bean;

7
app/src/main/java/org/transdroid/core/widget/ListWidgetConfigActivity.java

@ -22,10 +22,6 @@ import android.appwidget.AppWidgetManager; @@ -22,10 +22,6 @@ import android.appwidget.AppWidgetManager;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.CheckBox;
@ -35,6 +31,9 @@ import android.widget.ListView; @@ -35,6 +31,9 @@ import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AppCompatActivity;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Background;
import org.androidannotations.annotations.Bean;

12
app/src/main/java/org/transdroid/core/widget/ListWidgetPreviewAdapter.java

@ -16,12 +16,6 @@ @@ -16,12 +16,6 @@
*/
package org.transdroid.core.widget;
import java.util.List;
import org.transdroid.R;
import org.transdroid.core.gui.lists.LocalTorrent;
import org.transdroid.daemon.Torrent;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
@ -29,6 +23,12 @@ import android.view.ViewGroup; @@ -29,6 +23,12 @@ import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import org.transdroid.R;
import org.transdroid.core.gui.lists.LocalTorrent;
import org.transdroid.daemon.Torrent;
import java.util.List;
/**
* A list list item adapter that shows torrents as simplified, widget-style list items; the light theme is always used.
*

3
app/src/main/java/org/transdroid/core/widget/ListWidgetProvider.java

@ -24,11 +24,10 @@ import android.content.Context; @@ -24,11 +24,10 @@ import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.widget.RemoteViews;
import androidx.annotation.NonNull;
import android.widget.RemoteViews;
import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EReceiver;
import org.transdroid.R;

9
app/src/main/java/org/transdroid/core/widget/ListWidgetViewsService.java

@ -27,9 +27,14 @@ import android.widget.RemoteViewsService; @@ -27,9 +27,14 @@ import android.widget.RemoteViewsService;
import org.androidannotations.annotations.EService;
import org.transdroid.R;
import org.transdroid.core.app.settings.*;
import org.transdroid.core.app.settings.ApplicationSettings;
import org.transdroid.core.app.settings.ApplicationSettings_;
import org.transdroid.core.app.settings.ServerSetting;
import org.transdroid.core.app.settings.SystemSettings;
import org.transdroid.core.app.settings.SystemSettings_;
import org.transdroid.core.gui.lists.LocalTorrent;
import org.transdroid.core.gui.log.*;
import org.transdroid.core.gui.log.Log;
import org.transdroid.core.gui.log.Log_;
import org.transdroid.core.service.ConnectivityHelper_;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.IDaemonAdapter;

5
app/src/main/java/org/transdroid/daemon/Aria2c/Aria2Adapter.java

@ -20,14 +20,13 @@ package org.transdroid.daemon.Aria2c; @@ -20,14 +20,13 @@ package org.transdroid.daemon.Aria2c;
import android.net.Uri;
import android.text.TextUtils;
import net.iharder.Base64;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import net.iharder.Base64;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

6
app/src/main/java/org/transdroid/daemon/BitComet/BitCometAdapter.java

@ -17,13 +17,9 @@ @@ -17,13 +17,9 @@
*/
package org.transdroid.daemon.BitComet;
import org.transdroid.multipart.BitCometFilePart;
import com.android.internal.http.multipart.MultipartEntity;
import com.android.internal.http.multipart.Part;
import org.transdroid.multipart.Utf8StringPart;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
@ -58,6 +54,8 @@ import org.transdroid.daemon.task.RetrieveTask; @@ -58,6 +54,8 @@ import org.transdroid.daemon.task.RetrieveTask;
import org.transdroid.daemon.task.RetrieveTaskSuccessResult;
import org.transdroid.daemon.task.SetTransferRatesTask;
import org.transdroid.daemon.util.HttpHelper;
import org.transdroid.multipart.BitCometFilePart;
import org.transdroid.multipart.Utf8StringPart;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

6
app/src/main/java/org/transdroid/daemon/Deluge/DelugeRemoteRssChannel.java

@ -3,12 +3,12 @@ package org.transdroid.daemon.Deluge; @@ -3,12 +3,12 @@ package org.transdroid.daemon.Deluge;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.ArrayList;
import java.util.List;
import org.transdroid.core.gui.remoterss.data.RemoteRssChannel;
import org.transdroid.core.gui.remoterss.data.RemoteRssItem;
import java.util.ArrayList;
import java.util.List;
/**
* Deluge implementation of RemoteRssChannel.
*

4
app/src/main/java/org/transdroid/daemon/Deluge/DelugeRemoteRssItem.java

@ -3,10 +3,10 @@ package org.transdroid.daemon.Deluge; @@ -3,10 +3,10 @@ package org.transdroid.daemon.Deluge;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Date;
import org.transdroid.core.gui.remoterss.data.RemoteRssItem;
import java.util.Date;
/**
* Deluge implementation of RemoteRssItem.
*

113
app/src/main/java/org/transdroid/daemon/Deluge/DelugeRpcAdapter.java

@ -28,19 +28,118 @@ import org.transdroid.core.gui.remoterss.data.RemoteRssSupplier; @@ -28,19 +28,118 @@ import org.transdroid.core.gui.remoterss.data.RemoteRssSupplier;
import org.transdroid.core.rssparser.Channel;
import org.transdroid.core.rssparser.Item;
import org.transdroid.core.rssparser.RssParser;
import org.transdroid.daemon.*;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.DaemonException;
import org.transdroid.daemon.DaemonException.ExceptionType;
import org.transdroid.daemon.task.*;
import org.transdroid.daemon.DaemonSettings;
import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.Label;
import org.transdroid.daemon.Priority;
import org.transdroid.daemon.Torrent;
import org.transdroid.daemon.TorrentDetails;
import org.transdroid.daemon.TorrentFile;
import org.transdroid.daemon.task.AddByFileTask;
import org.transdroid.daemon.task.AddByMagnetUrlTask;
import org.transdroid.daemon.task.AddByUrlTask;
import org.transdroid.daemon.task.DaemonTask;
import org.transdroid.daemon.task.DaemonTaskFailureResult;
import org.transdroid.daemon.task.DaemonTaskResult;
import org.transdroid.daemon.task.DaemonTaskSuccessResult;
import org.transdroid.daemon.task.ForceRecheckTask;
import org.transdroid.daemon.task.GetFileListTask;
import org.transdroid.daemon.task.GetFileListTaskSuccessResult;
import org.transdroid.daemon.task.GetTorrentDetailsTask;
import org.transdroid.daemon.task.GetTorrentDetailsTaskSuccessResult;
import org.transdroid.daemon.task.RemoveTask;
import org.transdroid.daemon.task.RetrieveTask;
import org.transdroid.daemon.task.RetrieveTaskSuccessResult;
import org.transdroid.daemon.task.SetDownloadLocationTask;
import org.transdroid.daemon.task.SetFilePriorityTask;
import org.transdroid.daemon.task.SetLabelTask;
import org.transdroid.daemon.task.SetTrackersTask;
import org.transdroid.daemon.task.SetTransferRatesTask;
import org.xml.sax.SAXException;
import javax.xml.parsers.ParserConfigurationException;
import java.io.*;
import java.io.BufferedInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URI;
import java.util.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
import javax.xml.parsers.ParserConfigurationException;
import static org.transdroid.daemon.Deluge.DelugeCommon.*;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_DETAILS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_DETAILS_FIELDS_ARRAY;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_DOWNLOADEDEVER;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_DOWNLOAD_LOCATION;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_ETA;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_FIELDS_ARRAY;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_FILEPRIORITIES;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_FILEPROGRESS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_FILE_FIELDS_ARRAY;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_HASH;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_INDEX;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_KEY;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_LABEL;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_MAXDOWNLOAD;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_MAXUPLOAD;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_MESSAGE;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_ADD;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_ADD_FILE;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_ADD_MAGNET;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_FORCERECHECK;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_GET_LABELS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_GET_METHOD_LIST;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_GET_RSS_CONFIG;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_GET_TORRENTS_STATUS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_INFO;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_MOVESTORAGE;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_PAUSE;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_PAUSE_ALL;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_REMOVE;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_RESUME;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_RESUME_ALL;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_SETCONFIG;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_SETLABEL;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_SETTRACKERS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_SET_TORRENT_OPTIONS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_STATUS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_MOVE_COMPLETED;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_MOVE_COMPLETED_PATH;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_NAME;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_NUMPEERS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_NUMSEEDS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_PARTDONE;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_PATH;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_RATEDOWNLOAD;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_RATEUPLOAD;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_RSSFEEDS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_RSSFEED_KEY;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_SAVEPATH;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_SIZE;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_STATUS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_SUBSCRIPTIONS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_TIER;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_TIMEADDED;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_TOTALPEERS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_TOTALSEEDS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_TOTALSIZE;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_TRACKERS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_TRACKER_STATUS;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_UPLOADEDEVER;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_URL;
/**
* The daemon adapter from the Deluge torrent client using deluged API directly.

4
app/src/main/java/org/transdroid/daemon/Deluge/DelugeRpcClient.java

@ -24,8 +24,6 @@ import org.transdroid.daemon.DaemonException.ExceptionType; @@ -24,8 +24,6 @@ import org.transdroid.daemon.DaemonException.ExceptionType;
import org.transdroid.daemon.DaemonSettings;
import org.transdroid.daemon.util.TlsSniSocketFactory;
import se.dimovski.rencode.Rencode;
import java.io.ByteArrayOutputStream;
import java.io.Closeable;
import java.io.IOException;
@ -39,6 +37,8 @@ import java.util.concurrent.atomic.AtomicInteger; @@ -39,6 +37,8 @@ import java.util.concurrent.atomic.AtomicInteger;
import java.util.zip.DeflaterOutputStream;
import java.util.zip.InflaterInputStream;
import se.dimovski.rencode.Rencode;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_DAEMON_LOGIN;
import static org.transdroid.daemon.Deluge.DelugeCommon.RPC_METHOD_INFO;

16
app/src/main/java/org/transdroid/daemon/DummyAdapter.java

@ -17,13 +17,7 @@ @@ -17,13 +17,7 @@
*/
package org.transdroid.daemon;
import java.io.File;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Random;
import android.net.Uri;
import org.transdroid.core.gui.log.Log;
import org.transdroid.daemon.DaemonException.ExceptionType;
@ -49,7 +43,13 @@ import org.transdroid.daemon.task.SetFilePriorityTask; @@ -49,7 +43,13 @@ import org.transdroid.daemon.task.SetFilePriorityTask;
import org.transdroid.daemon.task.SetLabelTask;
import org.transdroid.daemon.task.SetTrackersTask;
import android.net.Uri;
import java.io.File;
import java.net.URI;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Random;
/**
* A dummy adapter that does not communicate with some server, but maintains a local list of dummy data (reset every

12
app/src/main/java/org/transdroid/daemon/Ktorrent/FileListParser.java

@ -1,18 +1,18 @@ @@ -1,18 +1,18 @@
package org.transdroid.daemon.Ktorrent;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
import org.transdroid.daemon.DaemonException;
import org.transdroid.daemon.DaemonException.ExceptionType;
import org.transdroid.daemon.Priority;
import org.transdroid.daemon.TorrentFile;
import org.transdroid.daemon.DaemonException.ExceptionType;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
/**
* A Ktorrent-specific parser for it's /data/torrent/files.xml output.
*

12
app/src/main/java/org/transdroid/daemon/Ktorrent/StatsParser.java

@ -1,19 +1,19 @@ @@ -1,19 +1,19 @@
package org.transdroid.daemon.Ktorrent;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.DaemonException;
import org.transdroid.daemon.DaemonException.ExceptionType;
import org.transdroid.daemon.Torrent;
import org.transdroid.daemon.TorrentStatus;
import org.transdroid.daemon.DaemonException.ExceptionType;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
/**
* A Ktorrent-specific parser for it's /data/torrents.xml output.
*

3
app/src/main/java/org/transdroid/daemon/Synology/SynologyAdapter.java

@ -21,8 +21,6 @@ import com.android.internal.http.multipart.FilePart; @@ -21,8 +21,6 @@ import com.android.internal.http.multipart.FilePart;
import com.android.internal.http.multipart.MultipartEntity;
import com.android.internal.http.multipart.Part;
import org.transdroid.multipart.Utf8StringPart;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
@ -58,6 +56,7 @@ import org.transdroid.daemon.task.RetrieveTaskSuccessResult; @@ -58,6 +56,7 @@ import org.transdroid.daemon.task.RetrieveTaskSuccessResult;
import org.transdroid.daemon.task.SetTransferRatesTask;
import org.transdroid.daemon.util.Collections2;
import org.transdroid.daemon.util.HttpHelper;
import org.transdroid.multipart.Utf8StringPart;
import java.io.File;
import java.io.FileNotFoundException;

12
app/src/main/java/org/transdroid/daemon/Tfb4rt/StatsParser.java

@ -1,19 +1,19 @@ @@ -1,19 +1,19 @@
package org.transdroid.daemon.Tfb4rt;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.DaemonException;
import org.transdroid.daemon.DaemonException.ExceptionType;
import org.transdroid.daemon.Torrent;
import org.transdroid.daemon.TorrentStatus;
import org.transdroid.daemon.DaemonException.ExceptionType;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.List;
/**
* A Torrentflux-b4rt-specific parser for it's stats.xml output.
*

24
app/src/main/java/org/transdroid/daemon/Tfb4rt/Tfb4rtAdapter.java

@ -17,14 +17,9 @@ @@ -17,14 +17,9 @@
*/
package org.transdroid.daemon.Tfb4rt;
import java.io.File;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.net.URI;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import com.android.internal.http.multipart.FilePart;
import com.android.internal.http.multipart.MultipartEntity;
import com.android.internal.http.multipart.Part;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
@ -33,10 +28,10 @@ import org.apache.http.impl.client.DefaultHttpClient; @@ -33,10 +28,10 @@ import org.apache.http.impl.client.DefaultHttpClient;
import org.transdroid.core.gui.log.Log;
import org.transdroid.daemon.Daemon;
import org.transdroid.daemon.DaemonException;
import org.transdroid.daemon.DaemonException.ExceptionType;
import org.transdroid.daemon.DaemonSettings;
import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.Torrent;
import org.transdroid.daemon.DaemonException.ExceptionType;
import org.transdroid.daemon.task.AddByFileTask;
import org.transdroid.daemon.task.AddByUrlTask;
import org.transdroid.daemon.task.DaemonTask;
@ -48,9 +43,14 @@ import org.transdroid.daemon.task.RetrieveTask; @@ -48,9 +43,14 @@ import org.transdroid.daemon.task.RetrieveTask;
import org.transdroid.daemon.task.RetrieveTaskSuccessResult;
import org.transdroid.daemon.util.HttpHelper;
import com.android.internal.http.multipart.FilePart;
import com.android.internal.http.multipart.MultipartEntity;
import com.android.internal.http.multipart.Part;
import java.io.File;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.net.URI;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.List;
/**
* An adapter that allows for easy access to Torrentflux-b4rt installs. Communication is handled via HTTP GET requests

6
app/src/main/java/org/transdroid/daemon/Torrent.java

@ -17,12 +17,12 @@ @@ -17,12 +17,12 @@
*/
package org.transdroid.daemon;
import java.util.Calendar;
import java.util.Date;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Calendar;
import java.util.Date;
/**
* Represents a torrent on a server daemon.
*

8
app/src/main/java/org/transdroid/daemon/TorrentFile.java

@ -17,13 +17,13 @@ @@ -17,13 +17,13 @@
*/
package org.transdroid.daemon;
import java.util.HashMap;
import java.util.Map;
import android.os.Parcel;
import android.os.Parcelable;
import org.transdroid.daemon.util.FileSizeConverter;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.HashMap;
import java.util.Map;
/**
* Represents a single file contained in a torrent.

3
app/src/main/java/org/transdroid/daemon/Ttorrent/TtorrentAdapter.java

@ -26,7 +26,6 @@ import org.apache.http.HttpResponse; @@ -26,7 +26,6 @@ import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.cookie.Cookie;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
@ -59,14 +58,12 @@ import org.transdroid.daemon.task.RemoveTask; @@ -59,14 +58,12 @@ import org.transdroid.daemon.task.RemoveTask;
import org.transdroid.daemon.task.RetrieveTask;
import org.transdroid.daemon.task.RetrieveTaskSuccessResult;
import org.transdroid.daemon.task.SetFilePriorityTask;
import org.transdroid.daemon.task.SetTransferRatesTask;
import org.transdroid.daemon.util.HttpHelper;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

22
app/src/main/java/org/transdroid/daemon/Vuze/VuzeAdapter.java

@ -17,17 +17,6 @@ @@ -17,17 +17,6 @@
*/
package org.transdroid.daemon.Vuze;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.openjpa.lib.util.Base16Encoder;
import org.transdroid.core.gui.log.Log;
import org.transdroid.daemon.Daemon;
@ -54,6 +43,17 @@ import org.transdroid.daemon.task.RetrieveTaskSuccessResult; @@ -54,6 +43,17 @@ import org.transdroid.daemon.task.RetrieveTaskSuccessResult;
import org.transdroid.daemon.task.SetFilePriorityTask;
import org.transdroid.daemon.task.SetTransferRatesTask;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URI;
import java.net.URL;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* An adapter that allows for easy access to Vuze torrent data. Communication
* is handled via the XML-RPC protocol.

26
app/src/main/java/org/transdroid/daemon/Vuze/VuzeXmlOverHttpClient.java

@ -17,14 +17,9 @@ @@ -17,14 +17,9 @@
*/
package org.transdroid.daemon.Vuze;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringWriter;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import android.util.Xml;
import net.iharder.Base64;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
@ -36,26 +31,29 @@ import org.apache.http.conn.scheme.PlainSocketFactory; @@ -36,26 +31,29 @@ import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.scheme.SocketFactory;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.DefaultHttpClient;
import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.params.HttpProtocolParams;
import net.iharder.Base64;
import org.transdroid.daemon.DaemonException;
import org.transdroid.daemon.DaemonSettings;
import org.transdroid.daemon.DaemonException.ExceptionType;
import org.transdroid.daemon.DaemonSettings;
import org.transdroid.daemon.util.TlsSniSocketFactory;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
import org.xmlpull.v1.XmlSerializer;
import android.util.Xml;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.io.StringWriter;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
/**
* Implements an XML-RPC-like client that build and parses XML following

4
app/src/main/java/org/transdroid/daemon/task/AddByFileTask.java

@ -17,11 +17,11 @@ @@ -17,11 +17,11 @@
*/
package org.transdroid.daemon.task;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import android.os.Bundle;
public class AddByFileTask extends DaemonTask {
protected AddByFileTask(IDaemonAdapter adapter, Bundle data) {
super(adapter, DaemonMethod.AddByFile, null, data);

4
app/src/main/java/org/transdroid/daemon/task/AddByMagnetUrlTask.java

@ -17,11 +17,11 @@ @@ -17,11 +17,11 @@
*/
package org.transdroid.daemon.task;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import android.os.Bundle;
public class AddByMagnetUrlTask extends DaemonTask {
protected AddByMagnetUrlTask(IDaemonAdapter adapter, Bundle data) {
super(adapter, DaemonMethod.AddByMagnetUrl, null, data);

4
app/src/main/java/org/transdroid/daemon/task/AddByUrlTask.java

@ -17,11 +17,11 @@ @@ -17,11 +17,11 @@
*/
package org.transdroid.daemon.task;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import android.os.Bundle;
public class AddByUrlTask extends DaemonTask {
protected AddByUrlTask(IDaemonAdapter adapter, Bundle data) {
super(adapter, DaemonMethod.AddByUrl, null, data);

4
app/src/main/java/org/transdroid/daemon/task/GetFileListTaskSuccessResult.java

@ -17,10 +17,10 @@ @@ -17,10 +17,10 @@
*/
package org.transdroid.daemon.task;
import java.util.List;
import org.transdroid.daemon.TorrentFile;
import java.util.List;
/**
* The result of a successfully executed GetFileListTask on the daemon.
*

4
app/src/main/java/org/transdroid/daemon/task/RemoveTask.java

@ -17,12 +17,12 @@ @@ -17,12 +17,12 @@
*/
package org.transdroid.daemon.task;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.Torrent;
import android.os.Bundle;
public class RemoveTask extends DaemonTask {
protected RemoveTask(IDaemonAdapter adapter, Torrent targetTorrent, Bundle data) {
super(adapter, DaemonMethod.Remove, targetTorrent, data);

6
app/src/main/java/org/transdroid/daemon/task/RetrieveTaskSuccessResult.java

@ -17,10 +17,10 @@ @@ -17,10 +17,10 @@
*/
package org.transdroid.daemon.task;
import java.util.List;
import org.transdroid.daemon.Torrent;
import org.transdroid.daemon.Label;
import org.transdroid.daemon.Torrent;
import java.util.List;
/**
* The result of a successfully executed RetrieveTask on the daemon.

4
app/src/main/java/org/transdroid/daemon/task/SetAlternativeModeTask.java

@ -17,11 +17,11 @@ @@ -17,11 +17,11 @@
*/
package org.transdroid.daemon.task;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import android.os.Bundle;
public class SetAlternativeModeTask extends DaemonTask {
protected SetAlternativeModeTask(IDaemonAdapter adapter, Bundle data) {
super(adapter, DaemonMethod.SetAlternativeMode, null, data);

4
app/src/main/java/org/transdroid/daemon/task/SetDownloadLocationTask.java

@ -17,12 +17,12 @@ @@ -17,12 +17,12 @@
*/
package org.transdroid.daemon.task;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.Torrent;
import android.os.Bundle;
public class SetDownloadLocationTask extends DaemonTask {
protected SetDownloadLocationTask(IDaemonAdapter adapter, Torrent targetTorrent, Bundle data) {
super(adapter, DaemonMethod.SetDownloadLocation, targetTorrent, data);

4
app/src/main/java/org/transdroid/daemon/task/SetFilePriorityTask.java

@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
*/
package org.transdroid.daemon.task;
import java.util.ArrayList;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
@ -25,7 +25,7 @@ import org.transdroid.daemon.Priority; @@ -25,7 +25,7 @@ import org.transdroid.daemon.Priority;
import org.transdroid.daemon.Torrent;
import org.transdroid.daemon.TorrentFile;
import android.os.Bundle;
import java.util.ArrayList;
public class SetFilePriorityTask extends DaemonTask {
protected SetFilePriorityTask(IDaemonAdapter adapter, Torrent targetTorrent, Bundle data) {

4
app/src/main/java/org/transdroid/daemon/task/SetLabelTask.java

@ -17,12 +17,12 @@ @@ -17,12 +17,12 @@
*/
package org.transdroid.daemon.task;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.Torrent;
import android.os.Bundle;
public class SetLabelTask extends DaemonTask {
protected SetLabelTask(IDaemonAdapter adapter, Torrent targetTorrent, Bundle data) {
super(adapter, DaemonMethod.SetLabel, targetTorrent, data);

6
app/src/main/java/org/transdroid/daemon/task/SetTrackersTask.java

@ -17,14 +17,14 @@ @@ -17,14 +17,14 @@
*/
package org.transdroid.daemon.task;
import java.util.ArrayList;
import java.util.List;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.Torrent;
import android.os.Bundle;
import java.util.ArrayList;
import java.util.List;
public class SetTrackersTask extends DaemonTask {
protected SetTrackersTask(IDaemonAdapter adapter, Torrent targetTorrent, Bundle data) {

4
app/src/main/java/org/transdroid/daemon/task/SetTransferRatesTask.java

@ -17,11 +17,11 @@ @@ -17,11 +17,11 @@
*/
package org.transdroid.daemon.task;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import android.os.Bundle;
public class SetTransferRatesTask extends DaemonTask {
protected SetTransferRatesTask(IDaemonAdapter adapter, Bundle data) {
super(adapter, DaemonMethod.SetTransferRates, null, data);

4
app/src/main/java/org/transdroid/daemon/task/StartAllTask.java

@ -17,11 +17,11 @@ @@ -17,11 +17,11 @@
*/
package org.transdroid.daemon.task;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import android.os.Bundle;
public class StartAllTask extends DaemonTask {
protected StartAllTask(IDaemonAdapter adapter, Bundle data) {
super(adapter, DaemonMethod.StartAll, null, data);

4
app/src/main/java/org/transdroid/daemon/task/StartTask.java

@ -17,12 +17,12 @@ @@ -17,12 +17,12 @@
*/
package org.transdroid.daemon.task;
import android.os.Bundle;
import org.transdroid.daemon.DaemonMethod;
import org.transdroid.daemon.IDaemonAdapter;
import org.transdroid.daemon.Torrent;
import android.os.Bundle;
public class StartTask extends DaemonTask {
protected StartTask(IDaemonAdapter adapter, Torrent targetTorrent, Bundle data) {
super(adapter, DaemonMethod.Start, targetTorrent, data);

4
app/src/main/java/org/transdroid/multipart/BitCometFilePart.java

@ -34,14 +34,14 @@ import com.android.internal.http.multipart.FilePartSource; @@ -34,14 +34,14 @@ import com.android.internal.http.multipart.FilePartSource;
import com.android.internal.http.multipart.PartBase;
import com.android.internal.http.multipart.PartSource;
import org.apache.http.util.EncodingUtils;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import org.apache.http.util.EncodingUtils;
/**
* This class implements a part of a Multipart post object that
* consists of a file.

4
app/src/main/java/org/transdroid/multipart/Utf8StringPart.java

@ -2,11 +2,11 @@ package org.transdroid.multipart; @@ -2,11 +2,11 @@ package org.transdroid.multipart;
import com.android.internal.http.multipart.PartBase;
import org.apache.http.util.EncodingUtils;
import java.io.IOException;
import java.io.OutputStream;
import org.apache.http.util.EncodingUtils;
public class Utf8StringPart extends PartBase {
/**

1
app/src/main/res/layout/list_item_widget_dark.xml

@ -15,7 +15,6 @@ @@ -15,7 +15,6 @@
along with Transdroid. If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/widget_line_layout"
android:layout_width="fill_parent"
android:layout_height="@dimen/widget_list_item_height"

Loading…
Cancel
Save