Java源码示例:com.grarak.kerneladiutor.fragments.tools.BuildpropFragment

示例1
/**
 * Add all fragments in a list
 */
private void setList() {
    ITEMS.clear();
    ITEMS.add(new DAdapter.MainHeader());
    ITEMS.add(new DAdapter.Header(getString(R.string.information)));
    ITEMS.add(new DAdapter.Item(getString(R.string.kernel_information), new KernelInformationFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.frequency_table), new FrequencyTableFragment()));
    ITEMS.add(new DAdapter.Header(getString(R.string.kernel)));

    ITEMS.add(new DAdapter.Item(getString(R.string.cpu), new CPUFragment()));
    if (CPUHotplug.hasCpuHotplug()) ITEMS.add(new DAdapter.Item(getString(R.string.cpu_hotplug), new CPUHotplugFragment()));
    if (CPUVoltage.hasCpuVoltage()) ITEMS.add(new DAdapter.Item(getString(R.string.cpu_voltage), new CPUVoltageFragment()));
    if (Entropy.hasEntropy()) ITEMS.add(new DAdapter.Item(getString(R.string.entropy), new EntropyFragment()));
    if (GPU.hasGpuControl()) ITEMS.add(new DAdapter.Item(getString(R.string.gpu), new GPUFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.io_scheduler), new IOFragment()));
    if (KSM.hasKsm()) ITEMS.add(new DAdapter.Item(getString(R.string.ksm), new KSMFragment()));
    if (LMK.getMinFrees() != null) ITEMS.add(new DAdapter.Item(getString(R.string.low_memory_killer), new LMKFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.misc_controls), new MiscFragment()));
    if (!Utils.isTV(this)) ITEMS.add(new DAdapter.Item(getString(R.string.battery), new BatteryFragment())); //Power and battery
    if (Ram.hasRamControl()) ITEMS.add(new DAdapter.Item(getString(R.string.ram), new RamFragment()));
    if (Screen.hasScreen()) ITEMS.add(new DAdapter.Item(getString(R.string.screen), new ScreenFragment()));
    if (Sound.hasSound()) ITEMS.add(new DAdapter.Item(getString(R.string.sound), new SoundFragment()));
    if (Thermal.hasThermal()) ITEMS.add(new DAdapter.Item(getString(R.string.thermal), new ThermalFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.virtual_memory), new VMFragment()));
    if (Wake.hasWake()) ITEMS.add(new DAdapter.Item(getString(R.string.wake_controls), new WakeFragment()));
    if (WakeLock.hasAnyWakelocks()) ITEMS.add(new DAdapter.Item(getString(R.string.wakelocks), new WakeLockFragment()));

    ITEMS.add(new DAdapter.Header(getString(R.string.tools)));
    if (Backup.hasBackup()) ITEMS.add(new DAdapter.Item(getString(R.string.backup), new BackupFragment()));
    if (Buildprop.hasBuildprop()) ITEMS.add(new DAdapter.Item(getString(R.string.build_prop_editor), new BuildpropFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.initd), new InitdFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.logs), new LogsFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.profile), new ProfileFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.recovery), new RecoveryFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.startup_commands), new StartUpCommandsFragment()));
    ITEMS.add(new DAdapter.Header(getString(R.string.other)));
    ITEMS.add(new DAdapter.Item(getString(R.string.settings), new SettingsFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.about_us), new AboutusFragment()));
}
 
示例2
/**
 * Add all fragments in a list
 */
