So I have a default searchable Activity in my app, and if I press the search button in simples activities it works. But when I’m in a tab where the content is an ActivityGroup, and not an Activity, the app crashes.
08-19 17:18:23.438: ERROR/AndroidRuntime(9078): Uncaught handler: thread main exiting due to uncaught exception
08-19 17:18:23.458: ERROR/AndroidRuntime(9078): java.lang.IllegalArgumentException: no ident
08-19 17:18:23.458: ERROR/AndroidRuntime(9078): at android.app.Activity.ensureSearchManager(Activity.java:3499)
08-19 17:18:23.458: ERROR/AndroidRuntime(9078): at android.app.Activity.startSearch(Activity.java:2648)
08-19 17:18:23.458: ERROR/AndroidRuntime(9078): at android.app.Activity.onSearchRequested(Activity.java:2612)
...
Even if I add this code in my activityGroup, I’m still crashing :
@Override
public boolean onSearchRequested() {return false;}
Ok sorry that I didn’t answer sooner.
So yes, the problem is resolved, and I think that it came from the ActivityGroup, where the onSearchRequested() wasn’t overrided, but took the event anyway.
So the solution was this :
The mLocalActivityManager is the LocalActivityManager that starts the different activities…
Then you have to override the onSearchRequested() in each Activity that is displayaed in the group, and eventually just return false there, if you don’t want the search dialog.