Skip to content

Commit

Permalink
Various tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleangels committed Jan 5, 2025
1 parent 0dc2b5b commit 9b45a77
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 30 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
minSdkVersion 32
targetSdk 35
versionCode 234
versionName '5.3.1'
versionName '5.4.0'
resourceConfigurations += ["en", "zh", "nl", "fi", "fr", "de", "in", "it", "ja", "pl", "pt", "es", "sv", "tr"]
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.doubleangels.nextdnsmanagement;

import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.net.Uri;
import android.os.Bundle;
Expand All @@ -14,7 +13,6 @@
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.lifecycle.LifecycleOwner;
import androidx.preference.PreferenceManager;

import com.doubleangels.nextdnsmanagement.protocol.VisualIndicator;
import com.doubleangels.nextdnsmanagement.sentry.SentryInitializer;
Expand All @@ -32,8 +30,6 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_author);
// Initialize SentryManager
sentryManager = new SentryManager(this);
// Get shared preferences
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
try {
// Check if Sentry is enabled and initialize
if (sentryManager.isEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ public class MainActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
if (ProcessPhoenix.isPhoenixProcess(this)) {
return;
} else {
if (!ProcessPhoenix.isPhoenixProcess(this)) {
// Initialize SentryManager for error tracking
SentryManager sentryManager = new SentryManager(this);
// Get SharedPreferences for storing app preferences
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.doubleangels.nextdnsmanagement;

import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PermissionInfo;
Expand All @@ -17,7 +16,6 @@
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.lifecycle.LifecycleOwner;
import androidx.preference.PreferenceManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

Expand All @@ -41,8 +39,6 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_permission);
// Initialize SentryManager for error tracking
sentryManager = new SentryManager(this);
// Get SharedPreferences for storing app preferences
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
try {
// Check if Sentry is enabled and initialize it
if (sentryManager.isEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.ContextThemeWrapper;
Expand All @@ -15,7 +14,6 @@
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.lifecycle.LifecycleOwner;
import androidx.preference.PreferenceManager;

import com.doubleangels.nextdnsmanagement.protocol.VisualIndicator;
import com.doubleangels.nextdnsmanagement.sentry.SentryInitializer;
Expand All @@ -38,8 +36,6 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_ping);
// Initialize SentryManager for error tracking
sentryManager = new SentryManager(this);
// Get SharedPreferences for storing app preferences
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
try {
// Check if Sentry is enabled and initialize it
if (sentryManager.isEnabled()) {
Expand Down Expand Up @@ -114,7 +110,6 @@ private void setupWebView(WebView webView) {
settings.setCacheMode(WebSettings.LOAD_DEFAULT);
settings.setAllowFileAccess(false);
settings.setAllowContentAccess(false);
settings.setAllowUniversalAccessFromFileURLs(false);
webView.setWebViewClient(new WebViewClient());
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.doubleangels.nextdnsmanagement;

import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.ContextThemeWrapper;
Expand All @@ -12,7 +11,6 @@
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.lifecycle.LifecycleOwner;
import androidx.preference.PreferenceManager;

import com.doubleangels.nextdnsmanagement.protocol.VisualIndicator;
import com.doubleangels.nextdnsmanagement.sentry.SentryInitializer;
Expand All @@ -32,8 +30,6 @@ protected void onCreate(Bundle savedInstanceState) {
setContentView(R.layout.activity_status);
// Initialize SentryManager for error tracking
sentryManager = new SentryManager(this);
// Get SharedPreferences for storing app preferences
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
try {
// Check if Sentry is enabled and initialize it
if (sentryManager.isEnabled()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ public void captureMessage(String message) {
}
}

// Method to set a tag for Sentry events
public void setTag(String key, String value) {
// Check if Sentry is enabled
if (isEnabled()) {
// Set a tag for Sentry events
Sentry.setTag(key, value);
}
}

// Method to check if Sentry is enabled in app preferences
public boolean isEnabled() {
// Get default SharedPreferences instance
Expand Down

0 comments on commit 9b45a77

Please sign in to comment.