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

Merge branch 'master' into ice-cream-sandwich

Conflicts:
	src/org/geometerplus/android/fbreader/library/LibraryActivity.java
This commit is contained in:
Nikolay Pultsin 2015-01-15 19:11:18 +00:00
commit 87ce04d49a

View file

@ -24,6 +24,7 @@ import java.util.*;
import android.app.AlertDialog;
import android.app.SearchManager;
import android.content.*;
import android.os.Build;
import android.os.Bundle;
import android.view.*;
import android.widget.AdapterView;
@ -282,8 +283,6 @@ public class LibraryActivity extends TreeActivity<LibraryTree> implements MenuIt
// Options menu
//
private Boolean myIsExternalViewSupported = null;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
super.onCreateOptionsMenu(menu);
@ -292,15 +291,7 @@ public class LibraryActivity extends TreeActivity<LibraryTree> implements MenuIt
addMenuItem(menu, OptionsItemId.UploadAgain, "uploadAgain", -1, true);
addMenuItem(menu, OptionsItemId.TryAgain, "tryAgain", -1, true);
addMenuItem(menu, OptionsItemId.DeleteAll, "deleteAll", -1, true);
if (myIsExternalViewSupported == null) {
final Intent externalIntent = new Intent(FBReaderIntents.Action.EXTERNAL_LIBRARY);
myIsExternalViewSupported = PackageUtil.canBeStarted(this, externalIntent, true);
}
if (myIsExternalViewSupported) {
addMenuItem(menu, OptionsItemId.ExternalView, "bookshelfView", -1, false);
}
addMenuItem(menu, OptionsItemId.ExternalView, "bookshelfView", -1, false);
return true;
}
@ -378,12 +369,11 @@ public class LibraryActivity extends TreeActivity<LibraryTree> implements MenuIt
}
case OptionsItemId.ExternalView:
{
final Intent externalIntent = new Intent(FBReaderIntents.Action.EXTERNAL_LIBRARY);
try {
startActivity(externalIntent);
startActivity(new Intent(FBReaderIntents.Action.EXTERNAL_LIBRARY));
finish();
} catch (ActivityNotFoundException e) {
// ignore
PackageUtil.installFromMarket(this, "org.fbreader.plugin.library");
}
return true;
}