diff options
author | Konsta <konsta09@gmail.com> | 2013-07-16 19:15:42 +0300 |
---|---|---|
committer | Bruno Martins <bgcngm@gmail.com> | 2017-09-14 08:43:54 +0100 |
commit | b1ed7a395db4fe4eed6491171044f7fe467a1334 (patch) | |
tree | a4c7ee87c4d9d8d2cb5822e0ad2b2869955919df /fmapp2/src/com/caf/fmradio/FMRadioService.java | |
parent | d83dc9709547acee0534d89aad2273c74a34f17b (diff) | |
download | android_hardware_qcom_fm-b1ed7a395db4fe4eed6491171044f7fe467a1334.tar.gz android_hardware_qcom_fm-b1ed7a395db4fe4eed6491171044f7fe467a1334.tar.bz2 android_hardware_qcom_fm-b1ed7a395db4fe4eed6491171044f7fe467a1334.zip |
FM2: Revamp notifications
Make FM notifications look like something from this decade. :P
Change-Id: Ib0e310a320c49e92224d8d4fc2fab530ff28d974
Diffstat (limited to 'fmapp2/src/com/caf/fmradio/FMRadioService.java')
-rw-r--r-- | fmapp2/src/com/caf/fmradio/FMRadioService.java | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/fmapp2/src/com/caf/fmradio/FMRadioService.java b/fmapp2/src/com/caf/fmradio/FMRadioService.java index aa18131..aa6bf3f 100644 --- a/fmapp2/src/com/caf/fmradio/FMRadioService.java +++ b/fmapp2/src/com/caf/fmradio/FMRadioService.java @@ -1779,16 +1779,6 @@ public class FMRadioService extends Service public void startNotification() { Log.d(LOGTAG,"startNotification"); - RemoteViews views = new RemoteViews(getPackageName(), R.layout.statusbar); - views.setImageViewResource(R.id.icon, R.drawable.stat_notify_fm); - if (isFmOn()) - { - views.setTextViewText(R.id.frequency, getTunedFrequencyString()); - } else - { - views.setTextViewText(R.id.frequency, ""); - } - Context context = getApplicationContext(); Notification notification; NotificationManager notificationManager = @@ -1801,8 +1791,9 @@ public class FMRadioService extends Service notificationManager.createNotificationChannel(notificationChannel); notification = new Notification.Builder(context, FMRADIO_NOTIFICATION_CHANNEL) - .setCustomContentView(views) .setSmallIcon(R.drawable.stat_notify_fm) + .setContentTitle(isFmOn() ? getString(R.string.app_name) : "") + .setContentText(isFmOn() ? getTunedFrequencyString() : "") .setContentIntent(PendingIntent.getActivity(this, 0, new Intent("com.caf.fmradio.FMRADIO_ACTIVITY"), 0)) .setOngoing(true) |