Remove unused codes

This commit is contained in:
NekoInverter committed 2020-04-03 15:50:20 +08:00
1 parent a72f38b4ab
commit 4b3488026d
47 files changed
+169 -478

No files matched your search

@@ -16,9 +16,9 @@
package com.hippo.ehviewer.preference;
import android.annotation.SuppressLint;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.Toast;
import androidx.annotation.NonNull;
@@ -26,6 +26,8 @@ import com.hippo.ehviewer.EhApplication;
import com.hippo.ehviewer.R;
import com.hippo.ehviewer.Settings;
import com.hippo.ehviewer.download.DownloadManager;
import com.hippo.ehviewer.ui.SettingsActivity;
import com.hippo.ehviewer.ui.scene.BaseScene;
import com.hippo.unifile.UniFile;
import com.hippo.yorozuya.NumberUtils;
@@ -51,13 +53,14 @@ public class CleanRedundancyPreference extends TaskPreference {
private static class ClearTask extends Task {
private final EhApplication mApplication;
@SuppressLint("StaticFieldLeak")
private final SettingsActivity mActivity;
private final DownloadManager mManager;
public ClearTask(@NonNull Context context) {
super(context);
mApplication = (EhApplication) context.getApplicationContext();
mManager = EhApplication.getDownloadManager(mApplication);
mActivity = (SettingsActivity) context;
mManager = EhApplication.getDownloadManager(context.getApplicationContext());
}
// True for cleared
@@ -111,9 +114,9 @@ public class CleanRedundancyPreference extends TaskPreference {
count = 0;
}
Toast.makeText(mApplication, 0 == count ?
mApplication.getString(R.string.settings_download_clean_redundancy_no_redundancy) :
mApplication.getString(R.string.settings_download_clean_redundancy_done, count), Toast.LENGTH_SHORT).show();
mActivity.showTip(0 == count ?
mActivity.getString(R.string.settings_download_clean_redundancy_no_redundancy) :
mActivity.getString(R.string.settings_download_clean_redundancy_done, count), BaseScene.LENGTH_SHORT);
super.onPostExecute(o);
}
}