@Override protected void onCreate(Bundle savedInstanceState) { if (PrivacyService.checkClient()) { // Set theme int userId = Util.getUserId(Process.myUid()); String themeName = PrivacyManager.getSetting(userId, PrivacyManager.cSettingTheme, ""); mThemeId = (themeName.equals("Dark") ? R.style.CustomTheme : R.style.CustomTheme_Light); setTheme(mThemeId); super.onCreate(savedInstanceState); } else { super.onCreate(savedInstanceState); // Privacy client now available setContentView(R.layout.reboot); try { PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0); TextView tvVersion = (TextView) findViewById(R.id.tvVersion); tvVersion.setText(pInfo.versionName); } catch (Throwable ex) { Util.bug(null, ex); } // Show reason if (PrivacyService.getClient() == null) { TextView tvRebootClient = (TextView) findViewById(R.id.tvRebootClient); tvRebootClient.setVisibility(View.VISIBLE); Requirements.checkCompatibility(this); } else { TextView tvRebootClient = (TextView) findViewById(R.id.tvRebootVersion); tvRebootClient.setVisibility(View.VISIBLE); Requirements.check(this); } } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (PrivacyService.checkClient()) { // Set theme String themeName = PrivacyManager.getSetting(0, PrivacyManager.cSettingTheme, "", false); mThemeId = (themeName.equals("Dark") ? R.style.CustomTheme : R.style.CustomTheme_Light); setTheme(mThemeId); } else { // Privacy client now available setContentView(R.layout.reboot); if (PrivacyService.getClient() == null) { TextView tvRebootClient = (TextView) findViewById(R.id.tvRebootClient); tvRebootClient.setVisibility(View.VISIBLE); } else { TextView tvRebootClient = (TextView) findViewById(R.id.tvRebootVersion); tvRebootClient.setVisibility(View.VISIBLE); Requirements.check(this); } } }