diff options
| author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:04:04 -0800 |
|---|---|---|
| committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:04:04 -0800 |
| commit | e943f2fd8e7623ba3ea12bb65294d30446db4174 (patch) | |
| tree | eda2f24648d61fb33f3fa754d9fb4b5693517e0c /apps/Development/src/com/android/development/ProcessInfo.java | |
| parent | 5c11852110eeb03dc5a69111354b383f98d15336 (diff) | |
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'apps/Development/src/com/android/development/ProcessInfo.java')
| -rwxr-xr-x | apps/Development/src/com/android/development/ProcessInfo.java | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/apps/Development/src/com/android/development/ProcessInfo.java b/apps/Development/src/com/android/development/ProcessInfo.java new file mode 100755 index 000000000..5ece1a446 --- /dev/null +++ b/apps/Development/src/com/android/development/ProcessInfo.java @@ -0,0 +1,62 @@ +/* +** +** Copyright 2006, The Android Open Source Project +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +package com.android.development; + +import android.app.Activity; +import android.content.Intent; +import android.content.pm.PackageManager; +import android.os.Bundle; +import android.widget.LinearLayout; +import android.widget.TextView; + +public class ProcessInfo extends Activity { + PackageManager mPm; + + @Override + protected void onCreate(Bundle icicle) { + super.onCreate(icicle); + Intent intent = getIntent(); + String processName = intent.getStringExtra("processName"); + String pkgList[] = intent.getStringArrayExtra("packageList"); + mPm = getPackageManager(); + setContentView(R.layout.process_info); + TextView processNameView = (TextView) findViewById(R.id.process_name); + LinearLayout pkgListView = (LinearLayout) findViewById(R.id.package_list); + if(processName != null) { + processNameView.setText(processName); + } + if(pkgList != null) { + for(String pkg : pkgList) { + TextView pkgView = new TextView(this); + pkgView.setText(pkg); + pkgListView.addView(pkgView); + } + } + } + + @Override + protected void onResume() { + super.onResume(); + } + + @Override + protected void onStop() { + super.onStop(); + } +} + |
