Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11e237e6 authored by Rakesh Iyer's avatar Rakesh Iyer
Browse files

Fix issue with app launch from CarNavigationBar.

Seems like mCurrentPackage name can get stale and the optimization
to cache is isn't all that needed so remove it in the name of app
launch reliability.

Bug: 27505472
Change-Id: I641284c1392f8ff1f392f8dbf2c31177a64b4326
parent d1a766e8
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@ class CarNavigationBarController {
    private List<CarNavigationButton> mNavButtons = new ArrayList<CarNavigationButton>();

    private int mCurrentFacetIndex;
    private String mCurrentPackageName;
    private SparseBooleanArray mFacetHasMultipleAppsCache = new SparseBooleanArray();

    public CarNavigationBarController(Context context,
@@ -84,7 +83,6 @@ class CarNavigationBarController {
    }

    public void taskChanged(String packageName) {
        mCurrentPackageName = packageName;
        // If the package name belongs to a filter, then highlight appropriate button in
        // the navigation bar.
        if (mFacetPackageMap.containsKey(packageName)) {
@@ -298,12 +296,6 @@ class CarNavigationBarController {
            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_PACKAGES, mFacetPackages.get(index));
        // The facet is identified by the index in which it was added to the nav bar.