mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-27 09:01:22 +01:00
Merge branch 'migration' into develop
Non-GUI classes have been moved into the 'core' project in order to allow AntennaPod SP to reference it as a subproject. Conflicts: app/src/main/AndroidManifest.xml build.gradle core/src/main/java/de/danoeh/antennapod/core/service/playback/PlaybackService.java core/src/main/java/de/danoeh/antennapod/core/syndication/namespace/NSSimpleChapters.java core/src/main/java/de/danoeh/antennapod/core/util/ChapterUtils.java gradle/wrapper/gradle-wrapper.properties pom.xml
This commit is contained in:
commit
cc052e91ad
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,3 +1,6 @@
|
||||
[submodule "submodules/dslv"]
|
||||
path = submodules/dslv
|
||||
url = git://github.com/danieloeh/drag-sort-listview.git
|
||||
[submodule "app/dslv"]
|
||||
path = app/dslv
|
||||
url = https://github.com/danieloeh/drag-sort-listview.git
|
||||
|
48
.tx/config
48
.tx/config
@ -2,31 +2,31 @@
|
||||
host = https://www.transifex.com
|
||||
|
||||
[antennapod.english]
|
||||
source_file = res/values/strings.xml
|
||||
source_file = core/src/main/res/values/strings.xml
|
||||
source_lang = en
|
||||
trans.az = res/values-az/strings.xml
|
||||
trans.ca = res/values-ca/strings.xml
|
||||
trans.cs_CZ = res/values-cs-rCZ/strings.xml
|
||||
trans.da = res/values-da/strings.xml
|
||||
trans.de = res/values-de/strings.xml
|
||||
trans.es = res/values-es/strings.xml
|
||||
trans.es_ES = res/values-es-rES/strings.xml
|
||||
trans.fr = res/values-fr/strings.xml
|
||||
trans.he_IL = res/values-iw-rIL/strings.xml
|
||||
trans.hi_IN = res/values-hi-rIN/strings.xml
|
||||
trans.it_IT = res/values-it-rIT/strings.xml
|
||||
trans.ko = res/values-ko/strings.xml
|
||||
trans.nl = res/values-nl/strings.xml
|
||||
trans.pl_PL = res/values-pl-rPL/strings.xml
|
||||
trans.pt = res/values-pt/strings.xml
|
||||
trans.pt_BR = res/values-pt-rBR/strings.xml
|
||||
trans.ro_RO = res/values-ro-rRO/strings.xml
|
||||
trans.ru = res/values-ru/strings.xml
|
||||
trans.ru-RU = res/values-ru/strings.xml
|
||||
trans.ru_RU = res/values-ru/strings.xml
|
||||
trans.uk_UA = res/values-uk-rUA/strings.xml
|
||||
trans.zh_CN = res/values-zh-rCN/strings.xml
|
||||
trans.sv_SE = res/values-sv-rSE/strings.xml
|
||||
trans.az = core/src/main/res/values-az/strings.xml
|
||||
trans.ca = core/src/main/res/values-ca/strings.xml
|
||||
trans.cs_CZ = core/src/main/res/values-cs-rCZ/strings.xml
|
||||
trans.da = core/src/main/res/values-da/strings.xml
|
||||
trans.de = core/src/main/res/values-de/strings.xml
|
||||
trans.es = core/src/main/res/values-es/strings.xml
|
||||
trans.es_ES = core/src/main/res/values-es-rES/strings.xml
|
||||
trans.fr = core/src/main/res/values-fr/strings.xml
|
||||
trans.he_IL = core/src/main/res/values-iw-rIL/strings.xml
|
||||
trans.hi_IN = core/src/main/res/values-hi-rIN/strings.xml
|
||||
trans.it_IT = core/src/main/res/values-it-rIT/strings.xml
|
||||
trans.ko = core/src/main/res/values-ko/strings.xml
|
||||
trans.nl = core/src/main/res/values-nl/strings.xml
|
||||
trans.pl_PL = core/src/main/res/values-pl-rPL/strings.xml
|
||||
trans.pt = core/src/main/res/values-pt/strings.xml
|
||||
trans.pt_BR = core/src/main/res/values-pt-rBR/strings.xml
|
||||
trans.ro_RO = core/src/main/res/values-ro-rRO/strings.xml
|
||||
trans.ru = core/src/main/res/values-ru/strings.xml
|
||||
trans.ru-RU = core/src/main/res/values-ru/strings.xml
|
||||
trans.ru_RU = core/src/main/res/values-ru/strings.xml
|
||||
trans.uk_UA = core/src/main/res/values-uk-rUA/strings.xml
|
||||
trans.zh_CN = core/src/main/res/values-zh-rCN/strings.xml
|
||||
trans.sv_SE = core/src/main/res/values-sv-rSE/strings.xml
|
||||
|
||||
[antennapod.description]
|
||||
file_filter = description/<lang>.txt
|
||||
|
100
app/build.gradle
Normal file
100
app/build.gradle
Normal file
@ -0,0 +1,100 @@
|
||||
apply plugin: 'com.android.application'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:20.0.0'
|
||||
compile 'com.android.support:appcompat-v7:20.0.0'
|
||||
compile 'org.apache.commons:commons-lang3:3.3.2'
|
||||
compile('org.shredzone.flattr4j:flattr4j-core:2.10') {
|
||||
exclude group: 'org.apache.httpcomponents', module: 'httpcore'
|
||||
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
|
||||
exclude group: 'org.json', module: 'json'
|
||||
}
|
||||
compile 'commons-io:commons-io:2.4'
|
||||
compile 'com.nineoldandroids:library:2.4.0'
|
||||
compile project('dslv:library')
|
||||
compile 'com.jayway.android.robotium:robotium-solo:5.2.1'
|
||||
compile('com.doomonafireball.betterpickers:library:1.5.2') {
|
||||
exclude group: 'com.android.support', module: 'support-v4'
|
||||
}
|
||||
compile 'org.jsoup:jsoup:1.7.3'
|
||||
compile 'com.squareup.picasso:picasso:2.3.4'
|
||||
compile 'com.squareup.okhttp:okhttp:2.0.0'
|
||||
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
|
||||
compile 'com.squareup.okio:okio:1.0.0'
|
||||
compile project(':core')
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdkVersion 20
|
||||
buildToolsVersion "20.0"
|
||||
|
||||
defaultConfig {
|
||||
minSdkVersion 10
|
||||
targetSdkVersion 20
|
||||
testApplicationId "de.test.antennapod"
|
||||
testInstrumentationRunner "de.test.antennapod.AntennaPodTestRunner"
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
releaseConfig {
|
||||
if (project.hasProperty('releaseStoreFile')) {
|
||||
storeFile file(releaseStoreFile)
|
||||
} else {
|
||||
storeFile file('keystore')
|
||||
}
|
||||
if (project.hasProperty('releaseStorePassword')) {
|
||||
storePassword releaseStorePassword
|
||||
} else {
|
||||
storePassword "password"
|
||||
}
|
||||
if (project.hasProperty('releaseKeyAlias')) {
|
||||
keyAlias releaseKeyAlias
|
||||
} else {
|
||||
keyAlias "alias"
|
||||
}
|
||||
if (project.hasProperty('releaseKeyPassword')) {
|
||||
keyPassword releaseKeyPassword
|
||||
} else {
|
||||
keyPassword "password"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
def STRING = "String"
|
||||
def FLATTR_APP_KEY = "FLATTR_APP_KEY"
|
||||
def FLATTR_APP_SECRET = "FLATTR_APP_SECRET"
|
||||
def mFlattrAppKey = (project.hasProperty('flattrAppKey')) ? flattrAppKey : "\"\""
|
||||
def mFlattrAppSecret = (project.hasProperty('flattrAppSecret')) ? flattrAppSecret : "\"\""
|
||||
|
||||
debug {
|
||||
applicationIdSuffix ".debug"
|
||||
buildConfigField STRING, FLATTR_APP_KEY, mFlattrAppKey
|
||||
buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret
|
||||
}
|
||||
release {
|
||||
runProguard true
|
||||
proguardFile 'proguard.cfg'
|
||||
signingConfig signingConfigs.releaseConfig
|
||||
buildConfigField STRING, FLATTR_APP_KEY, mFlattrAppKey
|
||||
buildConfigField STRING, FLATTR_APP_SECRET, mFlattrAppSecret
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
exclude 'META-INF/LICENSE.txt'
|
||||
exclude 'META-INF/NOTICE.txt'
|
||||
}
|
||||
|
||||
lintOptions {
|
||||
abortOnError false
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_7
|
||||
targetCompatibility JavaVersion.VERSION_1_7
|
||||
}
|
||||
}
|
1
app/dslv
Submodule
1
app/dslv
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 80011c50e444e1c7d5e13b57bdb127b524a1ff92
|
1
app/settings.gradle
Normal file
1
app/settings.gradle
Normal file
@ -0,0 +1 @@
|
||||
include ':app:dslv:library'
|
@ -1,4 +1,4 @@
|
||||
package instrumentationTest.de.test.antennapod;
|
||||
package de.test.antennapod;
|
||||
|
||||
import android.test.InstrumentationTestRunner;
|
||||
import android.test.suitebuilder.TestSuiteBuilder;
|
||||
@ -10,7 +10,7 @@ public class AntennaPodTestRunner extends InstrumentationTestRunner {
|
||||
public TestSuite getAllTests() {
|
||||
return new TestSuiteBuilder(AntennaPodTestRunner.class)
|
||||
.includeAllPackagesUnderHere()
|
||||
.excludePackages("instrumentationTest.de.test.antennapod.gpodnet")
|
||||
.excludePackages("de.test.antennapod.gpodnet")
|
||||
.build();
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
package instrumentationTest.de.test.antennapod.gpodnet;
|
||||
package de.test.antennapod.gpodnet;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import android.util.Log;
|
||||
import de.danoeh.antennapod.gpoddernet.GpodnetService;
|
||||
import de.danoeh.antennapod.gpoddernet.GpodnetServiceException;
|
||||
import de.danoeh.antennapod.gpoddernet.model.GpodnetDevice;
|
||||
import de.danoeh.antennapod.gpoddernet.model.GpodnetTag;
|
||||
|
||||
import de.danoeh.antennapod.core.gpoddernet.GpodnetService;
|
||||
import de.danoeh.antennapod.core.gpoddernet.GpodnetServiceException;
|
||||
import de.danoeh.antennapod.core.gpoddernet.model.GpodnetDevice;
|
||||
import de.danoeh.antennapod.core.gpoddernet.model.GpodnetTag;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
@ -1,13 +1,13 @@
|
||||
package instrumentationTest.de.test.antennapod.syndication.handler;
|
||||
package de.test.antennapod.handler;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.InstrumentationTestCase;
|
||||
import de.danoeh.antennapod.feed.*;
|
||||
import de.danoeh.antennapod.syndication.handler.FeedHandler;
|
||||
import de.danoeh.antennapod.syndication.handler.UnsupportedFeedtypeException;
|
||||
import instrumentationTest.de.test.antennapod.util.syndication.feedgenerator.AtomGenerator;
|
||||
import instrumentationTest.de.test.antennapod.util.syndication.feedgenerator.FeedGenerator;
|
||||
import instrumentationTest.de.test.antennapod.util.syndication.feedgenerator.RSS2Generator;
|
||||
import de.danoeh.antennapod.core.feed.*;
|
||||
import de.danoeh.antennapod.core.syndication.handler.FeedHandler;
|
||||
import de.danoeh.antennapod.core.syndication.handler.UnsupportedFeedtypeException;
|
||||
import de.test.antennapod.util.syndication.feedgenerator.AtomGenerator;
|
||||
import de.test.antennapod.util.syndication.feedgenerator.FeedGenerator;
|
||||
import de.test.antennapod.util.syndication.feedgenerator.RSS2Generator;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
@ -1,14 +1,14 @@
|
||||
package instrumentationTest.de.test.antennapod.service.download;
|
||||
package de.test.antennapod.service.download;
|
||||
|
||||
import android.test.InstrumentationTestCase;
|
||||
import android.util.Log;
|
||||
import de.danoeh.antennapod.feed.FeedFile;
|
||||
import de.danoeh.antennapod.service.download.DownloadRequest;
|
||||
import de.danoeh.antennapod.service.download.DownloadStatus;
|
||||
import de.danoeh.antennapod.service.download.Downloader;
|
||||
import de.danoeh.antennapod.service.download.HttpDownloader;
|
||||
import de.danoeh.antennapod.util.DownloadError;
|
||||
import instrumentationTest.de.test.antennapod.util.service.download.HTTPBin;
|
||||
import de.danoeh.antennapod.core.feed.FeedFile;
|
||||
import de.danoeh.antennapod.core.service.download.DownloadRequest;
|
||||
import de.danoeh.antennapod.core.service.download.DownloadStatus;
|
||||
import de.danoeh.antennapod.core.service.download.Downloader;
|
||||
import de.danoeh.antennapod.core.service.download.HttpDownloader;
|
||||
import de.danoeh.antennapod.core.util.DownloadError;
|
||||
import de.test.antennapod.util.service.download.HTTPBin;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
@ -1,16 +1,16 @@
|
||||
package instrumentationTest.de.test.antennapod.service.playback;
|
||||
package de.test.antennapod.service.playback;
|
||||
|
||||
import android.content.Context;
|
||||
import android.media.RemoteControlClient;
|
||||
import android.test.InstrumentationTestCase;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.service.playback.PlaybackServiceMediaPlayer;
|
||||
import de.danoeh.antennapod.service.playback.PlayerStatus;
|
||||
import de.danoeh.antennapod.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.util.playback.Playable;
|
||||
import instrumentationTest.de.test.antennapod.util.service.download.HTTPBin;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.service.playback.PlaybackServiceMediaPlayer;
|
||||
import de.danoeh.antennapod.core.service.playback.PlayerStatus;
|
||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.core.util.playback.Playable;
|
||||
import de.test.antennapod.util.service.download.HTTPBin;
|
||||
import junit.framework.AssertionFailedError;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
@ -69,7 +69,7 @@ public class PlaybackServiceMediaPlayerTest extends InstrumentationTestCase {
|
||||
assertTrue(cacheDir.canWrite());
|
||||
assertTrue(cacheDir.canRead());
|
||||
if (!dest.exists()) {
|
||||
InputStream i = getInstrumentation().getTargetContext().getAssets().open("testfile.mp3");
|
||||
InputStream i = getInstrumentation().getContext().getAssets().open("testfile.mp3");
|
||||
OutputStream o = new FileOutputStream(new File(cacheDir, PLAYABLE_DEST_URL));
|
||||
IOUtils.copy(i, o);
|
||||
o.flush();
|
@ -1,13 +1,13 @@
|
||||
package instrumentationTest.de.test.antennapod.service.playback;
|
||||
package de.test.antennapod.service.playback;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.InstrumentationTestCase;
|
||||
import de.danoeh.antennapod.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.service.playback.PlaybackServiceTaskManager;
|
||||
import de.danoeh.antennapod.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.util.playback.Playable;
|
||||
import de.danoeh.antennapod.core.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.service.playback.PlaybackServiceTaskManager;
|
||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.core.util.playback.Playable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
@ -1,22 +1,21 @@
|
||||
package instrumentationTest.de.test.antennapod.storage;
|
||||
package de.test.antennapod.storage;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.InstrumentationTestCase;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.storage.DBReader;
|
||||
import de.danoeh.antennapod.storage.FeedItemStatistics;
|
||||
import de.danoeh.antennapod.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.util.flattr.FlattrStatus;
|
||||
import static instrumentationTest.de.test.antennapod.storage.DBTestUtils.*;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.storage.FeedItemStatistics;
|
||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.core.util.flattr.FlattrStatus;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import static instrumentationTest.de.test.antennapod.storage.DBTestUtils.saveFeedlist;
|
||||
import static de.test.antennapod.storage.DBTestUtils.saveFeedlist;
|
||||
|
||||
/**
|
||||
* Test class for DBReader
|
@ -1,17 +1,17 @@
|
||||
package instrumentationTest.de.test.antennapod.storage;
|
||||
package de.test.antennapod.storage;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.test.InstrumentationTestCase;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.storage.DBReader;
|
||||
import de.danoeh.antennapod.storage.DBTasks;
|
||||
import de.danoeh.antennapod.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.util.flattr.FlattrStatus;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.storage.DBTasks;
|
||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.core.util.flattr.FlattrStatus;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -20,7 +20,7 @@ import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import static instrumentationTest.de.test.antennapod.storage.DBTestUtils.*;
|
||||
import static de.test.antennapod.storage.DBTestUtils.*;
|
||||
|
||||
/**
|
||||
* Test class for DBTasks
|
@ -1,12 +1,12 @@
|
||||
package instrumentationTest.de.test.antennapod.storage;
|
||||
package de.test.antennapod.storage;
|
||||
|
||||
import android.content.Context;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.util.comparator.FeedItemPubdateComparator;
|
||||
import de.danoeh.antennapod.util.flattr.FlattrStatus;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.core.util.comparator.FeedItemPubdateComparator;
|
||||
import de.danoeh.antennapod.core.util.flattr.FlattrStatus;
|
||||
import junit.framework.Assert;
|
||||
|
||||
import java.util.ArrayList;
|
@ -1,16 +1,16 @@
|
||||
package instrumentationTest.de.test.antennapod.storage;
|
||||
package de.test.antennapod.storage;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.test.InstrumentationTestCase;
|
||||
import android.util.Log;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedImage;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.storage.DBReader;
|
||||
import de.danoeh.antennapod.storage.DBWriter;
|
||||
import de.danoeh.antennapod.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedImage;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
@ -1,8 +1,7 @@
|
||||
package instrumentationTest.de.test.antennapod.ui;
|
||||
package de.test.antennapod.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Resources;
|
||||
import android.test.ActivityInstrumentationTestCase2;
|
||||
import android.view.View;
|
||||
import com.robotium.solo.Solo;
|
||||
@ -10,9 +9,8 @@ import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.DefaultOnlineFeedViewActivity;
|
||||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.activity.PreferenceActivity;
|
||||
import de.danoeh.antennapod.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||
|
||||
/**
|
||||
* User interface tests for MainActivity
|
@ -1,4 +1,4 @@
|
||||
package instrumentationTest.de.test.antennapod.ui;
|
||||
package de.test.antennapod.ui;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
@ -9,12 +9,12 @@ import com.robotium.solo.Solo;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.AudioplayerActivity;
|
||||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.service.playback.PlaybackService;
|
||||
import de.danoeh.antennapod.storage.DBReader;
|
||||
import de.danoeh.antennapod.storage.DBWriter;
|
||||
import de.danoeh.antennapod.storage.PodDBAdapter;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.service.playback.PlaybackService;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package instrumentationTest.de.test.antennapod.ui;
|
||||
package de.test.antennapod.ui;
|
||||
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
@ -6,11 +6,10 @@ import android.graphics.Bitmap;
|
||||
import android.os.Build;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.*;
|
||||
import de.danoeh.antennapod.storage.DBWriter;
|
||||
import de.danoeh.antennapod.storage.PodDBAdapter;
|
||||
import instrumentationTest.de.test.antennapod.util.service.download.HTTPBin;
|
||||
import instrumentationTest.de.test.antennapod.util.syndication.feedgenerator.RSS2Generator;
|
||||
import de.danoeh.antennapod.core.feed.*;
|
||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||
import de.test.antennapod.util.service.download.HTTPBin;
|
||||
import de.test.antennapod.util.syndication.feedgenerator.RSS2Generator;
|
||||
import junit.framework.Assert;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
@ -1,8 +1,8 @@
|
||||
package instrumentationTest.de.test.antennapod.ui;
|
||||
package de.test.antennapod.ui;
|
||||
|
||||
import android.test.InstrumentationTestCase;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import org.apache.http.HttpStatus;
|
||||
|
||||
import java.io.File;
|
@ -1,4 +1,4 @@
|
||||
package instrumentationTest.de.test.antennapod.ui;
|
||||
package de.test.antennapod.ui;
|
||||
|
||||
import android.test.ActivityInstrumentationTestCase2;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package instrumentationTest.de.test.antennapod.util;
|
||||
package de.test.antennapod.util;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
import de.danoeh.antennapod.util.Converter;
|
||||
import de.danoeh.antennapod.core.util.Converter;
|
||||
|
||||
/**
|
||||
* Test class for converter
|
@ -1,9 +1,9 @@
|
||||
package instrumentationTest.de.test.antennapod.util;
|
||||
package de.test.antennapod.util;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
import de.danoeh.antennapod.util.FileNameGenerator;
|
||||
import de.danoeh.antennapod.core.util.FileNameGenerator;
|
||||
import android.test.AndroidTestCase;
|
||||
|
||||
public class FilenameGeneratorTest extends AndroidTestCase {
|
@ -1,7 +1,7 @@
|
||||
package instrumentationTest.de.test.antennapod.util;
|
||||
package de.test.antennapod.util;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import de.danoeh.antennapod.util.URIUtil;
|
||||
import de.danoeh.antennapod.core.util.URIUtil;
|
||||
|
||||
/**
|
||||
* Test class for URIUtil
|
@ -1,7 +1,7 @@
|
||||
package instrumentationTest.de.test.antennapod.util;
|
||||
package de.test.antennapod.util;
|
||||
|
||||
import android.test.AndroidTestCase;
|
||||
import de.danoeh.antennapod.util.URLChecker;
|
||||
import de.danoeh.antennapod.core.util.URLChecker;
|
||||
|
||||
/**
|
||||
* Test class for URLChecker
|
@ -1,4 +1,4 @@
|
||||
package instrumentationTest.de.test.antennapod.util.playback;
|
||||
package de.test.antennapod.util.playback;
|
||||
|
||||
import android.content.Context;
|
||||
import android.test.InstrumentationTestCase;
|
||||
@ -11,11 +11,11 @@ import org.jsoup.select.Elements;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import de.danoeh.antennapod.feed.Chapter;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.util.playback.Playable;
|
||||
import de.danoeh.antennapod.util.playback.Timeline;
|
||||
import de.danoeh.antennapod.core.feed.Chapter;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.util.playback.Playable;
|
||||
import de.danoeh.antennapod.core.util.playback.Timeline;
|
||||
|
||||
/**
|
||||
* Test class for timeline
|
@ -1,4 +1,4 @@
|
||||
package instrumentationTest.de.test.antennapod.util.service.download;
|
||||
package de.test.antennapod.util.service.download;
|
||||
|
||||
import android.util.Base64;
|
||||
import android.util.Log;
|
@ -1,4 +1,4 @@
|
||||
package instrumentationTest.de.test.antennapod.util.service.download;
|
||||
package de.test.antennapod.util.service.download;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.InetAddress;
|
@ -1,7 +1,7 @@
|
||||
package instrumentationTest.de.test.antennapod.util.syndication;
|
||||
package de.test.antennapod.util.syndication;
|
||||
|
||||
import android.test.InstrumentationTestCase;
|
||||
import de.danoeh.antennapod.util.syndication.FeedDiscoverer;
|
||||
import de.danoeh.antennapod.core.util.syndication.FeedDiscoverer;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
@ -1,10 +1,10 @@
|
||||
package instrumentationTest.de.test.antennapod.util.syndication.feedgenerator;
|
||||
package de.test.antennapod.util.syndication.feedgenerator;
|
||||
|
||||
import android.util.Xml;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.syndication.util.SyndDateUtils;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.syndication.util.SyndDateUtils;
|
||||
import org.xmlpull.v1.XmlSerializer;
|
||||
|
||||
import java.io.IOException;
|
@ -1,6 +1,6 @@
|
||||
package instrumentationTest.de.test.antennapod.util.syndication.feedgenerator;
|
||||
package de.test.antennapod.util.syndication.feedgenerator;
|
||||
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
@ -1,4 +1,4 @@
|
||||
package instrumentationTest.de.test.antennapod.util.syndication.feedgenerator;
|
||||
package de.test.antennapod.util.syndication.feedgenerator;
|
||||
|
||||
import org.xmlpull.v1.XmlSerializer;
|
||||
|
@ -1,9 +1,9 @@
|
||||
package instrumentationTest.de.test.antennapod.util.syndication.feedgenerator;
|
||||
package de.test.antennapod.util.syndication.feedgenerator;
|
||||
|
||||
import android.util.Xml;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.syndication.util.SyndDateUtils;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.syndication.util.SyndDateUtils;
|
||||
import org.xmlpull.v1.XmlSerializer;
|
||||
|
||||
import java.io.IOException;
|
@ -1,13 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="de.danoeh.antennapod"
|
||||
android:versionCode="41"
|
||||
android:versionName="0.9.9.4">
|
||||
package="de.danoeh.antennapod"
|
||||
android:versionCode="41"
|
||||
android:versionName="0.9.9.4">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK"/>
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||
|
||||
<supports-screens
|
||||
@ -31,7 +30,7 @@
|
||||
android:name="de.danoeh.antennapod.PodcastApp"
|
||||
android:icon="@drawable/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:backupAgent=".backup.OpmlBackupAgent"
|
||||
android:backupAgent=".core.backup.OpmlBackupAgent"
|
||||
android:restoreAnyVersion="true"
|
||||
android:logo="@drawable/ic_launcher"
|
||||
android:theme="@style/Theme.AntennaPod.Light">
|
||||
@ -70,20 +69,6 @@
|
||||
android:name=".activity.DownloadAuthenticationActivity"
|
||||
android:launchMode="singleInstance"/>
|
||||
|
||||
<service
|
||||
android:name=".service.download.DownloadService"
|
||||
android:enabled="true"/>
|
||||
<service
|
||||
android:name=".service.playback.PlaybackService"
|
||||
android:enabled="true"
|
||||
android:exported="true">
|
||||
</service>
|
||||
|
||||
<service
|
||||
android:name=".service.GpodnetSyncService"
|
||||
android:enabled="true">
|
||||
</service>
|
||||
|
||||
<activity
|
||||
android:name=".activity.PreferenceActivity"
|
||||
android:configChanges="keyboardHidden|orientation"
|
||||
@ -93,22 +78,11 @@
|
||||
android:value="de.danoeh.antennapod.activity.MainActivity"/>
|
||||
</activity>
|
||||
|
||||
<receiver
|
||||
android:name=".receiver.MediaButtonReceiver"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MEDIA_BUTTON"/>
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="de.danoeh.antennapod.NOTIFY_BUTTON_RECEIVER"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity android:name=".activity.FeedInfoActivity">
|
||||
</activity>
|
||||
|
||||
<service
|
||||
android:name=".service.playback.PlayerWidgetService"
|
||||
android:name=".service.PlayerWidgetService"
|
||||
android:enabled="true"
|
||||
android:exported="false">
|
||||
</service>
|
||||
@ -129,11 +103,6 @@
|
||||
<action android:name="de.danoeh.antennapod.STOP_WIDGET_UPDATE"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receiver.FeedUpdateReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="de.danoeh.antennapod.feedupdatereceiver.refreshFeeds"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<activity android:name=".activity.StorageErrorActivity">
|
||||
</activity>
|
||||
@ -320,13 +289,18 @@
|
||||
android:value="de.danoeh.antennapod.activity.PreferenceActivity"/>
|
||||
</activity>
|
||||
|
||||
|
||||
<receiver android:name=".receiver.ConnectivityActionReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.net.conn.CONNECTIVITY_CHANGE"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receiver.AlarmUpdateReceiver">
|
||||
|
||||
<receiver android:name=".receiver.SPAReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="de.danoeh.antennapdsp.intent.SP_APPS_QUERY_FEEDS_RESPONSE"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name="de.danoeh.antennapod.core.receiver.AlarmUpdateReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||
</intent-filter>
|
||||
@ -338,11 +312,6 @@
|
||||
android:scheme="package"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver android:name=".receiver.SPAReceiver">
|
||||
<intent-filter>
|
||||
<action android:name="de.danoeh.antennapdsp.intent.SP_APPS_QUERY_FEEDS_RESPONSE"/>
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
||||
</manifest>
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 57 KiB |
BIN
app/src/main/assets/testfile.mp3
Normal file
BIN
app/src/main/assets/testfile.mp3
Normal file
Binary file not shown.
@ -2,17 +2,25 @@ package de.danoeh.antennapod;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.res.Configuration;
|
||||
import android.util.Log;
|
||||
import de.danoeh.antennapod.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.preferences.PlaybackPreferences;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
|
||||
import de.danoeh.antennapod.core.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.core.preferences.PlaybackPreferences;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.spa.SPAUtil;
|
||||
|
||||
/** Main application class. */
|
||||
public class PodcastApp extends Application {
|
||||
|
||||
// make sure that ClientConfigurator executes its static code
|
||||
static {
|
||||
try {
|
||||
Class.forName("de.danoeh.antennapod.config.ClientConfigurator");
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("ClientConfigurator not found");
|
||||
}
|
||||
}
|
||||
|
||||
private static final String TAG = "PodcastApp";
|
||||
public static final String EXPORT_DIR = "export/";
|
||||
|
||||
private static float LOGICAL_DENSITY;
|
||||
|
@ -31,23 +31,23 @@ import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.adapter.ChapterListAdapter;
|
||||
import de.danoeh.antennapod.adapter.NavListAdapter;
|
||||
import de.danoeh.antennapod.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.core.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.dialog.VariableSpeedDialog;
|
||||
import de.danoeh.antennapod.feed.Chapter;
|
||||
import de.danoeh.antennapod.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.MediaType;
|
||||
import de.danoeh.antennapod.feed.SimpleChapter;
|
||||
import de.danoeh.antennapod.core.feed.Chapter;
|
||||
import de.danoeh.antennapod.core.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.MediaType;
|
||||
import de.danoeh.antennapod.core.feed.SimpleChapter;
|
||||
import de.danoeh.antennapod.fragment.CoverFragment;
|
||||
import de.danoeh.antennapod.fragment.ItemDescriptionFragment;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.service.playback.PlaybackService;
|
||||
import de.danoeh.antennapod.storage.DBReader;
|
||||
import de.danoeh.antennapod.util.menuhandler.MenuItemUtils;
|
||||
import de.danoeh.antennapod.util.menuhandler.NavDrawerActivity;
|
||||
import de.danoeh.antennapod.util.playback.ExternalMedia;
|
||||
import de.danoeh.antennapod.util.playback.Playable;
|
||||
import de.danoeh.antennapod.util.playback.PlaybackController;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.service.playback.PlaybackService;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.menuhandler.MenuItemUtils;
|
||||
import de.danoeh.antennapod.menuhandler.NavDrawerActivity;
|
||||
import de.danoeh.antennapod.core.util.playback.ExternalMedia;
|
||||
import de.danoeh.antennapod.core.util.playback.Playable;
|
||||
import de.danoeh.antennapod.core.util.playback.PlaybackController;
|
||||
|
||||
/**
|
||||
* Activity for playing audio files.
|
@ -30,14 +30,14 @@ import java.util.Map;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.adapter.FeedItemlistDescriptionAdapter;
|
||||
import de.danoeh.antennapod.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.dialog.DownloadRequestErrorDialogCreator;
|
||||
import de.danoeh.antennapod.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.storage.DBReader;
|
||||
import de.danoeh.antennapod.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.core.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.core.dialog.DownloadRequestErrorDialogCreator;
|
||||
import de.danoeh.antennapod.core.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
||||
|
||||
/**
|
||||
* Default implementation of OnlineFeedViewActivity. Shows the downloaded feed's items with their descriptions,
|
@ -19,7 +19,7 @@ import android.widget.*;
|
||||
import android.widget.AdapterView.OnItemClickListener;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
@ -14,9 +14,9 @@ import org.apache.commons.lang3.Validate;
|
||||
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.service.download.DownloadRequest;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.service.download.DownloadRequest;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
||||
|
||||
/**
|
||||
* Shows a username and a password text field.
|
@ -12,16 +12,16 @@ import android.view.MenuItem;
|
||||
import android.widget.*;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.dialog.DownloadRequestErrorDialogCreator;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedPreferences;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.storage.DBReader;
|
||||
import de.danoeh.antennapod.storage.DBWriter;
|
||||
import de.danoeh.antennapod.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.util.LangUtils;
|
||||
import de.danoeh.antennapod.util.menuhandler.FeedMenuHandler;
|
||||
import de.danoeh.antennapod.core.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.core.dialog.DownloadRequestErrorDialogCreator;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedPreferences;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.core.util.LangUtils;
|
||||
import de.danoeh.antennapod.menuhandler.FeedMenuHandler;
|
||||
|
||||
/**
|
||||
* Displays information about a feed.
|
@ -14,8 +14,8 @@ import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.util.flattr.FlattrUtils;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.util.flattr.FlattrUtils;
|
||||
import org.shredzone.flattr4j.exception.FlattrException;
|
||||
|
||||
/** Guides the user through the authentication process */
|
@ -25,13 +25,13 @@ import org.apache.commons.lang3.Validate;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.adapter.NavListAdapter;
|
||||
import de.danoeh.antennapod.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.EventDistributor;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.fragment.*;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.storage.DBReader;
|
||||
import de.danoeh.antennapod.util.StorageUtils;
|
||||
import de.danoeh.antennapod.util.menuhandler.NavDrawerActivity;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.util.StorageUtils;
|
||||
import de.danoeh.antennapod.menuhandler.NavDrawerActivity;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -3,13 +3,11 @@ package de.danoeh.antennapod.activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.PixelFormat;
|
||||
import android.media.AudioManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.ActionBarActivity;
|
||||
import android.util.Log;
|
||||
import android.view.Menu;
|
||||
@ -25,18 +23,17 @@ import com.doomonafireball.betterpickers.hmspicker.HmsPickerDialogFragment;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.dialog.TimeDialog;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.service.playback.PlaybackService;
|
||||
import de.danoeh.antennapod.storage.DBTasks;
|
||||
import de.danoeh.antennapod.util.Converter;
|
||||
import de.danoeh.antennapod.util.ShareUtils;
|
||||
import de.danoeh.antennapod.util.StorageUtils;
|
||||
import de.danoeh.antennapod.util.playback.MediaPlayerError;
|
||||
import de.danoeh.antennapod.util.playback.Playable;
|
||||
import de.danoeh.antennapod.util.playback.PlaybackController;
|
||||
import org.shredzone.flattr4j.model.User;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.service.playback.PlaybackService;
|
||||
import de.danoeh.antennapod.core.storage.DBTasks;
|
||||
import de.danoeh.antennapod.core.util.Converter;
|
||||
import de.danoeh.antennapod.core.util.ShareUtils;
|
||||
import de.danoeh.antennapod.core.util.StorageUtils;
|
||||
import de.danoeh.antennapod.core.util.playback.MediaPlayerError;
|
||||
import de.danoeh.antennapod.core.util.playback.Playable;
|
||||
import de.danoeh.antennapod.core.util.playback.PlaybackController;
|
||||
|
||||
/**
|
||||
* Provides general features which are both needed for playing audio and video
|
@ -16,21 +16,21 @@ import android.widget.RelativeLayout;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.dialog.AuthenticationDialog;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedPreferences;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.service.download.DownloadRequest;
|
||||
import de.danoeh.antennapod.service.download.DownloadStatus;
|
||||
import de.danoeh.antennapod.service.download.Downloader;
|
||||
import de.danoeh.antennapod.service.download.HttpDownloader;
|
||||
import de.danoeh.antennapod.syndication.handler.FeedHandler;
|
||||
import de.danoeh.antennapod.syndication.handler.FeedHandlerResult;
|
||||
import de.danoeh.antennapod.syndication.handler.UnsupportedFeedtypeException;
|
||||
import de.danoeh.antennapod.util.DownloadError;
|
||||
import de.danoeh.antennapod.util.FileNameGenerator;
|
||||
import de.danoeh.antennapod.util.StorageUtils;
|
||||
import de.danoeh.antennapod.util.URLChecker;
|
||||
import de.danoeh.antennapod.util.syndication.FeedDiscoverer;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedPreferences;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.service.download.DownloadRequest;
|
||||
import de.danoeh.antennapod.core.service.download.DownloadStatus;
|
||||
import de.danoeh.antennapod.core.service.download.Downloader;
|
||||
import de.danoeh.antennapod.core.service.download.HttpDownloader;
|
||||
import de.danoeh.antennapod.core.syndication.handler.FeedHandler;
|
||||
import de.danoeh.antennapod.core.syndication.handler.FeedHandlerResult;
|
||||
import de.danoeh.antennapod.core.syndication.handler.UnsupportedFeedtypeException;
|
||||
import de.danoeh.antennapod.core.util.DownloadError;
|
||||
import de.danoeh.antennapod.core.util.FileNameGenerator;
|
||||
import de.danoeh.antennapod.core.util.StorageUtils;
|
||||
import de.danoeh.antennapod.core.util.URLChecker;
|
||||
import de.danoeh.antennapod.core.util.syndication.FeedDiscoverer;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.xml.sax.SAXException;
|
||||
|
@ -13,8 +13,8 @@ import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.ListView;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.opml.OpmlElement;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.opml.OpmlElement;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
@ -6,7 +6,7 @@ import android.util.Log;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.asynctask.OpmlFeedQueuer;
|
||||
import de.danoeh.antennapod.asynctask.OpmlImportWorker;
|
||||
import de.danoeh.antennapod.opml.OpmlElement;
|
||||
import de.danoeh.antennapod.core.opml.OpmlElement;
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.ArrayList;
|
@ -2,8 +2,8 @@ package de.danoeh.antennapod.activity;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.os.Bundle;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.util.LangUtils;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.util.LangUtils;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStreamReader;
|
@ -13,9 +13,9 @@ import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.util.LangUtils;
|
||||
import de.danoeh.antennapod.util.StorageUtils;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.util.LangUtils;
|
||||
import de.danoeh.antennapod.core.util.StorageUtils;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
@ -23,7 +23,6 @@ import java.io.*;
|
||||
* Lets the user start the OPML-import process from a path
|
||||
*/
|
||||
public class OpmlImportFromPathActivity extends OpmlImportBaseActivity {
|
||||
public static final String IMPORT_DIR = "import/";
|
||||
private static final String TAG = "OpmlImportFromPathActivity";
|
||||
private TextView txtvPath;
|
||||
private Button butStart;
|
||||
@ -61,7 +60,7 @@ public class OpmlImportFromPathActivity extends OpmlImportBaseActivity {
|
||||
* directory.
|
||||
*/
|
||||
private void setImportPath() {
|
||||
File importDir = UserPreferences.getDataFolder(this, IMPORT_DIR);
|
||||
File importDir = UserPreferences.getDataFolder(this, UserPreferences.IMPORT_DIR);
|
||||
boolean success = true;
|
||||
if (!importDir.exists()) {
|
||||
if (BuildConfig.DEBUG)
|
@ -1,6 +1,6 @@
|
||||
package de.danoeh.antennapod.activity;
|
||||
|
||||
import de.danoeh.antennapod.opml.OpmlElement;
|
||||
import de.danoeh.antennapod.core.opml.OpmlElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -22,17 +22,17 @@ import android.view.MenuItem;
|
||||
import android.widget.Toast;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.FlattrClickWorker;
|
||||
import de.danoeh.antennapod.core.asynctask.FlattrClickWorker;
|
||||
import de.danoeh.antennapod.asynctask.OpmlExportWorker;
|
||||
import de.danoeh.antennapod.dialog.AuthenticationDialog;
|
||||
import de.danoeh.antennapod.dialog.AutoFlattrPreferenceDialog;
|
||||
import de.danoeh.antennapod.dialog.GpodnetSetHostnameDialog;
|
||||
import de.danoeh.antennapod.dialog.VariableSpeedDialog;
|
||||
import de.danoeh.antennapod.preferences.GpodnetPreferences;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.util.flattr.FlattrStatus;
|
||||
import de.danoeh.antennapod.util.flattr.FlattrUtils;
|
||||
import de.danoeh.antennapod.util.flattr.SimpleFlattrThing;
|
||||
import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.util.flattr.FlattrStatus;
|
||||
import de.danoeh.antennapod.core.util.flattr.FlattrUtils;
|
||||
import de.danoeh.antennapod.core.util.flattr.SimpleFlattrThing;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
@ -12,8 +12,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.util.StorageUtils;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.util.StorageUtils;
|
||||
|
||||
/** Is show if there is now external storage available. */
|
||||
public class StorageErrorActivity extends ActionBarActivity {
|
@ -21,11 +21,11 @@ import android.widget.SeekBar;
|
||||
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.MediaType;
|
||||
import de.danoeh.antennapod.service.playback.PlaybackService;
|
||||
import de.danoeh.antennapod.service.playback.PlayerStatus;
|
||||
import de.danoeh.antennapod.util.playback.ExternalMedia;
|
||||
import de.danoeh.antennapod.util.playback.Playable;
|
||||
import de.danoeh.antennapod.core.feed.MediaType;
|
||||
import de.danoeh.antennapod.core.service.playback.PlaybackService;
|
||||
import de.danoeh.antennapod.core.service.playback.PlayerStatus;
|
||||
import de.danoeh.antennapod.core.util.playback.ExternalMedia;
|
||||
import de.danoeh.antennapod.core.util.playback.Playable;
|
||||
import de.danoeh.antennapod.view.AspectRatioVideoView;
|
||||
|
||||
/**
|
@ -15,12 +15,12 @@ import android.widget.*;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.gpoddernet.GpodnetService;
|
||||
import de.danoeh.antennapod.gpoddernet.GpodnetServiceException;
|
||||
import de.danoeh.antennapod.gpoddernet.model.GpodnetDevice;
|
||||
import de.danoeh.antennapod.preferences.GpodnetPreferences;
|
||||
import de.danoeh.antennapod.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.service.GpodnetSyncService;
|
||||
import de.danoeh.antennapod.core.gpoddernet.GpodnetService;
|
||||
import de.danoeh.antennapod.core.gpoddernet.GpodnetServiceException;
|
||||
import de.danoeh.antennapod.core.gpoddernet.model.GpodnetDevice;
|
||||
import de.danoeh.antennapod.core.preferences.GpodnetPreferences;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.service.GpodnetSyncService;
|
||||
|
||||
import java.security.SecureRandom;
|
||||
import java.util.ArrayList;
|
@ -1,6 +1,6 @@
|
||||
package de.danoeh.antennapod.adapter;
|
||||
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
|
||||
public interface ActionButtonCallback {
|
||||
/** Is called when the action button of a list item has been pressed. */
|
@ -8,9 +8,9 @@ import android.widget.ImageButton;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
||||
|
||||
/**
|
||||
* Utility methods for the action button that is displayed on the right hand side
|
@ -5,9 +5,9 @@ import android.view.View;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.util.Converter;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.util.Converter;
|
||||
|
||||
/**
|
||||
* Utility methods for adapters
|
@ -16,10 +16,10 @@ import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.Chapter;
|
||||
import de.danoeh.antennapod.util.ChapterUtils;
|
||||
import de.danoeh.antennapod.util.Converter;
|
||||
import de.danoeh.antennapod.util.playback.Playable;
|
||||
import de.danoeh.antennapod.core.feed.Chapter;
|
||||
import de.danoeh.antennapod.core.util.ChapterUtils;
|
||||
import de.danoeh.antennapod.core.util.Converter;
|
||||
import de.danoeh.antennapod.core.util.playback.Playable;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -6,13 +6,13 @@ import android.widget.Toast;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.dialog.DownloadRequestErrorDialogCreator;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.storage.DBTasks;
|
||||
import de.danoeh.antennapod.storage.DBWriter;
|
||||
import de.danoeh.antennapod.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.core.dialog.DownloadRequestErrorDialogCreator;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.storage.DBTasks;
|
||||
import de.danoeh.antennapod.core.storage.DBWriter;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
||||
|
||||
/**
|
||||
* Default implementation of an ActionButtonCallback
|
@ -8,10 +8,10 @@ import android.view.ViewGroup;
|
||||
import android.widget.BaseAdapter;
|
||||
import android.widget.TextView;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedImage;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.service.download.DownloadStatus;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedImage;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.service.download.DownloadStatus;
|
||||
|
||||
/** Displays a list of DownloadStatus entries. */
|
||||
public class DownloadLogAdapter extends BaseAdapter {
|
@ -11,9 +11,9 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.util.Converter;
|
||||
import de.danoeh.antennapod.core.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.util.Converter;
|
||||
|
||||
/**
|
||||
* Shows a list of downloaded episodes
|
@ -9,11 +9,11 @@ import android.widget.ImageButton;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.service.download.DownloadRequest;
|
||||
import de.danoeh.antennapod.service.download.DownloadStatus;
|
||||
import de.danoeh.antennapod.service.download.Downloader;
|
||||
import de.danoeh.antennapod.util.Converter;
|
||||
import de.danoeh.antennapod.util.ThemeUtils;
|
||||
import de.danoeh.antennapod.core.service.download.DownloadRequest;
|
||||
import de.danoeh.antennapod.core.service.download.DownloadStatus;
|
||||
import de.danoeh.antennapod.core.service.download.Downloader;
|
||||
import de.danoeh.antennapod.core.util.Converter;
|
||||
import de.danoeh.antennapod.core.util.ThemeUtils;
|
||||
|
||||
public class DownloadlistAdapter extends BaseAdapter {
|
||||
|
@ -13,11 +13,11 @@ import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.util.Converter;
|
||||
import de.danoeh.antennapod.core.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.core.util.Converter;
|
||||
|
||||
/**
|
||||
* Displays unread items and items in the queue in one combined list. The
|
@ -9,12 +9,11 @@ import android.view.View.OnClickListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.*;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.feed.MediaType;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.util.Converter;
|
||||
import de.danoeh.antennapod.util.ThemeUtils;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.feed.MediaType;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.core.util.ThemeUtils;
|
||||
|
||||
/**
|
||||
* List adapter for items of feeds that the user has already subscribed to.
|
@ -7,7 +7,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -11,8 +11,8 @@ import android.widget.BaseAdapter;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.core.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
|
||||
/**
|
||||
* BaseAdapter for the navigation drawer
|
@ -12,11 +12,11 @@ import android.widget.ProgressBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.util.Converter;
|
||||
import de.danoeh.antennapod.core.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.core.util.Converter;
|
||||
|
||||
/**
|
||||
* List adapter for the list of new episodes
|
@ -6,10 +6,10 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.*;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.core.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.FeedMedia;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
||||
|
||||
/**
|
||||
* List adapter for the queue.
|
@ -9,11 +9,11 @@ import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.feed.FeedComponent;
|
||||
import de.danoeh.antennapod.feed.FeedItem;
|
||||
import de.danoeh.antennapod.feed.SearchResult;
|
||||
import de.danoeh.antennapod.core.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.feed.FeedComponent;
|
||||
import de.danoeh.antennapod.core.feed.FeedItem;
|
||||
import de.danoeh.antennapod.core.feed.SearchResult;
|
||||
|
||||
/**
|
||||
* List adapter for search activity.
|
@ -13,8 +13,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import java.util.List;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.gpoddernet.model.GpodnetPodcast;
|
||||
import de.danoeh.antennapod.core.asynctask.PicassoProvider;
|
||||
import de.danoeh.antennapod.core.gpoddernet.model.GpodnetPodcast;
|
||||
|
||||
/**
|
||||
* Adapter for displaying a list of GPodnetPodcast-Objects.
|
@ -0,0 +1,118 @@
|
||||
package de.danoeh.antennapod.asynctask;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStreamWriter;
|
||||
|
||||
import de.danoeh.antennapod.core.R;
|
||||
import de.danoeh.antennapod.core.opml.OpmlWriter;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
import de.danoeh.antennapod.core.storage.DBReader;
|
||||
import de.danoeh.antennapod.core.util.LangUtils;
|
||||
|
||||
/**
|
||||
* Writes an OPML file into the export directory in the background.
|
||||
*/
|
||||
public class OpmlExportWorker extends AsyncTask<Void, Void, Void> {
|
||||
private static final String TAG = "OpmlExportWorker";
|
||||
private static final String DEFAULT_OUTPUT_NAME = "antennapod-feeds.opml";
|
||||
public static final String EXPORT_DIR = "export/";
|
||||
|
||||
private Context context;
|
||||
private File output;
|
||||
|
||||
private ProgressDialog progDialog;
|
||||
private Exception exception;
|
||||
|
||||
public OpmlExportWorker(Context context, File output) {
|
||||
this.context = context;
|
||||
this.output = output;
|
||||
}
|
||||
|
||||
public OpmlExportWorker(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Void doInBackground(Void... params) {
|
||||
OpmlWriter opmlWriter = new OpmlWriter();
|
||||
if (output == null) {
|
||||
output = new File(
|
||||
UserPreferences.getDataFolder(context, EXPORT_DIR),
|
||||
DEFAULT_OUTPUT_NAME);
|
||||
if (output.exists()) {
|
||||
Log.w(TAG, "Overwriting previously exported file.");
|
||||
output.delete();
|
||||
}
|
||||
}
|
||||
OutputStreamWriter writer = null;
|
||||
try {
|
||||
writer = new OutputStreamWriter(new FileOutputStream(output), LangUtils.UTF_8);
|
||||
opmlWriter.writeDocument(DBReader.getFeedList(context), writer);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
exception = e;
|
||||
} finally {
|
||||
if (writer != null) {
|
||||
try {
|
||||
writer.close();
|
||||
} catch (IOException ioe) {
|
||||
exception = ioe;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPostExecute(Void result) {
|
||||
progDialog.dismiss();
|
||||
AlertDialog.Builder alert = new AlertDialog.Builder(context)
|
||||
.setNeutralButton(android.R.string.ok,
|
||||
new DialogInterface.OnClickListener() {
|
||||
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog,
|
||||
int which) {
|
||||
dialog.dismiss();
|
||||
}
|
||||
});
|
||||
if (exception != null) {
|
||||
alert.setTitle(R.string.export_error_label);
|
||||
alert.setMessage(exception.getMessage());
|
||||
} else {
|
||||
alert.setTitle(R.string.opml_export_success_title);
|
||||
alert.setMessage(context
|
||||
.getString(R.string.opml_export_success_sum)
|
||||
+ output.toString());
|
||||
}
|
||||
alert.create().show();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPreExecute() {
|
||||
progDialog = new ProgressDialog(context);
|
||||
progDialog.setMessage(context.getString(R.string.exporting_label));
|
||||
progDialog.setIndeterminate(true);
|
||||
progDialog.show();
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
public void executeAsync() {
|
||||
if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.GINGERBREAD_MR1) {
|
||||
executeOnExecutor(THREAD_POOL_EXECUTOR);
|
||||
} else {
|
||||
execute();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -4,12 +4,12 @@ import android.annotation.SuppressLint;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.os.AsyncTask;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.core.R;
|
||||
import de.danoeh.antennapod.activity.OpmlImportHolder;
|
||||
import de.danoeh.antennapod.feed.Feed;
|
||||
import de.danoeh.antennapod.opml.OpmlElement;
|
||||
import de.danoeh.antennapod.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.storage.DownloadRequester;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.opml.OpmlElement;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequestException;
|
||||
import de.danoeh.antennapod.core.storage.DownloadRequester;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
@ -8,10 +8,10 @@ import android.content.DialogInterface;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.opml.OpmlElement;
|
||||
import de.danoeh.antennapod.opml.OpmlReader;
|
||||
import de.danoeh.antennapod.core.BuildConfig;
|
||||
import de.danoeh.antennapod.core.R;
|
||||
import de.danoeh.antennapod.core.opml.OpmlElement;
|
||||
import de.danoeh.antennapod.core.opml.OpmlReader;
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import java.io.IOException;
|
@ -0,0 +1,29 @@
|
||||
package de.danoeh.antennapod.config;
|
||||
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import de.danoeh.antennapod.PodcastApp;
|
||||
import de.danoeh.antennapod.activity.StorageErrorActivity;
|
||||
import de.danoeh.antennapod.core.ApplicationCallbacks;
|
||||
import de.danoeh.antennapod.core.preferences.UserPreferences;
|
||||
|
||||
public class ApplicationCallbacksImpl implements ApplicationCallbacks {
|
||||
|
||||
@Override
|
||||
public Application getApplicationInstance() {
|
||||
return PodcastApp.getInstance();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent getStorageErrorActivity(Context context) {
|
||||
return new Intent(context, StorageErrorActivity.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setUpdateInterval(long updateInterval) {
|
||||
UserPreferences.restartUpdateAlarm(updateInterval, updateInterval);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package de.danoeh.antennapod.config;
|
||||
|
||||
import de.danoeh.antennapod.core.ClientConfig;
|
||||
|
||||
/**
|
||||
* Configures the ClientConfig class of the core package.
|
||||
*/
|
||||
public class ClientConfigurator {
|
||||
|
||||
static {
|
||||
ClientConfig.USER_AGENT = "AntennaPod/0.9.9.4";
|
||||
ClientConfig.applicationCallbacks = new ApplicationCallbacksImpl();
|
||||
ClientConfig.downloadServiceCallbacks = new DownloadServiceCallbacksImpl();
|
||||
ClientConfig.gpodnetCallbacks = new GpodnetCallbacksImpl();
|
||||
ClientConfig.playbackServiceCallbacks = new PlaybackServiceCallbacksImpl();
|
||||
ClientConfig.storageCallbacks = new StorageCallbacksImpl();
|
||||
ClientConfig.flattrCallbacks = new FlattrCallbacksImpl();
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package de.danoeh.antennapod.config;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
||||
import de.danoeh.antennapod.activity.DownloadAuthenticationActivity;
|
||||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.adapter.NavListAdapter;
|
||||
import de.danoeh.antennapod.core.DownloadServiceCallbacks;
|
||||
import de.danoeh.antennapod.core.feed.Feed;
|
||||
import de.danoeh.antennapod.core.service.download.DownloadRequest;
|
||||
import de.danoeh.antennapod.fragment.DownloadsFragment;
|
||||
|
||||
|
||||
public class DownloadServiceCallbacksImpl implements DownloadServiceCallbacks {
|
||||
|
||||
@Override
|
||||
public PendingIntent getNotificationContentIntent(Context context) {
|
||||
Intent intent = new Intent(context, MainActivity.class);
|
||||
intent.putExtra(MainActivity.EXTRA_NAV_TYPE, NavListAdapter.VIEW_TYPE_NAV);
|
||||
intent.putExtra(MainActivity.EXTRA_NAV_INDEX, MainActivity.POS_DOWNLOADS);
|
||||
Bundle args = new Bundle();
|
||||
args.putInt(DownloadsFragment.ARG_SELECTED_TAB, DownloadsFragment.POS_RUNNING);
|
||||
intent.putExtra(MainActivity.EXTRA_FRAGMENT_ARGS, args);
|
||||
|
||||
return PendingIntent.getActivity(context, 0, intent,
|
||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PendingIntent getAuthentificationNotificationContentIntent(Context context, DownloadRequest request) {
|
||||
final Intent activityIntent = new Intent(context.getApplicationContext(), DownloadAuthenticationActivity.class);
|
||||
activityIntent.putExtra(DownloadAuthenticationActivity.ARG_DOWNLOAD_REQUEST, request);
|
||||
activityIntent.putExtra(DownloadAuthenticationActivity.ARG_SEND_TO_DOWNLOAD_REQUESTER_BOOL, true);
|
||||
return PendingIntent.getActivity(context.getApplicationContext(), 0, activityIntent, PendingIntent.FLAG_ONE_SHOT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PendingIntent getReportNotificationContentIntent(Context context) {
|
||||
Intent intent = new Intent(context, MainActivity.class);
|
||||
intent.putExtra(MainActivity.EXTRA_NAV_TYPE, NavListAdapter.VIEW_TYPE_NAV);
|
||||
intent.putExtra(MainActivity.EXTRA_NAV_INDEX, MainActivity.POS_DOWNLOADS);
|
||||
Bundle args = new Bundle();
|
||||
args.putInt(DownloadsFragment.ARG_SELECTED_TAB, DownloadsFragment.POS_LOG);
|
||||
intent.putExtra(MainActivity.EXTRA_FRAGMENT_ARGS, args);
|
||||
return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFeedParsed(Context context, Feed feed) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCreateReport() {
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package de.danoeh.antennapod.config;
|
||||
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import org.shredzone.flattr4j.oauth.AccessToken;
|
||||
|
||||
import de.danoeh.antennapod.BuildConfig;
|
||||
import de.danoeh.antennapod.activity.FlattrAuthActivity;
|
||||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.core.FlattrCallbacks;
|
||||
|
||||
public class FlattrCallbacksImpl implements FlattrCallbacks {
|
||||
private static final String TAG = "FlattrCallbacksImpl";
|
||||
|
||||
@Override
|
||||
public boolean flattrEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Intent getFlattrAuthenticationActivityIntent(Context context) {
|
||||
return new Intent(context, FlattrAuthActivity.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PendingIntent getFlattrFailedNotificationContentIntent(Context context) {
|
||||
return PendingIntent.getActivity(context, 0, new Intent(context, MainActivity.class), 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFlattrAppKey() {
|
||||
return BuildConfig.FLATTR_APP_KEY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFlattrAppSecret() {
|
||||
return BuildConfig.FLATTR_APP_SECRET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleFlattrAuthenticationSuccess(AccessToken token) {
|
||||
FlattrAuthActivity instance = FlattrAuthActivity.getInstance();
|
||||
if (instance != null) {
|
||||
instance.handleAuthenticationSuccess();
|
||||
} else {
|
||||
Log.e(TAG, "FlattrAuthActivity instance was null");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package de.danoeh.antennapod.config;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import de.danoeh.antennapod.activity.MainActivity;
|
||||
import de.danoeh.antennapod.core.GpodnetCallbacks;
|
||||
|
||||
|
||||
public class GpodnetCallbacksImpl implements GpodnetCallbacks {
|
||||
@Override
|
||||
public boolean gpodnetEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PendingIntent getGpodnetSyncServiceErrorNotificationPendingIntent(Context context) {
|
||||
return PendingIntent.getActivity(context, 0, new Intent(context, MainActivity.class),
|
||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package de.danoeh.antennapod.config;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import de.danoeh.antennapod.R;
|
||||
import de.danoeh.antennapod.activity.AudioplayerActivity;
|
||||
import de.danoeh.antennapod.activity.VideoplayerActivity;
|
||||
import de.danoeh.antennapod.core.PlaybackServiceCallbacks;
|
||||
import de.danoeh.antennapod.core.feed.MediaType;
|
||||
|
||||
|
||||
public class PlaybackServiceCallbacksImpl implements PlaybackServiceCallbacks {
|
||||
@Override
|
||||
public Intent getPlayerActivityIntent(Context context, MediaType mediaType) {
|
||||
if (mediaType == MediaType.VIDEO) {
|
||||
return new Intent(context, VideoplayerActivity.class);
|
||||
} else {
|
||||
return new Intent(context, AudioplayerActivity.class);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean useQueue() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getNotificationIconResource(Context context) {
|
||||
return R.drawable.ic_stat_antenna_default;
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
package de.danoeh.antennapod.config;
|
||||
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.database.Cursor;
|
||||
import android.database.sqlite.SQLiteDatabase;
|
||||
import android.util.Log;
|
||||
|
||||
import de.danoeh.antennapod.core.StorageCallbacks;
|
||||
import de.danoeh.antennapod.core.storage.PodDBAdapter;
|
||||
|
||||
public class StorageCallbacksImpl implements StorageCallbacks {
|
||||
|
||||
@Override
|
||||
public int getDatabaseVersion() {
|
||||
return 12;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
|
||||
Log.w("DBAdapter", "Upgrading from version " + oldVersion + " to "
|
||||
+ newVersion + ".");
|
||||
if (oldVersion <= 1) {
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS + " ADD COLUMN "
|
||||
+ PodDBAdapter.KEY_TYPE + " TEXT");
|
||||
}
|
||||
if (oldVersion <= 2) {
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_SIMPLECHAPTERS
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_LINK + " TEXT");
|
||||
}
|
||||
if (oldVersion <= 3) {
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEED_ITEMS
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_ITEM_IDENTIFIER + " TEXT");
|
||||
}
|
||||
if (oldVersion <= 4) {
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS + " ADD COLUMN "
|
||||
+ PodDBAdapter.KEY_FEED_IDENTIFIER + " TEXT");
|
||||
}
|
||||
if (oldVersion <= 5) {
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_DOWNLOAD_LOG
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_REASON_DETAILED + " TEXT");
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_DOWNLOAD_LOG
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_DOWNLOADSTATUS_TITLE + " TEXT");
|
||||
}
|
||||
if (oldVersion <= 6) {
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_SIMPLECHAPTERS
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_CHAPTER_TYPE + " INTEGER");
|
||||
}
|
||||
if (oldVersion <= 7) {
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEED_MEDIA
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_PLAYBACK_COMPLETION_DATE
|
||||
+ " INTEGER");
|
||||
}
|
||||
if (oldVersion <= 8) {
|
||||
final int KEY_ID_POSITION = 0;
|
||||
final int KEY_MEDIA_POSITION = 1;
|
||||
|
||||
// Add feeditem column to feedmedia table
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEED_MEDIA
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_FEEDITEM
|
||||
+ " INTEGER");
|
||||
Cursor feeditemCursor = db.query(PodDBAdapter.TABLE_NAME_FEED_ITEMS,
|
||||
new String[]{PodDBAdapter.KEY_ID, PodDBAdapter.KEY_MEDIA}, "? > 0",
|
||||
new String[]{PodDBAdapter.KEY_MEDIA}, null, null, null);
|
||||
if (feeditemCursor.moveToFirst()) {
|
||||
db.beginTransaction();
|
||||
ContentValues contentValues = new ContentValues();
|
||||
do {
|
||||
long mediaId = feeditemCursor.getLong(KEY_MEDIA_POSITION);
|
||||
contentValues.put(PodDBAdapter.KEY_FEEDITEM, feeditemCursor.getLong(KEY_ID_POSITION));
|
||||
db.update(PodDBAdapter.TABLE_NAME_FEED_MEDIA, contentValues, PodDBAdapter.KEY_ID + "=?", new String[]{String.valueOf(mediaId)});
|
||||
contentValues.clear();
|
||||
} while (feeditemCursor.moveToNext());
|
||||
db.setTransactionSuccessful();
|
||||
db.endTransaction();
|
||||
}
|
||||
feeditemCursor.close();
|
||||
}
|
||||
if (oldVersion <= 9) {
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_AUTO_DOWNLOAD
|
||||
+ " INTEGER DEFAULT 1");
|
||||
}
|
||||
if (oldVersion <= 10) {
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_FLATTR_STATUS
|
||||
+ " INTEGER");
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEED_ITEMS
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_FLATTR_STATUS
|
||||
+ " INTEGER");
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEED_MEDIA
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_PLAYED_DURATION
|
||||
+ " INTEGER");
|
||||
}
|
||||
if (oldVersion <= 11) {
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_USERNAME
|
||||
+ " TEXT");
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEEDS
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_PASSWORD
|
||||
+ " TEXT");
|
||||
db.execSQL("ALTER TABLE " + PodDBAdapter.TABLE_NAME_FEED_ITEMS
|
||||
+ " ADD COLUMN " + PodDBAdapter.KEY_IMAGE
|
||||
+ " INTEGER");
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user