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

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

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

2
build.gradle

@ -3,7 +3,7 @@ buildscript { @@ -3,7 +3,7 @@ buildscript {
jcenter()
}
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'
}
}

Loading…
Cancel
Save