其他分享
首页 > 其他分享> > 个人冲刺10

个人冲刺10

作者:互联网

今天反向冲刺导

包出错 项目运行不起来设置 点进去发生闪退 注释掉了

package timeline.lizimumu.com.t.app;

import android.app.Application;
import android.content.Intent;

import com.fancy.androidutils.utils.ToastUtils;

import java.util.ArrayList;
import java.util.List;

import timeline.lizimumu.com.t.AppConst;
import timeline.lizimumu.com.t.data.AppItem;
import timeline.lizimumu.com.t.data.DataManager;
import timeline.lizimumu.com.t.db.DbHistoryExecutor;
import timeline.lizimumu.com.t.db.DbIgnoreExecutor;
import timeline.lizimumu.com.t.service.AppService;
import timeline.lizimumu.com.t.util.CrashHandler;
import timeline.lizimumu.com.t.util.PreferenceManager;


public class MyApplication extends Application {

@Override
public void onCreate() {
super.onCreate();
PreferenceManager.init(this);
ToastUtils.init(this);
getApplicationContext().startService(new Intent(getApplicationContext(), AppService.class));
DbIgnoreExecutor.init(getApplicationContext());
DbHistoryExecutor.init(getApplicationContext());
DataManager.init();
addDefaultIgnoreAppsToDB();
if (AppConst.CRASH_TO_FILE) CrashHandler.getInstance().init();
}

private void addDefaultIgnoreAppsToDB() {
new Thread(new Runnable() {
@Override
public void run() {
List<String> mDefaults = new ArrayList<>();
mDefaults.add("com.android.settings");
// mDefaults.add(BuildConfig.APPLICATION_ID);
for (String packageName : mDefaults) {
AppItem item = new AppItem();
item.mPackageName = packageName;
item.mEventTime = System.currentTimeMillis();
DbIgnoreExecutor.getInstance().insertItem(item);
}
}
}).run();
}
}

有些错误代码

标签:10,个人,timeline,lizimumu,冲刺,init,new,import,com
来源: https://www.cnblogs.com/wyq134214/p/16376570.html