Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize the app file tree for clarity #1160

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,32 +66,32 @@
android:label="@string/title_choose_apps"/>

<activity
android:name=".ui.v3onionservice.OnionServiceActivity"
android:name=".v3onionservice.OnionServiceActivity"
android:label="@string/hidden_services">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".OrbotActivity" />
</activity>

<activity android:name=".ui.v3onionservice.clientauth.ClientAuthActivity"
<activity android:name=".v3onionservice.clientauth.ClientAuthActivity"
android:label="@string/v3_client_auth_activity_title">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".OrbotActivity"/>
</activity>

<activity
android:name=".ui.onboarding.CustomBridgesActivity"
android:name=".onboarding.CustomBridgesActivity"
android:label="@string/use_custom_bridges" />

<provider
android:name=".ui.v3onionservice.OnionServiceContentProvider"
android:name=".v3onionservice.OnionServiceContentProvider"
android:authorities="${applicationId}.ui.v3onionservice"
android:exported="false" />

<provider
android:authorities="${applicationId}.ui.v3onionservice.clientauth"
android:name=".ui.v3onionservice.clientauth.ClientAuthContentProvider"
android:name=".v3onionservice.clientauth.ClientAuthContentProvider"
android:exported="false"/>

<receiver
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/org/torproject/android/OrbotActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ import androidx.navigation.findNavController
import androidx.navigation.ui.setupWithNavController
import com.google.android.material.bottomnavigation.BottomNavigationView
import com.scottyab.rootbeer.RootBeer
import org.torproject.android.connection.ConnectFragment
import org.torproject.android.core.LocaleHelper
import org.torproject.android.core.putNotSystem
import org.torproject.android.core.ui.BaseActivity
import org.torproject.android.more.MoreFragment
import org.torproject.android.service.OrbotConstants
import org.torproject.android.service.util.Prefs
import org.torproject.android.ui.LogBottomSheet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package org.torproject.android.circumvention
import IPtProxy.IPtProxy
import okhttp3.OkHttpClient
import org.torproject.android.service.OrbotService
import org.torproject.android.ui.onboarding.ProxiedHurlStack
import org.torproject.android.onboarding.ProxiedHurlStack
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android
package org.torproject.android.connection

import IPtProxy.IPtProxy
import IPtProxy.OnTransportStopped
Expand All @@ -14,6 +14,8 @@ import android.widget.CompoundButton
import android.widget.RadioButton
import android.widget.Toast
import androidx.appcompat.content.res.AppCompatResources
import org.torproject.android.OrbotBottomSheetDialogFragment
import org.torproject.android.R
import org.torproject.android.circumvention.Bridges
import org.torproject.android.circumvention.CircumventionApiManager
import org.torproject.android.circumvention.SettingsRequest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android
package org.torproject.android.connection

import android.app.Activity
import android.content.Context
Expand All @@ -23,6 +23,8 @@ import androidx.fragment.app.Fragment

import net.freehaven.tor.control.TorControlCommands

import org.torproject.android.OrbotActivity
import org.torproject.android.R
import org.torproject.android.core.NetworkUtils.isNetworkAvailable
import org.torproject.android.core.putNotSystem
import org.torproject.android.service.OrbotConstants
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android
package org.torproject.android.connection

