This commit is contained in:
laoyuyu
2018-12-20 19:10:53 +08:00
parent f5967152db
commit 4df35a483e
11 changed files with 56 additions and 24 deletions

View File

@@ -41,7 +41,14 @@ public class BaseApplication extends Application {
if (BuildConfig.DEBUG && Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
StrictMode.setThreadPolicy(
new StrictMode.ThreadPolicy.Builder().detectAll().penaltyLog().build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder().detectAll().penaltyLog().build());
StrictMode.VmPolicy policy = new StrictMode.VmPolicy.Builder()
//.detectLeakedSqlLiteObjects()
//.detectLeakedClosableObjects()
.detectAll()
.penaltyDeath()
.penaltyLog()
.build();
StrictMode.setVmPolicy(policy);
}
registerReceiver(new ConnectionChangeReceiver(),

View File

@@ -32,8 +32,7 @@ import com.arialyy.simple.databinding.ActivityFtpUploadBinding;
import java.io.File;
/**
* Created by lyy on 2017/7/28.
* Ftp 文件上传demo
* Created by lyy on 2017/7/28. Ftp 文件上传demo
*/
public class FtpUploadActivity extends BaseActivity<ActivityFtpUploadBinding> {
private final String FILE_PATH = "/mnt/sdcard/AriaPrj.rar";