diff options
| author | Dianne Hackborn <hackbod@google.com> | 2012-09-10 14:43:16 -0700 |
|---|---|---|
| committer | Dianne Hackborn <hackbod@google.com> | 2012-09-10 14:43:16 -0700 |
| commit | d0689c0328f2aabf9954face86e1e574fbdd8864 (patch) | |
| tree | f60eca485c10981dff5527f06b83d94a6d68f1b3 /apps/Development/src/com/android/development | |
| parent | bd783a0e87ea6c9d56e24c313e251d993bf04d3c (diff) | |
| download | android_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/development')
| -rw-r--r-- | apps/Development/src/com/android/development/PackageSummary.java | 11 |
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); } }); |
