diff options
author | Thomas Martitz <kugel@rockbox.org> | 2010-10-31 12:16:06 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2010-10-31 12:16:06 +0000 |
commit | c8901b3506ffb2f18798b005552c61b92b9d6a6c (patch) | |
tree | 998870c94248805abef88ca3a478e9173c87d412 /android | |
parent | bf63f241681ee5d09496444e711979dbad09419f (diff) | |
download | rockbox-c8901b3506ffb2f18798b005552c61b92b9d6a6c.tar.gz rockbox-c8901b3506ffb2f18798b005552c61b92b9d6a6c.zip |
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
Diffstat (limited to 'android')
-rw-r--r-- | android/src/org/rockbox/RockboxService.java | 34 |
1 files 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 | |||
311 | 311 | ||
312 | public void startForeground() | 312 | public void startForeground() |
313 | { | 313 | { |
314 | if (instance != null) | 314 | /* |
315 | { | 315 | * Send the notification. |
316 | /* | 316 | * We use a layout id because it is a unique number. |
317 | * Send the notification. | 317 | * We use it later to cancel. |
318 | * We use a layout id because it is a unique number. | 318 | */ |
319 | * We use it later to cancel. | 319 | mNM.notify(R.string.notification, instance.notification); |
320 | */ | 320 | /* |
321 | instance.mNM.notify(R.string.notification, instance.notification); | 321 | * this call makes the service run as foreground, which |
322 | /* | 322 | * provides enough cpu time to do music decoding in the |
323 | * this call makes the service run as foreground, which | 323 | * background |
324 | * provides enough cpu time to do music decoding in the | 324 | */ |
325 | * background | 325 | startForegroundCompat(R.string.notification, notification); |
326 | */ | ||
327 | instance.startForegroundCompat(R.string.notification, | ||
328 | instance.notification); | ||
329 | } | ||
330 | } | 326 | } |
331 | 327 | ||
332 | public void stopForeground() | 328 | public void stopForeground() |
333 | { | 329 | { |
334 | if (instance.notification != null) | 330 | if (notification != null) |
335 | { | 331 | { |
336 | instance.stopForegroundCompat(R.string.notification); | 332 | stopForegroundCompat(R.string.notification); |
337 | instance.mNM.cancel(R.string.notification); | 333 | mNM.cancel(R.string.notification); |
338 | } | 334 | } |
339 | } | 335 | } |
340 | 336 | ||