1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2026-04-23 07:11:23 +00:00

Lint: Make a bunch of stuff final

This commit is contained in:
TacoTheDank
2020-11-18 17:50:00 -05:00
parent e25622df4b
commit 39e5d8ccc2
27 changed files with 55 additions and 55 deletions

View File

@@ -23,7 +23,7 @@ public class DownloadInitializer extends Thread {
private final static int RESERVE_SPACE_DEFAULT = 5 * 1024 * 1024;// 5 MiB
private final static int RESERVE_SPACE_MAXIMUM = 150 * 1024 * 1024;// 150 MiB
private DownloadMission mMission;
private final DownloadMission mMission;
private HttpURLConnection mConn;
DownloadInitializer(@NonNull DownloadMission mission) {

View File

@@ -68,7 +68,7 @@ public class FinishedMissionStore extends SQLiteOpenHelper {
" UNIQUE(" + KEY_TIMESTAMP + ", " + KEY_PATH + "));";
private Context context;
private final Context context;
public FinishedMissionStore(Context context) {
super(context, DATABASE_NAME, null, DATABASE_VERSION);

View File

@@ -15,7 +15,7 @@ public class CircularFileWriter extends SharpStream {
private final static int NOTIFY_BYTES_INTERVAL = 64 * 1024;// 64 KiB
private final static int THRESHOLD_AUX_LENGTH = 15 * 1024 * 1024;// 15 MiB
private OffsetChecker callback;
private final OffsetChecker callback;
public ProgressReport onProgress;
public WriteErrorHandle onWriteError;

View File

@@ -31,7 +31,7 @@ public class StoredDirectoryHelper {
private Context context;
private String tag;
private final String tag;
public StoredDirectoryHelper(@NonNull Context context, @NonNull Uri path, String tag) throws IOException {
this.tag = tag;

View File

@@ -73,7 +73,7 @@ public abstract class Postprocessing implements Serializable {
/**
* Gets the given algorithm short name
*/
private String name;
private final String name;
private String[] args;

View File

@@ -109,7 +109,7 @@ public class DownloadManagerService extends Service {
private int downloadFailedNotificationID = DOWNLOADS_NOTIFICATION_ID + 1;
private Builder downloadFailedNotification = null;
private SparseArray<DownloadMission> mFailedDownloads = new SparseArray<>(5);
private final SparseArray<DownloadMission> mFailedDownloads = new SparseArray<>(5);
private Bitmap icLauncher;
private Bitmap icDownloadDone;

View File

@@ -96,21 +96,21 @@ public class MissionAdapter extends Adapter<ViewHolder> implements Handler.Callb
ALGORITHMS.put(R.id.sha1, "SHA1");
}
private Context mContext;
private LayoutInflater mInflater;
private DownloadManager mDownloadManager;
private Deleter mDeleter;
private final Context mContext;
private final LayoutInflater mInflater;
private final DownloadManager mDownloadManager;
private final Deleter mDeleter;
private int mLayout;
private DownloadManager.MissionIterator mIterator;
private ArrayList<ViewHolderItem> mPendingDownloadsItems = new ArrayList<>();
private Handler mHandler;
private final DownloadManager.MissionIterator mIterator;
private final ArrayList<ViewHolderItem> mPendingDownloadsItems = new ArrayList<>();
private final Handler mHandler;
private MenuItem mClear;
private MenuItem mStartButton;
private MenuItem mPauseButton;
private View mEmptyMessage;
private final View mEmptyMessage;
private RecoverHelper mRecover;
private View mView;
private ArrayList<Mission> mHidden;
private final View mView;
private final ArrayList<Mission> mHidden;
private Snackbar mSnackbar;
private final Runnable rUpdater = this::updater;

View File

@@ -27,12 +27,12 @@ public class Deleter {
private ArrayList<Mission> items;
private boolean running = true;
private Context mContext;
private MissionAdapter mAdapter;
private DownloadManager mDownloadManager;
private MissionIterator mIterator;
private Handler mHandler;
private View mView;
private final Context mContext;
private final MissionAdapter mAdapter;
private final DownloadManager mDownloadManager;
private final MissionIterator mIterator;
private final Handler mHandler;
private final View mView;
private final Runnable rShow;
private final Runnable rNext;

View File

@@ -66,7 +66,7 @@ public class MissionsFragment extends Fragment {
private DownloadMission unsafeMissionTarget = null;
private ServiceConnection mConnection = new ServiceConnection() {
private final ServiceConnection mConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder binder) {