Merge "Don\'t query ChooserTargetService apps that haven\'t been used recently" into mnc-dr-dev am: b8cfc12c3f
am: 8c7b3e872b
* commit '8c7b3e872b28fa466cd1c0e314771871a15104ad':
Don't query ChooserTargetService apps that haven't been used recently
This commit is contained in:
@@ -373,6 +373,11 @@ public class ChooserActivity extends ResolverActivity {
|
||||
int targetsToQuery = 0;
|
||||
for (int i = 0, N = adapter.getDisplayResolveInfoCount(); i < N; i++) {
|
||||
final DisplayResolveInfo dri = adapter.getDisplayResolveInfo(i);
|
||||
if (adapter.getScore(dri) == 0) {
|
||||
// A score of 0 means the app hasn't been used in some time;
|
||||
// don't query it as it's not likely to be relevant.
|
||||
continue;
|
||||
}
|
||||
final ActivityInfo ai = dri.getResolveInfo().activityInfo;
|
||||
final Bundle md = ai.metaData;
|
||||
final String serviceName = md != null ? convertServiceName(ai.packageName,
|
||||
|
||||
Reference in New Issue
Block a user