Show correct process dependency for providers.
Use the new API that allows us to always retrieve the desired provider info. Change-Id: I9265d8f169ee34c87f0ca89315ee78bb2ae49674
This commit is contained in:
@@ -284,20 +284,13 @@ public class RunningServiceDetails extends Activity
|
|||||||
switch (rpi.importanceReasonCode) {
|
switch (rpi.importanceReasonCode) {
|
||||||
case ActivityManager.RunningAppProcessInfo.REASON_PROVIDER_IN_USE:
|
case ActivityManager.RunningAppProcessInfo.REASON_PROVIDER_IN_USE:
|
||||||
textid = R.string.process_provider_in_use_description;
|
textid = R.string.process_provider_in_use_description;
|
||||||
List<ProviderInfo> providers = null;
|
if (rpi.importanceReasonComponent != null) {
|
||||||
if (comp != null) {
|
try {
|
||||||
providers = getPackageManager()
|
ProviderInfo prov = getPackageManager().getProviderInfo(
|
||||||
.queryContentProviders(comp.getPackageName(),
|
rpi.importanceReasonComponent, 0);
|
||||||
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(),
|
label = RunningState.makeLabel(getPackageManager(),
|
||||||
prov.name, prov);
|
prov.name, prov);
|
||||||
break;
|
} catch (NameNotFoundException e) {
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Reference in New Issue
Block a user