Browse Source

- upgraded gradle

- no longer pass remote RSS feeds to RemoteRssActivity

it now pulls it from the connection itself. this avoids having an Intent that's too large and causing the app to crash without warning
pull/313/head
Twig Nguyen 8 years ago
parent
commit
a519e70fd9
  1. 3
      app/src/main/java/org/transdroid/core/gui/TorrentsActivity.java
  2. 9
      app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssActivity.java
  3. 2
      build.gradle

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

@ -861,8 +861,9 @@ public class TorrentsActivity extends AppCompatActivity implements TorrentTasksE
return; return;
} }
// Passing the items over as a feed can overload the Intent size limit and crash without a stack trace!
RemoteRssActivity_.intent(this) RemoteRssActivity_.intent(this)
.feeds(rssFeedItems) // .feeds(rssFeedItems)
.start() .start()
; ;
} }

9
app/src/main/java/org/transdroid/core/gui/remoterss/RemoteRssActivity.java

@ -29,7 +29,6 @@ import android.widget.ListView;
import org.androidannotations.annotations.AfterViews; import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Bean; import org.androidannotations.annotations.Bean;
import org.androidannotations.annotations.EActivity; import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.Extra;
import org.androidannotations.annotations.FragmentById; import org.androidannotations.annotations.FragmentById;
import org.androidannotations.annotations.InstanceState; import org.androidannotations.annotations.InstanceState;
import org.androidannotations.annotations.ItemClick; import org.androidannotations.annotations.ItemClick;
@ -42,6 +41,7 @@ import org.transdroid.core.app.settings.SystemSettings_;
import org.transdroid.core.gui.lists.SimpleListItemAdapter; import org.transdroid.core.gui.lists.SimpleListItemAdapter;
import org.transdroid.core.gui.remoterss.data.RemoteRssChannel; import org.transdroid.core.gui.remoterss.data.RemoteRssChannel;
import org.transdroid.core.gui.remoterss.data.RemoteRssItem; import org.transdroid.core.gui.remoterss.data.RemoteRssItem;
import org.transdroid.core.gui.remoterss.data.RemoteRssSupplier;
import org.transdroid.core.service.ConnectivityHelper; import org.transdroid.core.service.ConnectivityHelper;
import org.transdroid.daemon.IDaemonAdapter; import org.transdroid.daemon.IDaemonAdapter;
@ -62,7 +62,7 @@ import java.util.List;
*/ */
@EActivity(R.layout.activity_remoterss) @EActivity(R.layout.activity_remoterss)
public class RemoteRssActivity extends AppCompatActivity { public class RemoteRssActivity extends AppCompatActivity {
@Extra // @Extra
@InstanceState @InstanceState
protected ArrayList<RemoteRssChannel> feeds; protected ArrayList<RemoteRssChannel> feeds;
@ -102,10 +102,6 @@ public class RemoteRssActivity extends AppCompatActivity {
@AfterViews @AfterViews
protected void init() { protected void init() {
if (feeds == null) {
feeds = new ArrayList<>();
}
// Simple action bar with up, torrent name as title and refresh button // Simple action bar with up, torrent name as title and refresh button
torrentsToolbar.setNavigationIcon(R.drawable.ic_action_drawer); torrentsToolbar.setNavigationIcon(R.drawable.ic_action_drawer);
setSupportActionBar(torrentsToolbar); setSupportActionBar(torrentsToolbar);
@ -114,6 +110,7 @@ public class RemoteRssActivity extends AppCompatActivity {
// Connect to the last used server // Connect to the last used server
ServerSetting lastUsed = applicationSettings.getLastUsedServer(); ServerSetting lastUsed = applicationSettings.getLastUsedServer();
currentConnection = lastUsed.createServerAdapter(connectivityHelper.getConnectedNetworkName(), this); currentConnection = lastUsed.createServerAdapter(connectivityHelper.getConnectedNetworkName(), this);
feeds = ((RemoteRssSupplier) (currentConnection)).getRemoteRssChannels();
// Fill in the filter list // Fill in the filter list
showChannelFilters(); showChannelFilters();

2
build.gradle

@ -3,7 +3,7 @@ buildscript {
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:2.1.0' classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
} }
} }

Loading…
Cancel
Save