summaryrefslogtreecommitdiffstats
path: root/apps/Development/src/com/android
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-09-10 14:43:16 -0700
committerDianne Hackborn <hackbod@google.com>2012-09-10 14:43:16 -0700
commitd0689c0328f2aabf9954face86e1e574fbdd8864 (patch)
treef60eca485c10981dff5527f06b83d94a6d68f1b3 /apps/Development/src/com/android
parentbd783a0e87ea6c9d56e24c313e251d993bf04d3c (diff)
downloadandroid_development-d0689c0328f2aabf9954face86e1e574fbdd8864.tar.gz
android_development-d0689c0328f2aabf9954face86e1e574fbdd8864.tar.bz2
android_development-d0689c0328f2aabf9954face86e1e574fbdd8864.zip
Remove use of private API.
Change-Id: I6c1e586af108cb1d94120295181d89c5050f5bc2
Diffstat (limited to 'apps/Development/src/com/android')
-rw-r--r--apps/Development/src/com/android/development/PackageSummary.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/apps/Development/src/com/android/development/PackageSummary.java b/apps/Development/src/com/android/development/PackageSummary.java
index d621d4e67..452f4d700 100644
--- a/apps/Development/src/com/android/development/PackageSummary.java
+++ b/apps/Development/src/com/android/development/PackageSummary.java
@@ -17,7 +17,7 @@
package com.android.development;
import android.app.Activity;
-import android.app.ActivityManagerNative;
+import android.app.ActivityManager;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -30,7 +30,6 @@ import android.content.pm.ProviderInfo;
import android.content.pm.ServiceInfo;
import android.net.Uri;
import android.os.Bundle;
-import android.os.RemoteException;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
@@ -39,7 +38,6 @@ import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
-
public class PackageSummary extends Activity {
String mPackageName;
@@ -151,10 +149,9 @@ public class PackageSummary extends Activity {
mRestart.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
- try {
- ActivityManagerNative.getDefault().killBackgroundProcesses(mPackageName);
- } catch (RemoteException e) {
- }
+ ActivityManager am = (ActivityManager)getSystemService(
+ Context.ACTIVITY_SERVICE);
+ am.killBackgroundProcesses(mPackageName);
}
});