rename 'localrepo' package to 'nearby' to cover the whole thing

This commit is contained in:
Hans-Christoph Steiner 2019-06-17 10:03:01 +02:00
parent 1e00910a42
commit 790b5ab27d
41 changed files with 83 additions and 83 deletions

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.content.Context;
import android.support.test.InstrumentationRegistry;

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.content.BroadcastReceiver;
import android.content.Context;

View File

@ -23,9 +23,9 @@ import org.fdroid.fdroid.data.AppProvider;
import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.RepoProvider;
import org.fdroid.fdroid.data.Schema;
import org.fdroid.fdroid.localrepo.LocalRepoKeyStore;
import org.fdroid.fdroid.localrepo.LocalRepoManager;
import org.fdroid.fdroid.localrepo.LocalRepoService;
import org.fdroid.fdroid.nearby.LocalRepoKeyStore;
import org.fdroid.fdroid.nearby.LocalRepoManager;
import org.fdroid.fdroid.nearby.LocalRepoService;
import org.fdroid.fdroid.net.LocalHTTPD;
import org.junit.Test;

View File

@ -17,7 +17,7 @@
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.content.Context;

View File

@ -17,7 +17,7 @@
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.content.Context;

View File

@ -17,7 +17,7 @@
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.localrepo.peers;
package org.fdroid.fdroid.nearby.peers;
import org.fdroid.fdroid.data.NewRepoConfig;

View File

@ -76,17 +76,17 @@
<service
android:name=".net.WifiStateChangeService"
android:exported="false"/>
<service android:name=".localrepo.SwapService"/>
<service android:name=".nearby.SwapService"/>
<service android:name=".localrepo.LocalHTTPDManager"/>
<service android:name=".nearby.LocalHTTPDManager"/>
<service
android:name=".localrepo.LocalRepoService"
android:name=".nearby.LocalRepoService"
android:exported="false"/>
<service
android:name=".localrepo.TreeUriScannerIntentService"
android:name=".nearby.TreeUriScannerIntentService"
android:exported="false"/>
<service
android:name=".localrepo.SDCardScannerService"
android:name=".nearby.SDCardScannerService"
android:exported="false"/>
<activity

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
@ -15,7 +15,7 @@ import android.text.TextUtils;
import android.util.Log;
import org.fdroid.fdroid.R;
import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.localrepo.peers.BluetoothPeer;
import org.fdroid.fdroid.nearby.peers.BluetoothPeer;
import org.fdroid.fdroid.net.bluetooth.BluetoothServer;
import java.lang.ref.WeakReference;

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.content.Context;
import android.content.Intent;
@ -13,7 +13,7 @@ import android.util.Log;
import org.fdroid.fdroid.FDroidApp;
import org.fdroid.fdroid.Preferences;
import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.localrepo.peers.BonjourPeer;
import org.fdroid.fdroid.nearby.peers.BonjourPeer;
import javax.jmdns.JmDNS;
import javax.jmdns.ServiceEvent;

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.content.Context;
import android.content.Intent;

View File

