Rm ttuftjfe tr mkmv nm

case 0:

intent.setClass (eoelnfosAssistant.this, Systern.class) ;

startActi vity(intent);

break;

fff/f<o

System.java 'I'^J^ij'iftKKiffl F:

private List<Map<String,Gbject»buildListForSimpleAdapter () f List.<Map<String, Object» list new ArrayList<Map< String, Object>>(3); // it±—I^Hash Map

Map<St ring, Object> map = new HashMap<St.ring, 0bject>(); map = new HashMap<String, Object>(); map.put ("id", PreferencesUt.i1.VER INFO); map. put ("name", " Hkitt&H&fc") ; map. put ( "desc", "$)&/proc/version tlJgL") ; list.add(map);

map - new HashMap<String, Object>(); map. put ( "id", PreferencesUt.il. SystemProperty) ;

map. put ("desc", "&. " ) ;

// map.put("icon", R.drawable.mem); list.add(map);

map new HashMap<String, Objejct>(); map. put ("id", Preterence3'Jtil. TEL STATUS) ;

map.put ("name", "isfiSfaS") ; map. put ("desc", "^HAl^t&ftiet5 f8iit&. " ) ; list.add(map);

return list; )

i.mm -re. ^m^^mim-m-mmmmo ajSff-kiERUt'l'W -fM, ftiMrftu FMiW:

(¿Override public void onltemClick(AdapterView<?> parent. View v, int position, long id) I Intent intent new Intent();

Log.i(TAG, "item clicked! [" ♦ position + "]"); Bundle info ~ new Bundle();

Map<String, Object> map - list.get(position); info.putlnt("id", (Integer) map.get("id")); info.putString("name", (String) map.get("name")); info.putString("desc", (String) map.get("desc")); info.putlnt("position", position);

intent.putExtra("android.intent.extra.info", info); intent.setClass(System.1 his, Showlnfo.class); start.ActivityForResult (intent, 0) ; )

X immft:

^ kiiiHWJuJ ttfiil1,. Bundle MU&imm K j, r •trt.Wju^iD, m^nmiQm^To m- -Kit-M^i^ii^Bw^ifii showinfo^

private void revParamsO I Log.i(TAG, "revParams."); Intent start, inglntent - get Intent () ; if (startinglntent != null) ( Bundle infod = startingIntent .getBundleExt ra("android.intent.extra.info"); if (infod == null) { is valid = false; } else ( id - infod.getInt("id"); name = infed.getSt r i ng("name"); _position - infod.getlnt ("position*') ; is valid = true; \

Log. i (TAG, " name:" + name f ", id="*- id); }

<?xml version=" 1. 0" encoding="utf-8"?>

<ScrollView xmins:android-"htLp://schemas.android.com/apk/res/android" android:layout_width-"fill parent" android:1ayouL height^"wrap content"> <LinearLayout xmlns : android="http: / /schemas . android.com/apk/res/android" android:ori,entation="vertical" android:layout width-"fill_parent" android:layout height="fi11 parent"

android:padding="20px"

<TextView android:id="@+id/title" android:layout width-"fill parent" android: layout._height ="wrap_ content" android: text Si 7.e="20sp" andro id:pa dd1ng3o11 om="8d ip" android:text="" /> <TextView android:id^"@+id/info" android:layout width="fill_parent" android:layout height="wrap_content" android:text="" /> </LinearLayout> </ScrolIView>

I .¿£{^£$<1 T ^JE^ff- A. ft ft W«ffl /j-rUti S/jiff- xW .

►Y'-flilS 16-3 "m. WJ&frJf tfr fulfil. JtjtfrtEWJa

Showlnfo.java MJ&'KH&ft/proc/version 'I'fl.

Aujffttii-if+i&mw CMDExecute mcat public static String fetch_version_info() ( String result = null;

CMDExecute cmdexe = new CMDExecute(); try {

Stringf] args = { "/system/bin/cat", "/proc/version" ); result - cmdexe.run(args, "/system/bin/"}; ) catch (lOException ex) {

ex.printStackTrace(); }

return result; }

I • lii ft Pi ffi )IJ ffij Ifil ft ®J ffl CMDExecute £ , ifl JfJ % tit M ""/system/bin/cat" l-M-. "/proc/version" Kjfiii*iKinH 16-4 rr^o

Mm i6-4 fi^wac^iiSinfWiSH,

Linux version 2.6.25-018430-glea26b0o A gg 16_4

-irttix ' ^ (» 25-01843 g'-^A'." ' ■ .t,V<vw2? «X|i v • .-.'ic M>'W

% 16 M Android S^SgflJE-

2. %mt.t m.m%M MSS -.^m. & Android WElMUKrjfWGlWU

ittyiiJWj Jj'tti System.getProperty (propertyStr), iWm&itWfJ^ISHai: (user.home) iftffl&uiW, private static String initProperty(String description, String propertyStr) {

buffer = new StringBuffer();

0 0

Post a comment