interface ConnectionHelperCallbacks {
fun tryConnecting()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package org.torproject.android
package org.torproject.android.connection

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import android.widget.EditText
import org.torproject.android.OrbotBottomSheetDialogFragment
import org.torproject.android.R
import org.torproject.android.service.util.Prefs

class CustomBridgeBottomSheet(private val callbacks: ConnectionHelperCallbacks) :
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package org.torproject.android
package org.torproject.android.connection

import android.app.AlertDialog
import android.app.Dialog
import android.os.Bundle
import androidx.fragment.app.DialogFragment
import org.torproject.android.R
import org.torproject.android.service.util.Prefs
import org.torproject.android.service.util.Utils
import java.text.Collator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android
package org.torproject.android.connection

import IPtProxy.Controller
import IPtProxy.IPtProxy
Expand All @@ -25,10 +25,11 @@ import com.android.volley.toolbox.JsonObjectRequest
import com.android.volley.toolbox.Volley
import org.json.JSONException
import org.json.JSONObject
import org.torproject.android.OrbotBottomSheetDialogFragment
import org.torproject.android.R
import org.torproject.android.service.OrbotService
import org.torproject.android.service.util.Prefs
import org.torproject.android.service.util.TCPSourceApp.getApplicationInfo
import org.torproject.android.ui.onboarding.ProxiedHurlStack
import org.torproject.android.onboarding.ProxiedHurlStack
import java.io.File


Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package org.torproject.android
package org.torproject.android.kindness

import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.Button
import androidx.appcompat.widget.SwitchCompat
import org.torproject.android.OrbotBottomSheetDialogFragment
import org.torproject.android.R
import org.torproject.android.service.util.Prefs

class KindessConfigBottomSheet : OrbotBottomSheetDialogFragment() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android
package org.torproject.android.kindness

import android.content.Intent
import android.os.Bundle
Expand All @@ -10,6 +10,8 @@ import android.widget.Button
import android.widget.TextView
import androidx.appcompat.widget.SwitchCompat
import androidx.core.content.ContextCompat
import org.torproject.android.R
import org.torproject.android.connection.CustomBridgeBottomSheet
import org.torproject.android.core.putNotSystem
import org.torproject.android.service.OrbotConstants
import org.torproject.android.service.OrbotService
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui
package org.torproject.android.more

import android.app.AlertDialog
import android.app.Dialog
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package org.torproject.android.ui
package org.torproject.android.more

import android.content.Context
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.*
import org.torproject.android.R
import org.torproject.android.ui.OrbotMenuAction
import java.util.*


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android
package org.torproject.android.more

import android.app.Activity
import android.content.Intent
Expand All @@ -11,15 +11,17 @@ import android.widget.ListView
import android.widget.TextView
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import org.torproject.android.OrbotActivity
import org.torproject.android.OrbotActivity.Companion.REQUEST_CODE_SETTINGS
import org.torproject.android.OrbotActivity.Companion.REQUEST_VPN_APP_SELECT
import org.torproject.android.R
import org.torproject.android.core.putNotSystem
import org.torproject.android.core.ui.SettingsActivity
import org.torproject.android.service.OrbotConstants
import org.torproject.android.service.OrbotService
import org.torproject.android.ui.*
import org.torproject.android.ui.v3onionservice.OnionServiceActivity
import org.torproject.android.ui.v3onionservice.clientauth.ClientAuthActivity
import org.torproject.android.v3onionservice.OnionServiceActivity
import org.torproject.android.v3onionservice.clientauth.ClientAuthActivity

class MoreFragment : Fragment() {
private lateinit var lvMore: ListView
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright (c) 2020, Benjamin Erhart, Orbot / The Guardian Project - https://guardianproject.info */
/* See LICENSE for licensing information */
package org.torproject.android.ui.onboarding;
package org.torproject.android.onboarding;

import android.annotation.SuppressLint;
import android.content.Intent;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright (c) 2020, Benjamin Erhart, Orbot / The Guardian Project - https://guardianproject.info */
/* See LICENSE for licensing information */
package org.torproject.android.ui.onboarding
package org.torproject.android.onboarding

import android.util.Log

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice;
package org.torproject.android.v3onionservice;

import android.app.Activity;
import android.app.Dialog;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice;
package org.torproject.android.v3onionservice;

import android.content.ContentResolver;
import android.content.Context;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice;
package org.torproject.android.v3onionservice;

import android.content.ContentProvider;
import android.content.ContentUris;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice;
package org.torproject.android.v3onionservice;

import android.app.Dialog;
import android.content.ContentResolver;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice;
package org.torproject.android.v3onionservice;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice
package org.torproject.android.v3onionservice

import android.app.Dialog
import android.content.Context
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice;
package org.torproject.android.v3onionservice;

import android.content.ContentResolver;
import android.content.ContentValues;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice
package org.torproject.android.v3onionservice

import android.content.Context
import android.content.Intent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice;
package org.torproject.android.v3onionservice;

import android.content.ContentResolver;
import android.content.ContentValues;
Expand All @@ -14,7 +14,7 @@
import org.torproject.android.R;
import org.torproject.android.service.OrbotConstants;
import org.torproject.android.service.OrbotService;
import org.torproject.android.ui.v3onionservice.clientauth.ClientAuthContentProvider;
import org.torproject.android.v3onionservice.clientauth.ClientAuthContentProvider;

import java.io.File;
import java.io.FileInputStream;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice;
package org.torproject.android.v3onionservice;

import android.content.ContentResolver;
import android.net.Uri;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice.clientauth;
package org.torproject.android.v3onionservice.clientauth;

import android.app.AlertDialog;
import android.app.Dialog;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice.clientauth;
package org.torproject.android.v3onionservice.clientauth;

import android.content.ContentResolver;
import android.content.Context;
Expand All @@ -22,7 +22,7 @@
import org.torproject.android.R;
import org.torproject.android.core.DiskUtils;
import org.torproject.android.core.LocaleHelper;
import org.torproject.android.ui.v3onionservice.V3BackupUtils;
import org.torproject.android.v3onionservice.V3BackupUtils;

import java.util.List;
import java.util.Objects;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice.clientauth;
package org.torproject.android.v3onionservice.clientauth;

import android.app.Activity;
import android.app.AlertDialog;
Expand All @@ -20,7 +20,7 @@
import org.torproject.android.R;
import org.torproject.android.core.DiskUtils;
import org.torproject.android.core.ui.NoPersonalizedLearningEditText;
import org.torproject.android.ui.v3onionservice.V3BackupUtils;
import org.torproject.android.v3onionservice.V3BackupUtils;

import java.util.Objects;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice.clientauth;
package org.torproject.android.v3onionservice.clientauth;

import android.content.ContentProvider;
import android.content.ContentUris;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice.clientauth;
package org.torproject.android.v3onionservice.clientauth;

import android.app.AlertDialog;
import android.app.Dialog;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice.clientauth;
package org.torproject.android.v3onionservice.clientauth;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice.clientauth;
package org.torproject.android.v3onionservice.clientauth;

import android.app.AlertDialog;
import android.app.Dialog;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.torproject.android.ui.v3onionservice.clientauth;
package org.torproject.android.v3onionservice.clientauth;

import android.content.ContentResolver;
import android.content.ContentValues;
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_custom_bridges.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/dark_purple"
tools:context=".ui.onboarding.CustomBridgesActivity">
tools:context=".onboarding.CustomBridgesActivity">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_hosted_services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="org.torproject.android.ui.v3onionservice.OnionServiceActivity">
tools:context="org.torproject.android.v3onionservice.OnionServiceActivity">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/activity_v3auth.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
android:layout_height="match_parent"
android:background="@color/new_background"
android:fitsSystemWindows="true"
tools:context="org.torproject.android.ui.v3onionservice.clientauth.ClientAuthActivity">
tools:context="org.torproject.android.v3onionservice.clientauth.ClientAuthActivity">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
Expand Down
Loading