From e943f2fd8e7623ba3ea12bb65294d30446db4174 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Wed, 17 Dec 2008 18:04:04 -0800 Subject: Code drop from //branches/cupcake/...@124589 --- .../src/com/android/development/ProcessInfo.java | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 apps/Development/src/com/android/development/ProcessInfo.java (limited to 'apps/Development/src/com/android/development/ProcessInfo.java') 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(); + } +} + -- cgit v1.2.3