Make some inner classes static
This avoids an implicit this field and can help GC. Found via error-prone.
This commit is contained in:
parent
b98571ede8
commit
118d9103c1
|
@ -379,7 +379,7 @@ public class FeedInfoActivity extends AppCompatActivity {
|
|||
}
|
||||
}
|
||||
|
||||
private class ApplyToEpisodesDialog extends ConfirmationDialog {
|
||||
private static class ApplyToEpisodesDialog extends ConfirmationDialog {
|
||||
|
||||
private final Feed feed;
|
||||
private final boolean autoDownload;
|
||||
|
|
|
@ -162,7 +162,7 @@ public class ItunesAdapter extends ArrayAdapter<ItunesAdapter.Podcast> {
|
|||
/**
|
||||
* View holder object for the GridView
|
||||
*/
|
||||
class PodcastViewHolder {
|
||||
static class PodcastViewHolder {
|
||||
|
||||
/**
|
||||
* ImageView holding the Podcast image
|
||||
|
|
|
@ -78,7 +78,7 @@ public class DownloadsFragment extends Fragment {
|
|||
viewPager.setCurrentItem(lastPosition);
|
||||
}
|
||||
|
||||
public class DownloadsPagerAdapter extends FragmentPagerAdapter {
|
||||
public static class DownloadsPagerAdapter extends FragmentPagerAdapter {
|
||||
|
||||
Resources resources;
|
||||
|
||||
|
|
|
@ -950,7 +950,7 @@ public class DownloadService extends Service {
|
|||
* <p/>
|
||||
* Currently, this handler only handles FeedMedia objects, because Feeds and FeedImages are deleted if the download fails.
|
||||
*/
|
||||
private class FailedDownloadHandler implements Runnable {
|
||||
private static class FailedDownloadHandler implements Runnable {
|
||||
|
||||
private DownloadRequest request;
|
||||
private DownloadStatus status;
|
||||
|
|
|
@ -314,7 +314,7 @@ public class HttpDownloader extends Downloader {
|
|||
}
|
||||
}
|
||||
|
||||
private class BasicAuthorizationInterceptor implements Interceptor {
|
||||
private static class BasicAuthorizationInterceptor implements Interceptor {
|
||||
|
||||
private DownloadRequest downloadRequest;
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ public class HtmlToPlainText {
|
|||
}
|
||||
|
||||
// the formatting rules, implemented in a breadth-first DOM traverse
|
||||
private class FormattingVisitor implements NodeVisitor {
|
||||
private static class FormattingVisitor implements NodeVisitor {
|
||||
|
||||
private StringBuilder accum = new StringBuilder(); // holds the accumulated text
|
||||
|
||||
|
|
Loading…
Reference in New Issue