@ -1,10 +1,8 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.content.Context;
import android.util.Log;
import kellinwood.security.zipsigner.ZipSigner;
import org.fdroid.fdroid.FDroidApp;
import org.fdroid.fdroid.Utils;
import org.bouncycastle.asn1.ASN1Sequence;
import org.bouncycastle.asn1.x500.X500Name;
import org.bouncycastle.asn1.x509.GeneralName;
@ -18,6 +16,8 @@ import org.bouncycastle.cert.jcajce.JcaX509CertificateConverter;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.OperatorCreationException;
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
import org.fdroid.fdroid.FDroidApp;
import org.fdroid.fdroid.Utils;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.content.Context;
import android.content.pm.ApplicationInfo;
@ -386,7 +386,7 @@ public final class LocalRepoManager {
}
/**
* Alias for {@link org.fdroid.fdroid.localrepo.LocalRepoManager.IndexXmlBuilder#tag(String, String)}
* Alias for {@link org.fdroid.fdroid.nearby.LocalRepoManager.IndexXmlBuilder#tag(String, String)}
* That accepts a number instead of string.
*
* @see IndexXmlBuilder#tag(String, String)
@ -396,7 +396,7 @@ public final class LocalRepoManager {
}
/**
* Alias for {@link org.fdroid.fdroid.localrepo.LocalRepoManager.IndexXmlBuilder#tag(String, String)}
* Alias for {@link org.fdroid.fdroid.nearby.LocalRepoManager.IndexXmlBuilder#tag(String, String)}
* that accepts a date instead of a string.
*
* @see IndexXmlBuilder#tag(String, String)

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.app.IntentService;
import android.content.Context;
@ -29,8 +29,8 @@ import java.util.Set;
public class LocalRepoService extends IntentService {
public static final String TAG = "LocalRepoService";
public static final String ACTION_CREATE = "org.fdroid.fdroid.localrepo.action.CREATE";
public static final String EXTRA_PACKAGE_NAMES = "org.fdroid.fdroid.localrepo.extra.PACKAGE_NAMES";
public static final String ACTION_CREATE = "org.fdroid.fdroid.nearby.action.CREATE";
public static final String EXTRA_PACKAGE_NAMES = "org.fdroid.fdroid.nearby.extra.PACKAGE_NAMES";
public static final String ACTION_STATUS = "localRepoStatusAction";
public static final String EXTRA_STATUS = "localRepoStatusExtra";

View File

@ -17,7 +17,7 @@
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.Manifest;
import android.app.IntentService;
@ -66,7 +66,7 @@ import java.util.List;
public class SDCardScannerService extends IntentService {
public static final String TAG = "SDCardScannerService";
private static final String ACTION_SCAN = "org.fdroid.fdroid.localrepo.SCAN";
private static final String ACTION_SCAN = "org.fdroid.fdroid.nearby.SCAN";
private static final List<String> SKIP_DIRS = Arrays.asList(".android_secure", "LOST.DIR");

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.annotation.SuppressLint;
import android.app.Notification;
@ -31,7 +31,7 @@ import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.RepoProvider;
import org.fdroid.fdroid.data.Schema;
import org.fdroid.fdroid.localrepo.peers.Peer;
import org.fdroid.fdroid.nearby.peers.Peer;
import org.fdroid.fdroid.net.Downloader;
import org.fdroid.fdroid.net.WifiStateChangeService;
import org.fdroid.fdroid.views.swap.SwapWorkflowActivity;

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.annotation.TargetApi;
import android.content.Context;

View File

@ -17,7 +17,7 @@
* MA 02110-1301, USA.
*/
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.annotation.TargetApi;
import android.app.IntentService;
@ -66,7 +66,7 @@ import java.util.jar.JarInputStream;
public class TreeUriScannerIntentService extends IntentService {
public static final String TAG = "TreeUriScannerIntentSer";
private static final String ACTION_SCAN_TREE_URI = "org.fdroid.fdroid.localrepo.action.SCAN_TREE_URI";
private static final String ACTION_SCAN_TREE_URI = "org.fdroid.fdroid.nearby.action.SCAN_TREE_URI";
public TreeUriScannerIntentService() {
super("TreeUriScannerIntentService");

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo.peers;
package org.fdroid.fdroid.nearby.peers;
import android.bluetooth.BluetoothClass.Device;
import android.bluetooth.BluetoothDevice;

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo.peers;
package org.fdroid.fdroid.nearby.peers;
import android.net.Uri;
import android.os.Parcel;

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo.peers;
package org.fdroid.fdroid.nearby.peers;
import android.os.Parcelable;
import android.support.annotation.DrawableRes;

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo.peers;
package org.fdroid.fdroid.nearby.peers;
import android.net.Uri;
import android.os.Parcel;

View File

@ -38,7 +38,7 @@ import android.net.Uri;
import fi.iki.elonen.NanoHTTPD;
import fi.iki.elonen.NanoHTTPD.Response.IStatus;
import org.fdroid.fdroid.BuildConfig;
import org.fdroid.fdroid.localrepo.LocalRepoKeyStore;
import org.fdroid.fdroid.nearby.LocalRepoKeyStore;
import org.fdroid.fdroid.views.swap.SwapWorkflowActivity;
import javax.net.ssl.SSLServerSocketFactory;

View File

@ -23,8 +23,8 @@ import org.fdroid.fdroid.R;
import org.fdroid.fdroid.UpdateService;
import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.localrepo.LocalRepoKeyStore;
import org.fdroid.fdroid.localrepo.LocalRepoManager;
import org.fdroid.fdroid.nearby.LocalRepoKeyStore;
import org.fdroid.fdroid.nearby.LocalRepoManager;
import java.net.Inet6Address;
import java.net.InetAddress;

View File

@ -17,9 +17,9 @@ import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import org.fdroid.fdroid.R;
import org.fdroid.fdroid.localrepo.SDCardScannerService;
import org.fdroid.fdroid.localrepo.SwapService;
import org.fdroid.fdroid.localrepo.TreeUriScannerIntentService;
import org.fdroid.fdroid.nearby.SDCardScannerService;
import org.fdroid.fdroid.nearby.SwapService;
import org.fdroid.fdroid.nearby.TreeUriScannerIntentService;
import java.io.File;
@ -48,7 +48,7 @@ import java.io.File;
* write access to the the removable storage.
*
* @see TreeUriScannerIntentService
* @see org.fdroid.fdroid.localrepo.SDCardScannerService
* @see org.fdroid.fdroid.nearby.SDCardScannerService
*/
class NearbyViewBinder {
public static final String TAG = "NearbyViewBinder";

View File

@ -29,8 +29,8 @@ import android.widget.TextView;
import org.fdroid.fdroid.R;
import org.fdroid.fdroid.data.InstalledAppProvider;
import org.fdroid.fdroid.data.Schema.InstalledAppTable;
import org.fdroid.fdroid.localrepo.LocalRepoService;
import org.fdroid.fdroid.localrepo.SwapView;
import org.fdroid.fdroid.nearby.LocalRepoService;
import org.fdroid.fdroid.nearby.SwapView;
public class SelectAppsView extends SwapView implements LoaderManager.LoaderCallbacks<Cursor> {

View File

@ -26,10 +26,10 @@ import cc.mvdan.accesspoint.WifiApControl;
import org.fdroid.fdroid.FDroidApp;
import org.fdroid.fdroid.R;
import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.localrepo.BluetoothManager;
import org.fdroid.fdroid.localrepo.SwapService;
import org.fdroid.fdroid.localrepo.SwapView;
import org.fdroid.fdroid.localrepo.peers.Peer;
import org.fdroid.fdroid.nearby.BluetoothManager;
import org.fdroid.fdroid.nearby.SwapService;
import org.fdroid.fdroid.nearby.SwapView;
import org.fdroid.fdroid.nearby.peers.Peer;
import org.fdroid.fdroid.net.WifiStateChangeService;
import java.util.ArrayList;

View File

@ -43,7 +43,7 @@ import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.Schema.AppMetadataTable;
import org.fdroid.fdroid.installer.InstallManagerService;
import org.fdroid.fdroid.installer.Installer;
import org.fdroid.fdroid.localrepo.SwapView;
import org.fdroid.fdroid.nearby.SwapView;
import org.fdroid.fdroid.net.Downloader;
import org.fdroid.fdroid.net.DownloaderService;

View File

@ -58,14 +58,14 @@ import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.data.NewRepoConfig;
import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.RepoProvider;
import org.fdroid.fdroid.localrepo.BluetoothManager;
import org.fdroid.fdroid.localrepo.BonjourManager;
import org.fdroid.fdroid.localrepo.LocalHTTPDManager;
import org.fdroid.fdroid.localrepo.LocalRepoService;
import org.fdroid.fdroid.localrepo.SwapService;
import org.fdroid.fdroid.localrepo.SwapView;
import org.fdroid.fdroid.localrepo.peers.BluetoothPeer;
import org.fdroid.fdroid.localrepo.peers.Peer;
import org.fdroid.fdroid.nearby.BluetoothManager;
import org.fdroid.fdroid.nearby.BonjourManager;
import org.fdroid.fdroid.nearby.LocalHTTPDManager;
import org.fdroid.fdroid.nearby.LocalRepoService;
import org.fdroid.fdroid.nearby.SwapService;
import org.fdroid.fdroid.nearby.SwapView;
import org.fdroid.fdroid.nearby.peers.BluetoothPeer;
import org.fdroid.fdroid.nearby.peers.Peer;
import org.fdroid.fdroid.net.BluetoothDownloader;
import org.fdroid.fdroid.net.Downloader;
import org.fdroid.fdroid.net.HttpDownloader;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.localrepo.SwapView
<org.fdroid.fdroid.nearby.SwapView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:swap="http://schemas.android.com/apk/res-auto"
@ -74,4 +74,4 @@
</LinearLayout>
</org.fdroid.fdroid.localrepo.SwapView>
</org.fdroid.fdroid.nearby.SwapView>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.localrepo.SwapView
<org.fdroid.fdroid.nearby.SwapView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:swap="http://schemas.android.com/apk/res-auto"
swap:toolbarColor="@color/swap_bright_blue"
@ -38,4 +38,4 @@
android:visibility="gone"
android:text="@string/try_again"/>
</org.fdroid.fdroid.localrepo.SwapView>
</org.fdroid.fdroid.nearby.SwapView>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.localrepo.SwapView
<org.fdroid.fdroid.nearby.SwapView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:swap="http://schemas.android.com/apk/res-auto"
@ -57,4 +57,4 @@
android:paddingBottom="20dp"/>
<!-- android:layout_above="@id/btn_learn_more_about_wifi" -->
</org.fdroid.fdroid.localrepo.SwapView>
</org.fdroid.fdroid.nearby.SwapView>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.localrepo.SwapView
<org.fdroid.fdroid.nearby.SwapView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:swap="http://schemas.android.com/apk/res-auto"
swap:toolbarTitle="@string/swap_nfc_title"
@ -35,4 +35,4 @@
android:layout_below="@+id/text_description"
android:layout_centerHorizontal="true"/>
</org.fdroid.fdroid.localrepo.SwapView>
</org.fdroid.fdroid.nearby.SwapView>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.localrepo.SwapView
<org.fdroid.fdroid.nearby.SwapView
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:swap="http://schemas.android.com/apk/res-auto"
@ -50,4 +50,4 @@
</LinearLayout>
</ScrollView>
</org.fdroid.fdroid.localrepo.SwapView>
</org.fdroid.fdroid.nearby.SwapView>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<org.fdroid.fdroid.localrepo.SwapView
<org.fdroid.fdroid.nearby.SwapView
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:swap="http://schemas.android.com/apk/res-auto"
@ -57,4 +57,4 @@
</LinearLayout>
</ScrollView>
</org.fdroid.fdroid.localrepo.SwapView>
</org.fdroid.fdroid.nearby.SwapView>

View File

@ -21,8 +21,8 @@ import java.util.Locale;
/**
* Handles requests to add new repos via URLs. This is an {@code IntentService}
* so that requests are queued, which is necessary when either
* {@link org.fdroid.fdroid.localrepo.TreeUriScannerIntentService} or
* {@link org.fdroid.fdroid.localrepo.SDCardScannerService} finds multiple
* {@link org.fdroid.fdroid.nearby.TreeUriScannerIntentService} or
* {@link org.fdroid.fdroid.nearby.SDCardScannerService} finds multiple
* repos on a disk. This should hopefully also serve as the beginnings of
* a new architecture for handling these requests. This does all the
* processing first, up front, then only launches UI as needed.

View File

@ -70,7 +70,7 @@ import org.fdroid.fdroid.data.InstalledAppProviderService;
import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.installer.ApkFileProvider;
import org.fdroid.fdroid.installer.InstallHistoryService;
import org.fdroid.fdroid.localrepo.SDCardScannerService;
import org.fdroid.fdroid.nearby.SDCardScannerService;
import org.fdroid.fdroid.net.ConnectivityMonitorService;
import org.fdroid.fdroid.net.Downloader;
import org.fdroid.fdroid.net.HttpDownloader;

View File

@ -7,7 +7,7 @@ import android.text.TextUtils;
import android.util.Log;
import org.fdroid.fdroid.R;
import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.localrepo.peers.WifiPeer;
import org.fdroid.fdroid.nearby.peers.WifiPeer;
import org.fdroid.fdroid.views.swap.SwapWorkflowActivity;
import java.util.Arrays;

View File

@ -56,8 +56,8 @@ import org.fdroid.fdroid.R;
import org.fdroid.fdroid.UpdateService;
import org.fdroid.fdroid.Utils;
import org.fdroid.fdroid.data.NewRepoConfig;
import org.fdroid.fdroid.localrepo.SDCardScannerService;
import org.fdroid.fdroid.localrepo.SwapService;
import org.fdroid.fdroid.nearby.SDCardScannerService;
import org.fdroid.fdroid.nearby.SwapService;
import org.fdroid.fdroid.net.WifiStateChangeService;
import org.fdroid.fdroid.views.AppDetailsActivity;
import org.fdroid.fdroid.views.ManageReposActivity;

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.content.Context;
import org.fdroid.fdroid.FDroidApp;

View File

@ -1,4 +1,4 @@
package org.fdroid.fdroid.localrepo;
package org.fdroid.fdroid.nearby;
import android.content.Context;
import android.text.TextUtils;

View File

@ -23,9 +23,9 @@ import org.fdroid.fdroid.data.RepoProvider;
import org.fdroid.fdroid.data.Schema;
import org.fdroid.fdroid.data.ShadowApp;
import org.fdroid.fdroid.data.TempAppProvider;
import org.fdroid.fdroid.localrepo.LocalRepoKeyStore;
import org.fdroid.fdroid.localrepo.LocalRepoManager;
import org.fdroid.fdroid.localrepo.LocalRepoService;
import org.fdroid.fdroid.nearby.LocalRepoKeyStore;
import org.fdroid.fdroid.nearby.LocalRepoManager;
import org.fdroid.fdroid.nearby.LocalRepoService;
import org.fdroid.fdroid.net.LocalHTTPD;
import org.junit.After;
import org.junit.Before;