Merge "Fix issue with app launch from CarNavigationBar." into nyc-dev
This commit is contained in:
@@ -71,7 +71,6 @@ class CarNavigationBarController {
|
|||||||
private List<CarNavigationButton> mNavButtons = new ArrayList<CarNavigationButton>();
|
private List<CarNavigationButton> mNavButtons = new ArrayList<CarNavigationButton>();
|
||||||
|
|
||||||
private int mCurrentFacetIndex;
|
private int mCurrentFacetIndex;
|
||||||
private String mCurrentPackageName;
|
|
||||||
private SparseBooleanArray mFacetHasMultipleAppsCache = new SparseBooleanArray();
|
private SparseBooleanArray mFacetHasMultipleAppsCache = new SparseBooleanArray();
|
||||||
|
|
||||||
public CarNavigationBarController(Context context,
|
public CarNavigationBarController(Context context,
|
||||||
@@ -84,7 +83,6 @@ class CarNavigationBarController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void taskChanged(String packageName) {
|
public void taskChanged(String packageName) {
|
||||||
mCurrentPackageName = packageName;
|
|
||||||
// If the package name belongs to a filter, then highlight appropriate button in
|
// If the package name belongs to a filter, then highlight appropriate button in
|
||||||
// the navigation bar.
|
// the navigation bar.
|
||||||
if (mFacetPackageMap.containsKey(packageName)) {
|
if (mFacetPackageMap.containsKey(packageName)) {
|
||||||
@@ -298,12 +296,6 @@ class CarNavigationBarController {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't launch the lens picker if it's already running and the
|
|
||||||
// user clicks the same facet
|
|
||||||
if (packageName.equals(mCurrentPackageName) && index == mCurrentFacetIndex) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
intent.putExtra(EXTRA_FACET_CATEGORIES, mFacetCategories.get(index));
|
intent.putExtra(EXTRA_FACET_CATEGORIES, mFacetCategories.get(index));
|
||||||
intent.putExtra(EXTRA_FACET_PACKAGES, mFacetPackages.get(index));
|
intent.putExtra(EXTRA_FACET_PACKAGES, mFacetPackages.get(index));
|
||||||
// The facet is identified by the index in which it was added to the nav bar.
|
// The facet is identified by the index in which it was added to the nav bar.
|
||||||
|
|||||||
Reference in New Issue
Block a user