Merge "ReolverActivity: try auto launching single choice" into nyc-mr2-dev
am: daacf547ac
Change-Id: I06ca33714f6227f8cf86ecce29e1b87df80add6b
This commit is contained in:
@@ -124,6 +124,13 @@ public class ResolverActivity extends Activity {
|
|||||||
bindProfileView();
|
bindProfileView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onPackageChanged(String packageName, int uid, String[] components) {
|
||||||
|
// We care about all package changes, not just the whole package itself which is
|
||||||
|
// default behavior.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1502,7 +1509,15 @@ public class ResolverActivity extends Activity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onListRebuilt() {
|
public void onListRebuilt() {
|
||||||
// This space for rent
|
int count = getUnfilteredCount();
|
||||||
|
if (count == 1 && getOtherProfile() == null) {
|
||||||
|
// Only one target, so we're a candidate to auto-launch!
|
||||||
|
final TargetInfo target = targetInfoForPosition(0, false);
|
||||||
|
if (shouldAutoLaunchSingleChoice(target)) {
|
||||||
|
safelyStartActivity(target);
|
||||||
|
finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean shouldGetResolvedFilter() {
|
public boolean shouldGetResolvedFilter() {
|
||||||
|
|||||||
Reference in New Issue
Block a user