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

Commit fd77582d authored by Raj Yengisetty's avatar Raj Yengisetty Committed by Steve Kondik
Browse files

Fix launcher shortcuts

Change-Id: I239088c4dbac612f5bcd22d160b461caded59801
parent de19841a
Loading
Loading
Loading
Loading
+17 −2
Original line number Diff line number Diff line
@@ -320,6 +320,8 @@ public class MainActivity extends ActionBarActivity
                }
            }, this);
        }

        handleNavigateIntent(getIntent());
    }

    /**
@@ -364,7 +366,7 @@ public class MainActivity extends ActionBarActivity
                .replace(R.id.navigation_fragment_container, currentFragment, fragmentTag)
                .setTransition(FragmentTransaction.TRANSIT_FRAGMENT_FADE)
                .addToBackStack(fragmentTag)
                .commit();
                .commitAllowingStateLoss();
    }

    private void updateCurrentFragment() {
@@ -404,8 +406,21 @@ public class MainActivity extends ActionBarActivity
     */
    @Override
    protected void onNewIntent(Intent intent) {
        if (!handleNavigateIntent(intent)) {
            handleSearchIntent(intent);
        }
    }

    private boolean handleNavigateIntent(Intent intent) {
        if (intent != null) {
            String path = intent.getStringExtra(EXTRA_NAVIGATE_TO);
            if (!TextUtils.isEmpty(path)) {
                navigateToPath(path);
                return true;
            }
        }
        return false;
    }

    public void handleSearchIntent(Intent intent) {
        if (Intent.ACTION_SEARCH.equals(intent.getAction())) {