Intent service = new Intent(context, com.android.server.LoadAverageService.class);
ContentResolver res = context.getContentResolver();
boolean shown = Settings.System.getInt(
res, Settings.System.SHOW_PROCESSES, 0) != 0;
if (shown) {
context.startService(service);
}