Search in sources :

Example 1 with AutoStartAdapter

use of com.yzy.supercleanmaster.adapter.AutoStartAdapter in project superCleanMaster by joyoyao.

the class AutoStartFragment method fillData.

private void fillData() {
    if (position == 0) {
        topText.setText("禁止下列软件自启,可提升运行速度");
    } else {
        topText.setText("禁止系统核心软件自启,将会影响手机的正常使用,请谨慎操作");
    }
    List<AutoStartInfo> mAutoStartInfo = BootStartUtils.fetchAutoApps(mContext);
    //   List<AutoStartInfo> mAutoStartInfo = BootStartUtils.fetchInstalledApps(mContext);
    noSystemAuto = new ArrayList<>();
    isSystemAuto = new ArrayList<>();
    for (AutoStartInfo a : mAutoStartInfo) {
        if (a.isSystem()) {
            isSystemAuto.add(a);
        } else {
            noSystemAuto.add(a);
        }
    }
    if (position == 0) {
        mAutoStartAdapter = new AutoStartAdapter(mContext, noSystemAuto, mHandler);
        listview.setAdapter(mAutoStartAdapter);
        refeshButoom();
    } else {
        mAutoStartAdapter = new AutoStartAdapter(mContext, isSystemAuto, null);
        listview.setAdapter(mAutoStartAdapter);
    }
}
Also used : AutoStartInfo(com.yzy.supercleanmaster.model.AutoStartInfo) AutoStartAdapter(com.yzy.supercleanmaster.adapter.AutoStartAdapter)

Aggregations

AutoStartAdapter (com.yzy.supercleanmaster.adapter.AutoStartAdapter)1 AutoStartInfo (com.yzy.supercleanmaster.model.AutoStartInfo)1