big refactor
This commit is contained in:
parent
6658101dd9
commit
d28db41782
|
@ -137,7 +137,7 @@
|
|||
</receiver>
|
||||
|
||||
<activity
|
||||
android:name=".ui.hs.HiddenServicesActivity"
|
||||
android:name=".ui.hiddenservices.HiddenServicesActivity"
|
||||
android:label="@string/title_activity_hidden_services"
|
||||
android:theme="@style/DefaultTheme" >
|
||||
<meta-data
|
||||
|
@ -146,13 +146,13 @@
|
|||
</activity>
|
||||
|
||||
<provider
|
||||
android:name=".ui.hs.providers.HSContentProvider"
|
||||
android:name=".ui.hiddenservices.providers.HSContentProvider"
|
||||
android:exported="false"
|
||||
android:authorities="org.torproject.android.ui.hs.providers" />
|
||||
android:authorities="org.torproject.android.ui.hiddenservices.providers" />
|
||||
|
||||
<provider
|
||||
android:name="org.torproject.android.storage.AppDataProvider"
|
||||
android:authorities="org.torproject.android.storage"
|
||||
android:name=".ui.hiddenservices.storage.AppDataProvider"
|
||||
android:authorities="org.torproject.android.ui.hiddenservices.storage"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
|
|
|
@ -23,13 +23,13 @@ import org.torproject.android.service.TorServiceConstants;
|
|||
import org.torproject.android.service.util.TorServiceUtils;
|
||||
import org.torproject.android.settings.SettingsPreferences;
|
||||
import org.torproject.android.ui.AppManager;
|
||||
import org.torproject.android.ui.hs.HiddenServicesActivity;
|
||||
import org.torproject.android.ui.hiddenservices.HiddenServicesActivity;
|
||||
import org.torproject.android.ui.ImageProgressView;
|
||||
import org.torproject.android.ui.PromoAppsActivity;
|
||||
import org.torproject.android.ui.Rotate3dAnimation;
|
||||
import org.torproject.android.ui.hs.providers.HSContentProvider;
|
||||
import org.torproject.android.ui.hiddenservices.providers.HSContentProvider;
|
||||
import org.torproject.android.vpn.VPNEnableActivity;
|
||||
import org.torproject.android.backup.BackupUtils;
|
||||
import org.torproject.android.ui.hiddenservices.backup.BackupUtils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.ActivityManager;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.ui.hs;
|
||||
package org.torproject.android.ui.hiddenservices;
|
||||
|
||||
|
||||
import android.content.ContentResolver;
|
||||
|
@ -16,12 +16,12 @@ import android.widget.ListView;
|
|||
import android.widget.TextView;
|
||||
|
||||
import org.torproject.android.R;
|
||||
import org.torproject.android.storage.PermissionManager;
|
||||
import org.torproject.android.ui.hs.adapters.OnionListAdapter;
|
||||
import org.torproject.android.ui.hs.dialogs.HSActionsDialog;
|
||||
import org.torproject.android.ui.hs.dialogs.HSDataDialog;
|
||||
import org.torproject.android.ui.hs.dialogs.SelectBackupDialog;
|
||||
import org.torproject.android.ui.hs.providers.HSContentProvider;
|
||||
import org.torproject.android.ui.hiddenservices.storage.PermissionManager;
|
||||
import org.torproject.android.ui.hiddenservices.adapters.OnionListAdapter;
|
||||
import org.torproject.android.ui.hiddenservices.dialogs.HSActionsDialog;
|
||||
import org.torproject.android.ui.hiddenservices.dialogs.HSDataDialog;
|
||||
import org.torproject.android.ui.hiddenservices.dialogs.SelectBackupDialog;
|
||||
import org.torproject.android.ui.hiddenservices.providers.HSContentProvider;
|
||||
|
||||
public class HiddenServicesActivity extends AppCompatActivity {
|
||||
private ContentResolver mCR;
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.ui.hs.adapters;
|
||||
package org.torproject.android.ui.hiddenservices.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.ui.hs.adapters;
|
||||
package org.torproject.android.ui.hiddenservices.adapters;
|
||||
|
||||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
|
@ -9,7 +9,7 @@ import android.view.ViewGroup;
|
|||
import android.widget.TextView;
|
||||
|
||||
import org.torproject.android.R;
|
||||
import org.torproject.android.ui.hs.providers.HSContentProvider;
|
||||
import org.torproject.android.ui.hiddenservices.providers.HSContentProvider;
|
||||
|
||||
public class OnionListAdapter extends CursorAdapter {
|
||||
private LayoutInflater cursorInflater;
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.backup;
|
||||
package org.torproject.android.ui.hiddenservices.backup;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
|
@ -6,7 +6,7 @@ import android.widget.Toast;
|
|||
|
||||
import org.torproject.android.service.R;
|
||||
import org.torproject.android.service.TorServiceConstants;
|
||||
import org.torproject.android.storage.ExternalStorage;
|
||||
import org.torproject.android.ui.hiddenservices.storage.ExternalStorage;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.backup;
|
||||
package org.torproject.android.ui.hiddenservices.backup;
|
||||
|
||||
|
||||
import java.io.BufferedInputStream;
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.ui.hs.database;
|
||||
package org.torproject.android.ui.hiddenservices.database;
|
||||
|
||||
|
||||
import android.content.Context;
|
|
@ -1,20 +1,14 @@
|
|||
package org.torproject.android.ui.hs.dialogs;
|
||||
package org.torproject.android.ui.hiddenservices.dialogs;
|
||||
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Dialog;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v7.app.AlertDialog;
|
||||
import android.view.View;
|
||||
|
@ -22,9 +16,9 @@ import android.widget.Button;
|
|||
import android.widget.Toast;
|
||||
|
||||
import org.torproject.android.R;
|
||||
import org.torproject.android.backup.BackupUtils;
|
||||
import org.torproject.android.storage.PermissionManager;
|
||||
import org.torproject.android.ui.hs.providers.HSContentProvider;
|
||||
import org.torproject.android.ui.hiddenservices.backup.BackupUtils;
|
||||
import org.torproject.android.ui.hiddenservices.storage.PermissionManager;
|
||||
import org.torproject.android.ui.hiddenservices.providers.HSContentProvider;
|
||||
|
||||
public class HSActionsDialog extends DialogFragment {
|
||||
public final int PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE = 1;
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.ui.hs.dialogs;
|
||||
package org.torproject.android.ui.hiddenservices.dialogs;
|
||||
|
||||
|
||||
import android.app.Dialog;
|
||||
|
@ -14,7 +14,7 @@ import android.widget.EditText;
|
|||
import android.widget.Toast;
|
||||
|
||||
import org.torproject.android.R;
|
||||
import org.torproject.android.ui.hs.providers.HSContentProvider;
|
||||
import org.torproject.android.ui.hiddenservices.providers.HSContentProvider;
|
||||
|
||||
public class HSDataDialog extends DialogFragment {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.ui.hs.dialogs;
|
||||
package org.torproject.android.ui.hiddenservices.dialogs;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -11,8 +11,8 @@ import android.widget.AdapterView;
|
|||
import android.widget.ListView;
|
||||
|
||||
import org.torproject.android.R;
|
||||
import org.torproject.android.storage.ExternalStorage;
|
||||
import org.torproject.android.ui.hs.adapters.BackupAdapter;
|
||||
import org.torproject.android.ui.hiddenservices.storage.ExternalStorage;
|
||||
import org.torproject.android.ui.hiddenservices.adapters.BackupAdapter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.ui.hs.providers;
|
||||
package org.torproject.android.ui.hiddenservices.providers;
|
||||
|
||||
import android.content.ContentProvider;
|
||||
import android.content.ContentUris;
|
||||
|
@ -12,11 +12,11 @@ import android.provider.BaseColumns;
|
|||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import org.torproject.android.ui.hs.database.HSDatabase;
|
||||
import org.torproject.android.ui.hiddenservices.database.HSDatabase;
|
||||
|
||||
|
||||
public class HSContentProvider extends ContentProvider {
|
||||
private static final String AUTH = "org.torproject.android.ui.hs.providers";
|
||||
private static final String AUTH = "org.torproject.android.ui.hiddenservices.providers";
|
||||
public static final Uri CONTENT_URI =
|
||||
Uri.parse("content://" + AUTH + "/hs");
|
||||
//UriMatcher
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.storage;
|
||||
package org.torproject.android.ui.hiddenservices.storage;
|
||||
|
||||
|
||||
import android.app.Application;
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.storage;
|
||||
package org.torproject.android.ui.hiddenservices.storage;
|
||||
|
||||
import android.os.Environment;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.torproject.android.storage;
|
||||
package org.torproject.android.ui.hiddenservices.storage;
|
||||
|
||||
|
||||
import android.Manifest;
|
|
@ -5,7 +5,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true"
|
||||
tools:context="org.torproject.android.ui.hs.HiddenServicesActivity">
|
||||
tools:context="org.torproject.android.ui.hiddenservices.HiddenServicesActivity">
|
||||
|
||||
<android.support.design.widget.AppBarLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:context="org.torproject.android.ui.hs.HiddenServicesActivity"
|
||||
tools:context="org.torproject.android.ui.hiddenservices.HiddenServicesActivity"
|
||||
tools:showIn="@layout/layout_hs_list_view">
|
||||
|
||||
<ListView
|
||||
|
|
|
@ -132,7 +132,7 @@ public class TorService extends Service implements TorServiceConstants, OrbotCon
|
|||
private Shell mShellPolipo;
|
||||
|
||||
|
||||
private static final Uri CONTENT_URI = Uri.parse("content://org.torproject.android.ui.hs.providers/hs");
|
||||
private static final Uri CONTENT_URI = Uri.parse("content://org.torproject.android.ui.hiddenservices.providers/hs");
|
||||
|
||||
public static final class HiddenService implements BaseColumns {
|
||||
public static final String NAME = "name";
|
||||
|
|
Loading…
Reference in New Issue