From 28336265e822ab4b2ff1697fd5066fc0cfd88861 Mon Sep 17 00:00:00 2001 From: Carey Metcalfe Date: Fri, 13 Oct 2017 22:34:23 -0400 Subject: Use product flavours to enable builds without proprietary libraries This commit uses build flavours to provide two different builds: A 'floss' build and a 'google' build. - The 'floss' build builds a basic version of the app with no dependencies on proprietary libraries. - The 'google' build adds Chromecast support and a few other extras provided by Google Play Services --- .../daneren2005/dsub/util/compat/GoogleCompat.java | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 app/src/floss/java/github/daneren2005/dsub/util/compat/GoogleCompat.java (limited to 'app/src/floss/java') diff --git a/app/src/floss/java/github/daneren2005/dsub/util/compat/GoogleCompat.java b/app/src/floss/java/github/daneren2005/dsub/util/compat/GoogleCompat.java new file mode 100644 index 00000000..08db4f1c --- /dev/null +++ b/app/src/floss/java/github/daneren2005/dsub/util/compat/GoogleCompat.java @@ -0,0 +1,31 @@ +package github.daneren2005.dsub.util.compat; + +import android.content.Context; +import android.support.v7.media.MediaRouter; + +import github.daneren2005.dsub.service.DownloadService; +import github.daneren2005.dsub.service.RemoteController; + + +// Provides stubs for Google-related functionality +public final class GoogleCompat { + + public static boolean playServicesAvailable(Context context) { + return false; + } + + public static void installProvider(Context context) throws Exception { + } + + public static boolean castAvailable() { + return false; + } + + public static RemoteController getController(DownloadService downloadService, MediaRouter.RouteInfo info) { + return null; + } + + public static String getCastControlCategory() { + return null; + } +} -- cgit v1.2.3