summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Ferreira <defer@cyngn.com>2016-05-03 18:12:01 +0100
committerRicardo Cerqueira <ricardo@cyngn.com>2016-05-03 18:34:17 +0100
commit5b02acacc349b742415a9710e5a7086b1948887d (patch)
treec704c3a19e5e1a250843898404cb2e870c197dd8
parentb51931ecd0392a19f0eafd05993d20a75d24cf93 (diff)
downloadandroid_packages_apps_FMRadio-5b02acacc349b742415a9710e5a7086b1948887d.tar.gz
android_packages_apps_FMRadio-5b02acacc349b742415a9710e5a7086b1948887d.tar.bz2
android_packages_apps_FMRadio-5b02acacc349b742415a9710e5a7086b1948887d.zip
fmradio: Add an optional static library target
FMRadio is not exposed as a framework functionality and this makes it harder to expose it to some use cases such as testing. This patch turns the non-ui components of the app into a static library that can be linked by other apps. Change-Id: Ifafd105461303cbaea5f1e788e1c0af95ad894c9
-rw-r--r--Android.mk6
-rw-r--r--src/com/android/fmradio/FmService.java2
2 files changed, 7 insertions, 1 deletions
diff --git a/Android.mk b/Android.mk
index cf84236..1fc1a34 100644
--- a/Android.mk
+++ b/Android.mk
@@ -15,6 +15,12 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
+LOCAL_MODULE := FMRadio_static
+LOCAL_SRC_FILES := $(filter-out src/com/android/fmradio/%Activity.java src/com/android/fmradio/dialogs/% src/com/android/fmradio/views/%, $(call all-java-files-under, src))
+LOCAL_RESOURCE_DIR = $(LOCAL_PATH)/res
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+include $(CLEAR_VARS)
LOCAL_MODULE_TAGS := optional
LOCAL_CERTIFICATE := platform
diff --git a/src/com/android/fmradio/FmService.java b/src/com/android/fmradio/FmService.java
index d5297a5..c53ebb0 100644
--- a/src/com/android/fmradio/FmService.java
+++ b/src/com/android/fmradio/FmService.java
@@ -134,7 +134,7 @@ public class FmService extends Service implements FmRecorder.OnRecorderStateChan
// RT String
private String mRtTextString = "";
// Notification target class name
- private String mTargetClassName = FmMainActivity.class.getName();
+ private String mTargetClassName = "com.android.fmradio.FmMainActivity";
// RDS thread use to receive the information send by station
private Thread mRdsThread = null;
// record whether RDS thread exit