move RepoXMLHandler to org.fdroid.fdroid.data

This should be lumped with the classes it uses.
This commit is contained in:
Hans-Christoph Steiner 2019-01-02 17:11:10 +01:00
parent 9c8cc20a80
commit 26c1ef3033
7 changed files with 9 additions and 14 deletions

View File

@ -28,7 +28,7 @@ import android.support.test.runner.AndroidJUnit4;
import android.util.Log; import android.util.Log;
import org.fdroid.fdroid.AssetUtils; import org.fdroid.fdroid.AssetUtils;
import org.fdroid.fdroid.RepoXMLHandler; import org.fdroid.fdroid.data.RepoXMLHandler;
import org.fdroid.fdroid.Utils; import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.compat.FileCompatTest; import org.fdroid.fdroid.compat.FileCompatTest;
import org.fdroid.fdroid.data.Apk; import org.fdroid.fdroid.data.Apk;

View File

@ -38,6 +38,7 @@ import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.RepoPersister; import org.fdroid.fdroid.data.RepoPersister;
import org.fdroid.fdroid.data.RepoProvider; import org.fdroid.fdroid.data.RepoProvider;
import org.fdroid.fdroid.data.RepoPushRequest; import org.fdroid.fdroid.data.RepoPushRequest;
import org.fdroid.fdroid.data.RepoXMLHandler;
import org.fdroid.fdroid.data.Schema.RepoTable; import org.fdroid.fdroid.data.Schema.RepoTable;
import org.fdroid.fdroid.installer.InstallManagerService; import org.fdroid.fdroid.installer.InstallManagerService;
import org.fdroid.fdroid.installer.InstallerService; import org.fdroid.fdroid.installer.InstallerService;

View File

@ -16,7 +16,6 @@ import android.webkit.MimeTypeMap;
import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.annotation.JacksonInject;
import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import org.fdroid.fdroid.RepoXMLHandler;
import org.fdroid.fdroid.Utils; import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.data.Schema.ApkTable.Cols; import org.fdroid.fdroid.data.Schema.ApkTable.Cols;

View File

@ -17,15 +17,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
package org.fdroid.fdroid; package org.fdroid.fdroid.data;
import android.os.Build; import android.os.Build;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import org.fdroid.fdroid.data.Apk; import org.fdroid.fdroid.IndexUpdater;
import org.fdroid.fdroid.data.App; import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.RepoPushRequest;
import org.fdroid.fdroid.data.Schema.ApkTable; import org.fdroid.fdroid.data.Schema.ApkTable;
import org.xml.sax.Attributes; import org.xml.sax.Attributes;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;

View File

@ -20,17 +20,13 @@
* MA 02110-1301, USA. * MA 02110-1301, USA.
*/ */
package org.fdroid.fdroid.updater; package org.fdroid.fdroid.data;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.text.TextUtils; import android.text.TextUtils;
import android.util.Log; import android.util.Log;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.fdroid.fdroid.BuildConfig; import org.fdroid.fdroid.BuildConfig;
import org.fdroid.fdroid.data.Apk;
import org.fdroid.fdroid.data.App;
import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.RepoPushRequest;
import org.fdroid.fdroid.mock.RepoDetails; import org.fdroid.fdroid.mock.RepoDetails;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -884,7 +880,7 @@ public class RepoXMLHandlerTest {
} }
@NonNull @NonNull
static RepoDetails getFromFile(ClassLoader classLoader, String indexFilename, int pushRequests) { public static RepoDetails getFromFile(ClassLoader classLoader, String indexFilename, int pushRequests) {
Log.i(TAG, "test file: " + classLoader.getResource(indexFilename)); Log.i(TAG, "test file: " + classLoader.getResource(indexFilename));
InputStream inputStream = classLoader.getResourceAsStream(indexFilename); InputStream inputStream = classLoader.getResourceAsStream(indexFilename);
return RepoDetails.getFromFile(inputStream, pushRequests); return RepoDetails.getFromFile(inputStream, pushRequests);

View File

@ -25,6 +25,7 @@ import org.fdroid.fdroid.data.InstalledAppTestUtils;
import org.fdroid.fdroid.data.Repo; import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.RepoProvider; import org.fdroid.fdroid.data.RepoProvider;
import org.fdroid.fdroid.data.RepoPushRequest; import org.fdroid.fdroid.data.RepoPushRequest;
import org.fdroid.fdroid.data.RepoXMLHandlerTest;
import org.fdroid.fdroid.mock.RepoDetails; import org.fdroid.fdroid.mock.RepoDetails;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;

View File

@ -2,7 +2,7 @@ package org.fdroid.fdroid.mock;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import org.fdroid.fdroid.RepoXMLHandler; import org.fdroid.fdroid.data.RepoXMLHandler;
import org.fdroid.fdroid.data.Apk; import org.fdroid.fdroid.data.Apk;
import org.fdroid.fdroid.data.App; import org.fdroid.fdroid.data.App;
import org.fdroid.fdroid.data.RepoPushRequest; import org.fdroid.fdroid.data.RepoPushRequest;