private void ps() { String as[] = NativeRunner.runIt("ps").split("\n"); processList.clear(); int i = as.length; int j = 0; do { if (j >= i) return; String s = as[j]; NativeProcess nativeprocess = new NativeProcess(mContext, s, true); if (nativeprocess.valid) processList.add(nativeprocess); j++; } while (true); }
private void top() { String s = NativeRunner.runIt("top -n 1"); if (s != null) { String as[] = s.split("\n"); processList.clear(); int i = as.length; int j = 0; while (j < i) { String s1 = as[j]; NativeProcess nativeprocess = new NativeProcess(mContext, s1, false); if (nativeprocess.valid) processList.add(nativeprocess); j++; } } }