Aar

kifcfWiHJH activityManager.getRunningServices(100)^lR iKft&ij-tfJllRfc. 9

W^fllifttf/«!» pid. a-iV^CiiU fcsff»ll4iiiB 16-16 Jfr/ji.

ifitliftservic«

iSfrttTask

«iSfBg iSfrttTask

«iSfBg

it u OiafflOO 3:39

eoeinTosAssbttOt; i&f/fcservicB

iSfjift service pld 2ft*

Ccmp<MVtri!ni(t»<<Ofi modr bi\l<»M v'iOfD

joodra'rf :-.»"!«■»y.»atlit yMtfMftrS* vie«*!

Ktfvrttnc« 01 MiOt K

proccrj com,5<K>g:f |*o<««Vjppp* scivcr.

CtirtipiirwHluit-tiOHi.ijoojjl-'.J'di Mil gOQgk

crKhCcun: 0

icttvcilf*»- * .>1-0/ .-t-v.'.'!» i.»-.JA<t(vKyT me • .)70 01 03 0". 2*708

iMOCni- Miff U*n*ur.

a © 16- 16 Sfr&frteJfcift® A [f] 16-16 jEiEfifitt«*

AMS i6-i6 )'/f>jn*"J W YTHI >»f^T iH:iJ ri<j«hi^x^t/A/r?<jjut^iiri<jv^ (j£s API

•PfiliftW^iR activcSincc ill last Activity Time M^ilR^^ffl» "Jfi&JE- Adnroid fl<J ^ Bugc) 2. ^KIESiliTtfj Task flkjft

«iK^ij'M Task f m & ffl Jj A fl I jjij [ill Wl<J % U. -ttiHfllWfi activity Manager. getRunning Tasks(int maxNum)*iKIRX4J>V:MiHAiisfriKJiT- frifH&Wtt (RunningTasklnfo), i&lfrj^Mff. V-dUt public static String getRunningTasksInfo(Context context) { Str-ngBurfer slnfo - new StringBuffer();

: inal ActivityManager activityKanager = (ActivityManager) context. .getSystemService(Context.ACTIVITY SERVICE);

List<RunningTaskInfo> tasks = activityManager.getRunningTasks(100); 11 e r a t o r < Ru n n i n g T a s k I n f o > 1 = tasks.iterator(); while (l.hasNext()> {

RunningTasklnfo ti (RunningTasklnfo) l.nextO; sInfo.append("id: ").append(ti.id);

slnfo. append ( "Xr.baseActivitv: ") . append (t i . baseAct 1 vity. f lattenToString () ) ; sInfo. append ( "\r numAc*. ivi ties : ") . append (ti . nunriA.ctivities) ; s T nf o. .K.-peri i { "\nnuriiRunr.irig: " ) . append (t i . nun» Run hi ng) ; sinfo.append("\ndescrif tion: ") . append (ti .descripr. ion) ; sInfo, append <"\n\ri") ;

return sTnfq.toString(); J

I-.JkßfW tö >tJ &fiföiitM activityManager.getRunningTasks( 100) h ikikUSLtf:9r W k, f&YK $J&

¿MS 16-17 ^n/Wirm. «KfJLfcil&Bffllft Task f&^JfcinÄtftö««««^-«.. »3ti/a

Kmi mm w&x ® « n F.-äfisi? WÄiifös. Jttfctitf m m mm. m;< & r, nr w im ts® m *

public static String fetch_process_info() { Log.i("fetch_process info", "start "); String result = null; CMDExecute cmdexe new CMDExecute0; try (

String I] args = { "/system/bin/top", "-n", "1" }; result = cmdexe.run(args, "/system/bin/"); } catch (lOException ex) (

Log.i("fetch_process_info", "ex-" + ex.toString()); )

return result; \

H immw:

16-18 ffi /j\" fft yf ifii 11 j vx u Iis» Mtt&^imnimmmm rmm immmmmw^ mmmm'mtm*

0 0

Post a comment