1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-06 12:00:17 +02:00

fixed book opening

This commit is contained in:
Nikolay Pultsin 2013-02-03 13:05:09 +00:00
parent 94f6887476
commit 711a98c8df

View file

@ -270,10 +270,18 @@ public final class FBReader extends Activity {
if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) { if ((intent.getFlags() & Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY) != 0) {
super.onNewIntent(intent); super.onNewIntent(intent);
} else if (Intent.ACTION_VIEW.equals(action) || ACTION_OPEN_BOOK.equals(action)) { } else if (Intent.ACTION_VIEW.equals(action) || ACTION_OPEN_BOOK.equals(action)) {
openBook(intent, null, true); getCollection().bindToService(this, new Runnable() {
public void run() {
openBook(intent, null, true);
}
});
} else if (Intent.ACTION_VIEW.equals(action) } else if (Intent.ACTION_VIEW.equals(action)
&& data != null && "fbreader-action".equals(data.getScheme())) { && data != null && "fbreader-action".equals(data.getScheme())) {
myFBReaderApp.runAction(data.getEncodedSchemeSpecificPart(), data.getFragment()); getCollection().bindToService(this, new Runnable() {
public void run() {
myFBReaderApp.runAction(data.getEncodedSchemeSpecificPart(), data.getFragment());
}
});
} else if (Intent.ACTION_SEARCH.equals(action)) { } else if (Intent.ACTION_SEARCH.equals(action)) {
final String pattern = intent.getStringExtra(SearchManager.QUERY); final String pattern = intent.getStringExtra(SearchManager.QUERY);
final Runnable runnable = new Runnable() { final Runnable runnable = new Runnable() {