Skip to content
This repository has been archived by the owner on May 24, 2022. It is now read-only.

Commit

Permalink
Merge pull request #163 from benetech/FBR-387--fix-auto-play-when-pau…
Browse files Browse the repository at this point in the history
…sed-

FBR 387  fix auto play when paused
  • Loading branch information
nimbooce committed Nov 12, 2015
2 parents 90bb207 + 0b38b0b commit 5d21c2a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion FBReader/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.benetech.android"
android:versionCode="34"
android:versionCode="35"
android:versionName="4.1.0.20150828"
android:installLocation="auto">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,13 @@ public boolean onKeyDown(int keyCode, KeyEvent event) {
return super.onKeyDown(keyCode, event);
}

@Override
protected void preDeleteBookWork() {
super.preDeleteBookWork();
stopTalking();
myApi.clearHighlighting();
}

private class ScreenUnlockReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ private void addCurrentOpenBookToFavorites() {

private void deleteCurrentBook() {
FBReaderApp fbReader = (FBReaderApp) FBReaderApp.Instance();
FBReaderApp.Instance().onWindowClosing();
preDeleteBookWork();
Book currentOpenBook = fbReader.Model.Book;
if (currentOpenBook.File.getShortName().equals(FBReader.MINI_HELP_FILE_NAME)) {
Toast.makeText(
Expand Down Expand Up @@ -213,6 +215,9 @@ public void onClick(DialogInterface dialog, int which) {
}
}

protected void preDeleteBookWork() {
}

private class ActionBarDrawerToggleHandler extends ActionBarDrawerToggle{

public ActionBarDrawerToggleHandler(ZLAndroidActivityWithNavigationDrawer zlAndroidActivityWithActionBar, DrawerLayout mDrawerLayout, int drawer_open, int drawer_close) {
Expand Down
4 changes: 2 additions & 2 deletions FBReader/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,8 @@
<string name="subscription_chk_box">Subscribe to this periodical</string>
<string name="subscribe_chkbox_description">(Automatically download the latest issue)</string>

<string name="drawer_open">Open</string>
<string name="drawer_close">Close</string>
<string name="drawer_open">Open drawer menu</string>
<string name="drawer_close">Close drawer menu</string>
<string name="menu_item_add_to_favorites">Add to favorites</string>
<string name="menu_item_content_description_add_to_favorites">Add current open book to favorites</string>
<string name="menu_item_delete_book">Delete Book</string>
Expand Down

0 comments on commit 5d21c2a

Please sign in to comment.