Make some inner classes static

This avoids an implicit this field and can help GC.  Found via
error-prone.
This commit is contained in:
Andrew Gaul 2018-01-20 18:26:08 -08:00
parent b98571ede8
commit 118d9103c1
6 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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;

View File

@ -314,7 +314,7 @@ public class HttpDownloader extends Downloader {
}
}
private class BasicAuthorizationInterceptor implements Interceptor {
private static class BasicAuthorizationInterceptor implements Interceptor {
private DownloadRequest downloadRequest;

View File

@ -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