コード例 #1
0
  @Override
  public void preInit(Bundle savedInstanceState) {
    super.preInit(savedInstanceState);

    fabView.setVisibility(View.GONE);
    fabView = null;

    backgroundView.setVisibility(View.GONE);
    backgroundView = null;

    cpuSpyApp = new CpuSpyApp(CPU.getBigCore());
    if (CPU.isBigLITTLE()) cpuSpyAppLITTLE = new CpuSpyApp(CPU.getLITTLEcore());
  }
コード例 #2
0
  /** Initialize the Fragment */
  @Override
  public void init(Bundle savedInstanceState) {
    super.init(savedInstanceState);

    if (CPU.isBigLITTLE()) {
      DDividerCard bigDivider = new DDividerCard();
      bigDivider.setText(getString(R.string.big).toLowerCase());
      addView(bigDivider);
    }

    uptimeCard = new CardViewItem.DCardView();
    uptimeCard.setTitle(getString(R.string.uptime));
    addView(uptimeCard);

    additionalCard = new CardViewItem.DCardView();
    additionalCard.setTitle(getString(R.string.unused_cpu_states));
    addView(additionalCard);

    uiStatesView = new LinearLayout(getActivity());
    uiStatesView.setOrientation(LinearLayout.VERTICAL);
    frequencyCard = new CardViewItem.DCardView();
    frequencyCard.setTitle(getString(R.string.frequency_table));
    frequencyCard.setView(uiStatesView);
    frequencyCard.setFullSpan(true);
    addView(frequencyCard);

    if (CPU.isBigLITTLE()) {
      DDividerCard LITTLEDivider = new DDividerCard();
      LITTLEDivider.setText(getString(R.string.little));
      addView(LITTLEDivider);

      uptimeCardLITTLE = new CardViewItem.DCardView();
      uptimeCardLITTLE.setTitle(getString(R.string.uptime));
      addView(uptimeCardLITTLE);

      additionalCardLITTLE = new CardViewItem.DCardView();
      additionalCardLITTLE.setTitle(getString(R.string.unused_cpu_states));
      addView(additionalCardLITTLE);

      uiStatesViewLITTLE = new LinearLayout(getActivity());
      uiStatesViewLITTLE.setOrientation(LinearLayout.VERTICAL);
      frequencyCardLITTLE = new CardViewItem.DCardView();
      frequencyCardLITTLE.setTitle(getString(R.string.frequency_table));
      frequencyCardLITTLE.setView(uiStatesViewLITTLE);
      frequencyCardLITTLE.setFullSpan(true);
      addView(frequencyCardLITTLE);
    }
  }
コード例 #3
0
ファイル: CPU.java プロジェクト: Fechinator/KernelAdiutor
 public static List<Integer> getCpuBootInputFreq() {
   List<Integer> list = new ArrayList<>();
   String value = Utils.readFile(CPU_BOOST_INPUT_BOOST_FREQ);
   for (String core : value.split(" ")) {
     if (core.contains(":")) core = core.split(":")[1];
     if (core.equals("0")) list.add(0);
     else list.add(CPU.getFreqs().indexOf(Utils.stringToInt(core)) + 1);
   }
   return list;
 }
コード例 #4
0
ファイル: Control.java プロジェクト: giveme13s/KernelAdiutor
 public static void bringCoresOnline() {
   try {
     for (int i = 0; i < CPU.getCoreCount(); i++)
       RootUtils.runCommand("echo 1 > " + String.format(CPU_CORE_ONLINE, i));
     // Give CPU some time to bring core online
     Thread.sleep(10);
   } catch (InterruptedException e) {
     e.printStackTrace();
   }
 }
コード例 #5
0
ファイル: CPU.java プロジェクト: Fechinator/KernelAdiutor
 public static int getCpuBootSyncThreshold() {
   String value = Utils.readFile(CPU_BOOST_SYNC_THRESHOLD);
   if (value.equals("0")) return 0;
   return CPU.getFreqs().indexOf(Utils.stringToInt(value)) + 1;
 }