aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/github/daneren2005
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/github/daneren2005')
-rw-r--r--app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java4
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/EnvironmentVariables.java4
-rw-r--r--app/src/main/java/github/daneren2005/dsub/util/compat/CastCompat.java3
3 files changed, 9 insertions, 2 deletions
diff --git a/app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java b/app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java
index 82e50b76..e7c7f1fb 100644
--- a/app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java
+++ b/app/src/main/java/github/daneren2005/dsub/fragments/MainFragment.java
@@ -270,6 +270,10 @@ public class MainFragment extends SelectRecyclerFragment<Integer> {
}
private void getLogs() {
+ if (EnvironmentVariables.PASTEBIN_DEV_KEY == null) {
+ Util.toast(context, "No PASTEBIN_DEV_KEY configured - can't upload logs");
+ return;
+ }
try {
final PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
new LoadingTask<String>(context) {
diff --git a/app/src/main/java/github/daneren2005/dsub/util/EnvironmentVariables.java b/app/src/main/java/github/daneren2005/dsub/util/EnvironmentVariables.java
index 710d5232..8af74f07 100644
--- a/app/src/main/java/github/daneren2005/dsub/util/EnvironmentVariables.java
+++ b/app/src/main/java/github/daneren2005/dsub/util/EnvironmentVariables.java
@@ -16,6 +16,6 @@
package github.daneren2005.dsub.util;
public final class EnvironmentVariables {
- public static final String PASTEBIN_DEV_KEY = "";
- public static final String CAST_APPLICATION_ID = "";
+ public static final String PASTEBIN_DEV_KEY = null;
+ public static final String CAST_APPLICATION_ID = null;
}
diff --git a/app/src/main/java/github/daneren2005/dsub/util/compat/CastCompat.java b/app/src/main/java/github/daneren2005/dsub/util/compat/CastCompat.java
index 415106db..08bac263 100644
--- a/app/src/main/java/github/daneren2005/dsub/util/compat/CastCompat.java
+++ b/app/src/main/java/github/daneren2005/dsub/util/compat/CastCompat.java
@@ -27,6 +27,9 @@ import github.daneren2005.dsub.util.EnvironmentVariables;
public final class CastCompat {
static {
+ if (EnvironmentVariables.CAST_APPLICATION_ID == null) {
+ throw new RuntimeException("CAST_APPLICATION_ID not provided");
+ }
try {
Class.forName("com.google.android.gms.cast.CastDevice");
} catch (Exception ex) {