From 1b34bf56c676f8e5a4f6137d5b1ce87a867c1066 Mon Sep 17 00:00:00 2001 From: thyttan <6uuxstm66@mozmail.comā©> Date: Tue, 5 Sep 2023 17:19:53 +0200 Subject: [PATCH] android:say if music msg caused by info or state --- apps/android/ChangeLog | 2 ++ apps/android/boot.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/android/ChangeLog b/apps/android/ChangeLog index 5500b52dd24..1a7b8c345b5 100644 --- a/apps/android/ChangeLog +++ b/apps/android/ChangeLog @@ -33,3 +33,5 @@ 0.31: Implement API for activity fetching 0.32: Set android media volume by supplying a percentage. Forward `musicstate` position information. + Keep track of if music massage event was triggerd my `musicinfo` or + `musicstate`. diff --git a/apps/android/boot.js b/apps/android/boot.js index 00b8681b99a..a6e74663f8b 100644 --- a/apps/android/boot.js +++ b/apps/android/boot.js @@ -49,11 +49,11 @@ }, // {t:"musicstate", state:"play/pause",position,shuffle,repeat} "musicstate" : function() { - require("messages").pushMessage({t:"modify",id:"music",title:"Music",state:event.state,position:event.position}); + require("messages").pushMessage({t:"modify",id:"music",title:"Music",state:event.state,position:event.position,src:event.t}); }, // {t:"musicinfo", artist,album,track,dur,c(track count),n(track num} "musicinfo" : function() { - require("messages").pushMessage(Object.assign(event, {t:"modify",id:"music",title:"Music"})); + require("messages").pushMessage(Object.assign(event, {t:"modify",id:"music",title:"Music",src:event.t})); }, "audio" : ()=>{ Bangle.emit('audio', event.level);