Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Android: Re-attach the media button receiver when entering Rockbox.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29335 a1c6a512-1295-4272-9138-f99709370657

+5 -2
+5 -2
android/src/org/rockbox/RockboxService.java
··· 80 80 public void onCreate() 81 81 { 82 82 instance = this; 83 + mMediaButtonReceiver = new MediaButtonReceiver(this); 83 84 } 84 85 85 86 public static RockboxService get_instance() ··· 145 146 e.printStackTrace(); 146 147 } 147 148 } 149 + /* (Re-)attach the media button receiver, in case it has been lost */ 150 + mMediaButtonReceiver.register(); 151 + 148 152 if (resultReceiver != null) 149 153 resultReceiver.send(RESULT_SERVICE_RUNNING, null); 150 154 } ··· 175 179 fb = new RockboxFramebuffer(this); 176 180 if (resultReceiver != null) 177 181 resultReceiver.send(RESULT_FB_INITIALIZED, null); 178 - mMediaButtonReceiver = new MediaButtonReceiver(this); 179 - mMediaButtonReceiver.register(); 180 182 Thread rb = new Thread(new Runnable() 181 183 { 182 184 public void run() ··· 325 327 { 326 328 super.onDestroy(); 327 329 mMediaButtonReceiver.unregister(); 330 + mMediaButtonReceiver = null; 328 331 /* Make sure our notification is gone. */ 329 332 stopForeground(); 330 333 }