diff options
author | Joey Rizzoli <joey@cyanogenmoditalia.it> | 2016-10-04 20:57:46 +0200 |
---|---|---|
committer | Joey Rizzoli <joey@cyanogenmoditalia.it> | 2016-10-04 21:00:32 +0200 |
commit | b0440b109ad0edd926db5a06fd0827da305ce9ba (patch) | |
tree | c49ac9cec3592b0f7d16c39c2540c066a9697b3c | |
parent | 1f5e945878e9a590c0f531ccb4cad28a167382a2 (diff) | |
download | android_packages_apps_FMRadio-cm-14.0.tar.gz android_packages_apps_FMRadio-cm-14.0.tar.bz2 android_packages_apps_FMRadio-cm-14.0.zip |
FMRadio: set notification actions textcm-14.0
Change-Id: I425bc065f74e89b070ae3b4f4cd4fb362f8c04de
Signed-off-by: Joey Rizzoli <joey@cyanogenmoditalia.it>
-rw-r--r-- | res/values/cm_strings.xml | 21 | ||||
-rw-r--r-- | src/com/android/fmradio/FmService.java | 9 |
2 files changed, 27 insertions, 3 deletions
diff --git a/res/values/cm_strings.xml b/res/values/cm_strings.xml new file mode 100644 index 0000000..627ea98 --- /dev/null +++ b/res/values/cm_strings.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2016 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources> + <string name="notif_previous">Previous</string> + <string name="notif_stop">Stop</string> + <string name="notif_next">Next</string> +</resources> diff --git a/src/com/android/fmradio/FmService.java b/src/com/android/fmradio/FmService.java index f6e98c3..c336397 100644 --- a/src/com/android/fmradio/FmService.java +++ b/src/com/android/fmradio/FmService.java @@ -1826,15 +1826,18 @@ public class FmService extends Service implements FmRecorder.OnRecorderStateChan Intent intent = new Intent(FM_SEEK_PREVIOUS); intent.setClass(mContext, FmService.class); PendingIntent pIntent = PendingIntent.getService(mContext, 0, intent, 0); - mNotificationBuilder.addAction(R.drawable.btn_fm_prevstation, "", pIntent); + mNotificationBuilder.addAction(R.drawable.btn_fm_prevstation, + getString(R.string.notif_previous), pIntent); intent = new Intent(FM_TURN_OFF); intent.setClass(mContext, FmService.class); pIntent = PendingIntent.getService(mContext, 0, intent, 0); - mNotificationBuilder.addAction(R.drawable.btn_fm_rec_stop_enabled, "", pIntent); + mNotificationBuilder.addAction(R.drawable.btn_fm_rec_stop_enabled, + getString(R.string.notif_stop), pIntent); intent = new Intent(FM_SEEK_NEXT); intent.setClass(mContext, FmService.class); pIntent = PendingIntent.getService(mContext, 0, intent, 0); - mNotificationBuilder.addAction(R.drawable.btn_fm_nextstation, "", pIntent); + mNotificationBuilder.addAction(R.drawable.btn_fm_nextstation, + getString(R.string.notif_next) , pIntent); } mNotificationBuilder.setContentIntent(pAIntent); Bitmap largeIcon = FmUtils.createNotificationLargeIcon(mContext, |