Skip to content

Commit

Permalink
Fix crashed on 'up' caused by not checking intent.getAction()
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenwardy committed Feb 8, 2017
1 parent 81aa3c6 commit 54226b6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ protected void onCreate(Bundle savedInstanceState) {
// Read opening intent
//
Intent intent = getIntent();
if (intent.getAction().equals("com.google.android.gms.actions.SEARCH_ACTION") ||
intent.getAction().equals(ACTION_SEARCH)) {
String action = intent.getAction();
if (action != null && (action.equals("com.google.android.gms.actions.SEARCH_ACTION") ||
intent.getAction().equals(ACTION_SEARCH))) {
search_filter = intent.getExtras().getString(PARAM_QUERY);
} else {
Log.e("MAct", "Intent was " + intent.getAction());
Expand Down

0 comments on commit 54226b6

Please sign in to comment.