mirror of
				https://github.com/MinimalBible/MinimalBible-Legacy
				synced 2025-11-04 02:10:30 -05:00 
			
		
		
		
	Lint fixes
This commit is contained in:
		@ -1,7 +1,5 @@
 | 
			
		||||
package org.bspeice.minimalbible.activities;
 | 
			
		||||
 | 
			
		||||
import org.bspeice.minimalbible.R;
 | 
			
		||||
 | 
			
		||||
import android.app.Activity;
 | 
			
		||||
import android.content.SharedPreferences;
 | 
			
		||||
import android.content.res.Configuration;
 | 
			
		||||
@ -14,19 +12,16 @@ import android.support.v4.view.GravityCompat;
 | 
			
		||||
import android.support.v4.widget.DrawerLayout;
 | 
			
		||||
import android.support.v7.app.ActionBar;
 | 
			
		||||
import android.support.v7.app.ActionBarActivity;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.Menu;
 | 
			
		||||
import android.view.MenuInflater;
 | 
			
		||||
import android.view.MenuItem;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.AdapterView;
 | 
			
		||||
import android.widget.ArrayAdapter;
 | 
			
		||||
import android.widget.ListView;
 | 
			
		||||
import android.widget.Toast;
 | 
			
		||||
 | 
			
		||||
import com.readystatesoftware.systembartint.SystemBarTintManager;
 | 
			
		||||
 | 
			
		||||
import org.bspeice.minimalbible.R;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Fragment used for managing interactions for and presentation of a navigation
 | 
			
		||||
 * drawer. See the <a href=
 | 
			
		||||
 | 
			
		||||
@ -7,11 +7,6 @@ import org.bspeice.minimalbible.activities.downloader.manager.BookRefreshTask;
 | 
			
		||||
import org.bspeice.minimalbible.activities.downloader.manager.DownloadManager;
 | 
			
		||||
import org.bspeice.minimalbible.activities.downloader.manager.InstalledManager;
 | 
			
		||||
import org.bspeice.minimalbible.activities.downloader.manager.RefreshManager;
 | 
			
		||||
import org.crosswire.common.progress.JobManager;
 | 
			
		||||
 | 
			
		||||
import java.sql.Ref;
 | 
			
		||||
 | 
			
		||||
import javax.inject.Singleton;
 | 
			
		||||
 | 
			
		||||
import dagger.Module;
 | 
			
		||||
import dagger.Provides;
 | 
			
		||||
 | 
			
		||||
@ -1,6 +1,5 @@
 | 
			
		||||
package org.bspeice.minimalbible.activities.downloader;
 | 
			
		||||
 | 
			
		||||
import android.annotation.SuppressLint;
 | 
			
		||||
import android.view.View;
 | 
			
		||||
import android.widget.ImageButton;
 | 
			
		||||
import android.widget.RelativeLayout;
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,7 @@ package org.bspeice.minimalbible.activities.downloader;
 | 
			
		||||
import de.devland.esperandro.annotations.SharedPreferences;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Created by bspeice on 5/19/14.
 | 
			
		||||
 * SharedPreferences interface to be built by Esperandro
 | 
			
		||||
 */
 | 
			
		||||
@SharedPreferences(name="DownloadPrefs")
 | 
			
		||||
public interface DownloadPrefs {
 | 
			
		||||
 | 
			
