/** 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);
    }
  }
  @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());
  }
예제 #3
0
 public static int getBigCore() {
   isBigLITTLE();
   return bigCore == -1 ? 0 : bigCore;
 }
예제 #4
0
 public static int getLITTLEcore() {
   isBigLITTLE();
   return LITTLEcore == -1 ? 0 : LITTLEcore;
 }