private void setList() {
    ITEMS.clear();
    ITEMS.add(new DAdapter.MainHeader());
    ITEMS.add(new DAdapter.Header(getString(R.string.information)));
    ITEMS.add(new DAdapter.Item(getString(R.string.kernel_information), new KernelInformationFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.frequency_table), new FrequencyTableFragment()));
    ITEMS.add(new DAdapter.Header(getString(R.string.kernel)));
    ITEMS.add(new DAdapter.Item(getString(R.string.cpu), new CPUFragment()));
    if (CPUVoltage.hasCpuVoltage())
        ITEMS.add(new DAdapter.Item(getString(R.string.cpu_voltage), new CPUVoltageFragment()));
    if (CPUHotplug.hasCpuHotplug())
        ITEMS.add(new DAdapter.Item(getString(R.string.cpu_hotplug), new CPUHotplugFragment()));
    if (CoreControl.hasMinLittle())
        ITEMS.add(new DAdapter.Item(getString(R.string.corecontrol), new CoreControlFragment()));
    if (Thermal.hasThermal())
        ITEMS.add(new DAdapter.Item(getString(R.string.thermal), new ThermalFragment()));
    if (GPU.hasGpuControl())
        ITEMS.add(new DAdapter.Item(getString(R.string.gpu), new GPUFragment()));
    if (Screen.hasScreen())
        ITEMS.add(new DAdapter.Item(getString(R.string.screen), new ScreenFragment()));
    if (Wake.hasWake())
        ITEMS.add(new DAdapter.Item(getString(R.string.wake_controls), new WakeFragment()));
    if (Sound.hasSound())
        ITEMS.add(new DAdapter.Item(getString(R.string.sound), new SoundFragment()));
    if (!Utils.isTV(this))
        ITEMS.add(new DAdapter.Item(getString(R.string.battery), new BatteryFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.io_scheduler), new IOFragment()));
    if (KSM.hasKsm())
        ITEMS.add(new DAdapter.Item(getString(R.string.ksm), new KSMFragment()));
    if (LMK.getMinFrees() != null)
        ITEMS.add(new DAdapter.Item(getString(R.string.low_memory_killer), new LMKFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.virtual_memory), new VMFragment()));
    if (WakeLock.hasAnyWakelocks()) {
        ITEMS.add(new DAdapter.Item(getString(R.string.wakelocks), new WakeLockFragment()));
    }
    if (Entropy.hasEntropy())
        ITEMS.add(new DAdapter.Item(getString(R.string.entropy), new EntropyFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.misc_controls), new MiscFragment()));
    ITEMS.add(new DAdapter.Header(getString(R.string.tools)));
    Downloads downloads;
    if ((downloads = new Downloads(this)).isSupported())
        ITEMS.add(new DAdapter.Item(getString(R.string.downloads),
                DownloadsFragment.newInstance(downloads.getLink())));
    if (Backup.hasBackup())
        ITEMS.add(new DAdapter.Item(getString(R.string.backup), new BackupFragment()));
    if (Buildprop.hasBuildprop() && RootUtils.busyboxInstalled())
        ITEMS.add(new DAdapter.Item(getString(R.string.build_prop_editor), new BuildpropFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.profile), new ProfileFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.recovery), new RecoveryFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.initd), new InitdFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.startup_commands), new StartUpCommandsFragment()));
    ITEMS.add(new DAdapter.Header(getString(R.string.other)));
    ITEMS.add(new DAdapter.Item(getString(R.string.settings), new SettingsFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.faq), new FAQFragment()));
    ITEMS.add(new DAdapter.Item(getString(R.string.about_us), new AboutusFragment()));
}
 
示例3
private void initFragments() {
    mFragments.clear();
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.statistics));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.overall, OverallFragment.class, R.drawable.ic_chart));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.device, DeviceFragment.class, R.drawable.ic_device));
    if (Device.MemInfo.getInstance().getItems().size() > 0) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.memory, MemoryFragment.class, R.drawable.ic_save));
    }
    if (Device.Input.getInstance().supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.inputs, InputsFragment.class, R.drawable.ic_keyboard));
    }
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.kernel));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.cpu, CPUFragment.class, R.drawable.ic_cpu));
    if (Voltage.getInstance().supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.cpu_voltage, CPUVoltageFragment.class, R.drawable.ic_bolt));
    }
    if (Hotplug.supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.cpu_hotplug, CPUHotplugFragment.class, R.drawable.ic_switch));
    }
    if (Thermal.supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.thermal, ThermalFragment.class, R.drawable.ic_temperature));
    }
    if (GPU.supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.gpu, GPUFragment.class, R.drawable.ic_gpu));
    }
    if (Screen.supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.screen, ScreenFragment.class, R.drawable.ic_display));
    }
    if (Wake.supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.wake, WakeFragment.class, R.drawable.ic_unlock));
    }
    if (Sound.getInstance().supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.sound, SoundFragment.class, R.drawable.ic_music));
    }
    if (Battery.getInstance(this).supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.battery, BatteryFragment.class, R.drawable.ic_battery));
    }
    if (LED.getInstance().supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.led, LEDFragment.class, R.drawable.ic_led));
    }
    if (IO.getInstance().supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.io_scheduler, IOFragment.class, R.drawable.ic_sdcard));
    }
    if (KSM.getInstance().supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.ksm, KSMFragment.class, R.drawable.ic_merge));
    }
    if (LMK.supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.lmk, LMKFragment.class, R.drawable.ic_stackoverflow));
    }
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.virtual_memory, VMFragment.class, R.drawable.ic_server));
    if (Entropy.supported()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.entropy, EntropyFragment.class, R.drawable.ic_numbers));
    }
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.misc, MiscFragment.class, R.drawable.ic_clear));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.tools));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.data_sharing, DataSharingFragment.class, R.drawable.ic_database));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.custom_controls, CustomControlsFragment.class, R.drawable.ic_console));

    SupportedDownloads supportedDownloads = new SupportedDownloads(this);
    if (supportedDownloads.getLink() != null) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.downloads, DownloadsFragment.class, R.drawable.ic_download));
    }
    if (Backup.hasBackup()) {
        mFragments.add(new NavigationActivity.NavigationFragment(R.string.backup, BackupFragment.class, R.drawable.ic_restore));
    }
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.build_prop_editor, BuildpropFragment.class, R.drawable.ic_edit));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.profile, ProfileFragment.class, R.drawable.ic_layers));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.recovery, RecoveryFragment.class, R.drawable.ic_security));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.initd, InitdFragment.class, R.drawable.ic_shell));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.on_boot, OnBootFragment.class, R.drawable.ic_start));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.other));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.settings, SettingsFragment.class, R.drawable.ic_settings));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.about, AboutFragment.class, R.drawable.ic_about));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.contributors, ContributorsFragment.class, R.drawable.ic_people));
    mFragments.add(new NavigationActivity.NavigationFragment(R.string.help, HelpFragment.class, R.drawable.ic_help));
}