		||||
@ -86,7 +86,7 @@ public class BookDownloadManager implements WorkListener, BooksListener {
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Check the status of a book download in progress.
 | 
			
		||||
     * @param b
 | 
			
		||||
     * @param b The book to get the current progress of
 | 
			
		||||
     * @return The most recent DownloadProgressEvent for the book, or null if not downloading
 | 
			
		||||
     */
 | 
			
		||||
    public DLProgressEvent getInProgressDownloadProgress(Book b) {
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,6 @@ package org.bspeice.minimalbible.activities.downloader.manager;
 | 
			
		||||
import android.util.Log;
 | 
			
		||||
 | 
			
		||||
import org.bspeice.minimalbible.MinimalBible;
 | 
			
		||||
import org.crosswire.common.progress.JobManager;
 | 
			
		||||
import org.crosswire.jsword.book.Book;
 | 
			
		||||
import org.crosswire.jsword.book.install.InstallException;
 | 
			
		||||
import org.crosswire.jsword.book.install.Installer;
 | 
			
		||||
@ -11,8 +10,9 @@ import org.crosswire.jsword.book.install.Installer;
 | 
			
		||||
import javax.inject.Inject;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Created by bspeice on 5/12/14.
 | 
			
		||||
 * Thread that handles downloading a book
 | 
			
		||||
 */
 | 
			
		||||
//TODO: Refactor to BookDownloadManager, downloadBook() creates its own thread
 | 
			
		||||
public class BookDownloadThread {
 | 
			
		||||
 | 
			
		||||
    private final String TAG = "BookDownloadThread";
 | 
			
		||||
@ -51,8 +51,8 @@ public class BookDownloadThread {
 | 
			
		||||
     * Build what the installer creates the job name as.
 | 
			
		||||
     * Likely prone to be brittle.
 | 
			
		||||
     * TODO: Make sure to test that this is an accurate job name
 | 
			
		||||
     * @param b
 | 
			
		||||
     * @return
 | 
			
		||||
     * @param b The book to predict the download job name of
 | 
			
		||||
     * @return The name of the job that will/is download/ing this book
 | 
			
		||||
     */
 | 
			
		||||
    public static String getJobId(Book b) {
 | 
			
		||||
        return "INSTALL_BOOK-" + b.getInitials();
 | 
			
		||||
 | 
			
		||||
@ -3,18 +3,12 @@ package org.bspeice.minimalbible.activities.downloader.manager;
 | 
			
		||||
import android.util.Log;
 | 
			
		||||
 | 
			
		||||
import org.bspeice.minimalbible.MinimalBible;
 | 
			
		||||
import org.crosswire.jsword.book.Book;
 | 
			
		||||
import org.crosswire.jsword.book.BookCategory;
 | 
			
		||||
import org.crosswire.jsword.book.BookList;
 | 
			
		||||
import org.crosswire.jsword.book.Books;
 | 
			
		||||
import org.crosswire.jsword.book.BooksEvent;
 | 
			
		||||
import org.crosswire.jsword.book.BooksListener;
 | 
			
		||||
import org.crosswire.jsword.book.install.InstallManager;
 | 
			
		||||
import org.crosswire.jsword.book.install.Installer;
 | 
			
		||||
import org.crosswire.jsword.book.sword.SwordBookPath;
 | 
			
		||||
 | 
			
		||||
import java.io.File;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
import java.util.Map;
 | 
			
		||||
 | 
			
		||||
import javax.inject.Inject;
 | 
			
		||||
 | 
			
		||||
@ -11,7 +11,7 @@ import javax.inject.Inject;
 | 
			
		||||
import javax.inject.Singleton;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Created by bspeice on 5/25/14.
 | 
			
		||||
 * Manager to keep track of which books have been installed
 | 
			
		||||
 */
 | 
			
		||||
@Singleton
 | 
			
		||||
public class InstalledManager implements BooksListener {
 | 
			
		||||
 | 
			
		||||
@ -15,7 +15,7 @@ import javax.inject.Singleton;
 | 
			
		||||
import de.greenrobot.event.EventBus;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Created by bspeice on 5/24/14.
 | 
			
		||||
 * Handle refreshing the list of books available as needed
 | 
			
		||||
 */
 | 
			
		||||
@Singleton
 | 
			
		||||
public class RefreshManager {
 | 
			
		||||
 | 
			
		||||
@ -1,23 +1,12 @@
 | 
			
		||||
package org.bspeice.minimalbible.activities.viewer;
 | 
			
		||||
 | 
			
		||||
import org.bspeice.minimalbible.R;
 | 
			
		||||
import org.bspeice.minimalbible.R.id;
 | 
			
		||||
import org.bspeice.minimalbible.R.layout;
 | 
			
		||||
import org.bspeice.minimalbible.R.menu;
 | 
			
		||||
import org.bspeice.minimalbible.R.string;
 | 
			
		||||
import org.bspeice.minimalbible.activities.BaseActivity;
 | 
			
		||||
import org.bspeice.minimalbible.activities.BaseNavigationDrawerFragment;
 | 
			
		||||
import org.bspeice.minimalbible.activities.downloader.DownloadActivity;
 | 
			
		||||
 | 
			
		||||
import android.app.Activity;
 | 
			
		||||
import android.content.Intent;
 | 
			
		||||
import android.os.Build;
 | 
			
		||||
import android.os.Bundle;
 | 
			
		||||
import android.support.v4.app.Fragment;
 | 
			
		||||
import android.support.v4.app.FragmentManager;
 | 
			
		||||
import android.support.v4.widget.DrawerLayout;
 | 
			
		||||
import android.support.v7.app.ActionBar;
 | 
			
		||||
import android.support.v7.app.ActionBarActivity;
 | 
			
		||||
import android.view.LayoutInflater;
 | 
			
		||||
import android.view.Menu;
 | 
			
		||||
import android.view.MenuItem;
 | 
			
		||||
@ -25,7 +14,10 @@ import android.view.View;
 | 
			
		||||
import android.view.ViewGroup;
 | 
			
		||||
import android.widget.TextView;
 | 
			
		||||
 | 
			
		||||
import com.readystatesoftware.systembartint.SystemBarTintManager;
 | 
			
		||||
import org.bspeice.minimalbible.R;
 | 
			
		||||
import org.bspeice.minimalbible.activities.BaseActivity;
 | 
			
		||||
import org.bspeice.minimalbible.activities.BaseNavigationDrawerFragment;
 | 
			
		||||
import org.bspeice.minimalbible.activities.downloader.DownloadActivity;
 | 
			
		||||
 | 
			
		||||
public class BibleViewer extends BaseActivity implements
 | 
			
		||||
		BaseNavigationDrawerFragment.NavigationDrawerCallbacks {
 | 
			
		||||
 | 
			
		||||
@ -3,7 +3,6 @@
 | 
			
		||||
    android:id="@+id/list_nav_drawer"
 | 
			
		||||
    android:layout_width="match_parent"
 | 
			
		||||
    android:layout_height="match_parent"
 | 
			
		||||
    android:background="#cccc"
 | 
			
		||||
    android:choiceMode="singleChoice"
 | 
			
		||||
    android:divider="@android:color/transparent"
 | 
			
		||||
    android:dividerHeight="0dp"
 | 
			
		||||
 | 
			
		||||
@ -10,7 +10,6 @@
 | 
			
		||||
    <string name="action_example">Example action</string>
 | 
			
		||||
    <string name="action_settings">Settings</string>
 | 
			
		||||
    <string name="title_activity_downloader">Downloads</string>
 | 
			
		||||
    <string name="hello_world">Hello world!</string>
 | 
			
		||||
    <string name="title_activity_download">DownloadActivity</string>
 | 
			
		||||
 | 
			
		||||
</resources>
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user