global: hardcode tags so that minification doesn't ruin the log
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
fde724a658
commit
456a74db05
@ -35,7 +35,7 @@ import androidx.collection.ArraySet;
|
|||||||
|
|
||||||
@NonNullForAll
|
@NonNullForAll
|
||||||
public final class GoBackend implements Backend {
|
public final class GoBackend implements Backend {
|
||||||
private static final String TAG = "WireGuard/" + GoBackend.class.getSimpleName();
|
private static final String TAG = "WireGuard/GoBackend";
|
||||||
@Nullable private static AlwaysOnCallback alwaysOnCallback;
|
@Nullable private static AlwaysOnCallback alwaysOnCallback;
|
||||||
private static GhettoCompletableFuture<VpnService> vpnService = new GhettoCompletableFuture<>();
|
private static GhettoCompletableFuture<VpnService> vpnService = new GhettoCompletableFuture<>();
|
||||||
private final Context context;
|
private final Context context;
|
||||||
|
@ -41,7 +41,7 @@ import java9.util.stream.Stream;
|
|||||||
|
|
||||||
@NonNullForAll
|
@NonNullForAll
|
||||||
public final class WgQuickBackend implements Backend {
|
public final class WgQuickBackend implements Backend {
|
||||||
private static final String TAG = "WireGuard/" + WgQuickBackend.class.getSimpleName();
|
private static final String TAG = "WireGuard/WgQuickBackend";
|
||||||
private final File localTemporaryDir;
|
private final File localTemporaryDir;
|
||||||
private final RootShell rootShell;
|
private final RootShell rootShell;
|
||||||
private final Map<Tunnel, Config> runningConfigs = new HashMap<>();
|
private final Map<Tunnel, Config> runningConfigs = new HashMap<>();
|
||||||
|
@ -29,7 +29,7 @@ import androidx.annotation.Nullable;
|
|||||||
@NonNullForAll
|
@NonNullForAll
|
||||||
public class RootShell {
|
public class RootShell {
|
||||||
private static final String SU = "su";
|
private static final String SU = "su";
|
||||||
private static final String TAG = "WireGuard/" + RootShell.class.getSimpleName();
|
private static final String TAG = "WireGuard/RootShell";
|
||||||
|
|
||||||
private final File localBinaryDir;
|
private final File localBinaryDir;
|
||||||
private final File localTemporaryDir;
|
private final File localTemporaryDir;
|
||||||
|
@ -27,7 +27,7 @@ import androidx.annotation.RestrictTo.Scope;
|
|||||||
@NonNullForAll
|
@NonNullForAll
|
||||||
@RestrictTo(Scope.LIBRARY_GROUP)
|
@RestrictTo(Scope.LIBRARY_GROUP)
|
||||||
public final class SharedLibraryLoader {
|
public final class SharedLibraryLoader {
|
||||||
private static final String TAG = "WireGuard/" + SharedLibraryLoader.class.getSimpleName();
|
private static final String TAG = "WireGuard/SharedLibraryLoader";
|
||||||
|
|
||||||
private SharedLibraryLoader() {
|
private SharedLibraryLoader() {
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ public final class ToolsInstaller {
|
|||||||
new File("/system/bin"),
|
new File("/system/bin"),
|
||||||
};
|
};
|
||||||
@Nullable private static final File INSTALL_DIR = getInstallDir();
|
@Nullable private static final File INSTALL_DIR = getInstallDir();
|
||||||
private static final String TAG = "WireGuard/" + ToolsInstaller.class.getSimpleName();
|
private static final String TAG = "WireGuard/ToolsInstaller";
|
||||||
|
|
||||||
private final Context context;
|
private final Context context;
|
||||||
private final File localBinaryDir;
|
private final File localBinaryDir;
|
||||||
|
@ -88,7 +88,7 @@ class Application : android.app.Application(), OnSharedPreferenceChangeListener
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val USER_AGENT = String.format(Locale.ENGLISH, "WireGuard/%s (Android %d; %s; %s; %s %s; %s)", BuildConfig.VERSION_NAME, Build.VERSION.SDK_INT, if (Build.SUPPORTED_ABIS.isNotEmpty()) Build.SUPPORTED_ABIS[0] else "unknown ABI", Build.BOARD, Build.MANUFACTURER, Build.MODEL, Build.FINGERPRINT)
|
val USER_AGENT = String.format(Locale.ENGLISH, "WireGuard/%s (Android %d; %s; %s; %s %s; %s)", BuildConfig.VERSION_NAME, Build.VERSION.SDK_INT, if (Build.SUPPORTED_ABIS.isNotEmpty()) Build.SUPPORTED_ABIS[0] else "unknown ABI", Build.BOARD, Build.MANUFACTURER, Build.MODEL, Build.FINGERPRINT)
|
||||||
private val TAG = "WireGuard/${Application::class.simpleName}"
|
private const val TAG = "WireGuard/Application"
|
||||||
private lateinit var weakSelf: WeakReference<Application>
|
private lateinit var weakSelf: WeakReference<Application>
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
@ -29,6 +29,6 @@ class BootShutdownReceiver : BroadcastReceiver() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = "WireGuard/${BootShutdownReceiver::class.simpleName}"
|
private const val TAG = "WireGuard/BootShutdownReceiver"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -153,6 +153,6 @@ class QuickTileService : TileService() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = "WireGuard/${QuickTileService::class.simpleName}"
|
private const val TAG = "WireGuard/QuickTileService"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,6 +39,6 @@ class TunnelToggleActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = "WireGuard/${TunnelToggleActivity::class.simpleName}"
|
private const val TAG = "WireGuard/TunnelToggleActivity"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,6 +77,6 @@ class FileConfigStore(private val context: Context) : ConfigStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = "WireGuard/${FileConfigStore::class.simpleName}"
|
private const val TAG = "WireGuard/FileConfigStore"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,6 +103,6 @@ abstract class BaseFragment : Fragment(), OnSelectedTunnelChangedListener {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val REQUEST_CODE_VPN_PERMISSION = 23491
|
private const val REQUEST_CODE_VPN_PERMISSION = 23491
|
||||||
private val TAG = "WireGuard/${BaseFragment::class.simpleName}"
|
private const val TAG = "WireGuard/BaseFragment"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -229,6 +229,6 @@ class TunnelEditorFragment : BaseFragment(), AppExclusionListener {
|
|||||||
companion object {
|
companion object {
|
||||||
private const val KEY_LOCAL_CONFIG = "local_config"
|
private const val KEY_LOCAL_CONFIG = "local_config"
|
||||||
private const val KEY_ORIGINAL_NAME = "original_name"
|
private const val KEY_ORIGINAL_NAME = "original_name"
|
||||||
private val TAG = "WireGuard/${TunnelEditorFragment::class.simpleName}"
|
private const val TAG = "WireGuard/TunnelEditorFragment"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -397,6 +397,6 @@ class TunnelListFragment : BaseFragment() {
|
|||||||
const val REQUEST_IMPORT = 1
|
const val REQUEST_IMPORT = 1
|
||||||
private const val REQUEST_TARGET_FRAGMENT = 2
|
private const val REQUEST_TARGET_FRAGMENT = 2
|
||||||
private const val CHECKED_ITEMS = "CHECKED_ITEMS"
|
private const val CHECKED_ITEMS = "CHECKED_ITEMS"
|
||||||
private val TAG = "WireGuard/${TunnelListFragment::class.simpleName}"
|
private const val TAG = "WireGuard/TunnelListFragment"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,6 @@ class ZipExporterPreference(context: Context, attrs: AttributeSet?) : Preference
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = "WireGuard/${ZipExporterPreference::class.simpleName}"
|
private const val TAG = "WireGuard/ZipExporterPreference"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,6 @@ enum class ExceptionLoggers(private val priority: Int) : BiConsumer<Any?, Throwa
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private val TAG = "WireGuard/${ExceptionLoggers::class.simpleName}"
|
private const val TAG = "WireGuard/ExceptionLoggers"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user