diff options
author | Dianne Hackborn <hackbod@google.com> | 2010-08-30 17:43:05 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2010-08-31 18:59:09 -0700 |
commit | 5774d5d34b2339135feab01b998fcd111ebdde4d (patch) | |
tree | b9b5199e0eb1b08414355d5810299396c8db1e68 | |
parent | 22aa2130fe40952d477a998ba60dea99ada32711 (diff) | |
download | packages_apps_Settings-5774d5d34b2339135feab01b998fcd111ebdde4d.zip packages_apps_Settings-5774d5d34b2339135feab01b998fcd111ebdde4d.tar.gz packages_apps_Settings-5774d5d34b2339135feab01b998fcd111ebdde4d.tar.bz2 |
Show correct process dependency for providers.
Use the new API that allows us to always retrieve the desired
provider info.
Change-Id: I9265d8f169ee34c87f0ca89315ee78bb2ae49674
-rw-r--r-- | src/com/android/settings/applications/RunningServiceDetails.java | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/com/android/settings/applications/RunningServiceDetails.java b/src/com/android/settings/applications/RunningServiceDetails.java index 6346ec2..b8dd10e 100644 --- a/src/com/android/settings/applications/RunningServiceDetails.java +++ b/src/com/android/settings/applications/RunningServiceDetails.java @@ -284,20 +284,13 @@ public class RunningServiceDetails extends Activity switch (rpi.importanceReasonCode) { case ActivityManager.RunningAppProcessInfo.REASON_PROVIDER_IN_USE: textid = R.string.process_provider_in_use_description; - List<ProviderInfo> providers = null; - if (comp != null) { - providers = getPackageManager() - .queryContentProviders(comp.getPackageName(), - rpi.uid, 0); - } - if (providers != null) { - for (int j=0; j<providers.size(); j++) { - ProviderInfo prov = providers.get(j); - if (comp.getClassName().equals(prov.name)) { - label = RunningState.makeLabel(getPackageManager(), - prov.name, prov); - break; - } + if (rpi.importanceReasonComponent != null) { + try { + ProviderInfo prov = getPackageManager().getProviderInfo( + rpi.importanceReasonComponent, 0); + label = RunningState.makeLabel(getPackageManager(), + prov.name, prov); + } catch (NameNotFoundException e) { } } break; |