From c8901b3506ffb2f18798b005552c61b92b9d6a6c Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Sun, 31 Oct 2010 12:16:06 +0000 Subject: Remove the use of the instance field in non-anymore-static methods git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28412 a1c6a512-1295-4272-9138-f99709370657 --- android/src/org/rockbox/RockboxService.java | 34 +++++++++++++---------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/android/src/org/rockbox/RockboxService.java b/android/src/org/rockbox/RockboxService.java index bbcdfec4a7..63ebd27566 100644 --- a/android/src/org/rockbox/RockboxService.java +++ b/android/src/org/rockbox/RockboxService.java @@ -311,30 +311,26 @@ public class RockboxService extends Service public void startForeground() { - if (instance != null) - { - /* - * Send the notification. - * We use a layout id because it is a unique number. - * We use it later to cancel. - */ - instance.mNM.notify(R.string.notification, instance.notification); - /* - * this call makes the service run as foreground, which - * provides enough cpu time to do music decoding in the - * background - */ - instance.startForegroundCompat(R.string.notification, - instance.notification); - } + /* + * Send the notification. + * We use a layout id because it is a unique number. + * We use it later to cancel. + */ + mNM.notify(R.string.notification, instance.notification); + /* + * this call makes the service run as foreground, which + * provides enough cpu time to do music decoding in the + * background + */ + startForegroundCompat(R.string.notification, notification); } public void stopForeground() { - if (instance.notification != null) + if (notification != null) { - instance.stopForegroundCompat(R.string.notification); - instance.mNM.cancel(R.string.notification); + stopForegroundCompat(R.string.notification); + mNM.cancel(R.string.notification); } } -- cgit v1.2.3