mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-27 20:36:51 +01:00
Revert ""duration" parameter in onSetMusicInfo uses microseconds"
The decision on granularity of APIs is up to the maintainers.
This reverts commit 204748c518
.
This commit is contained in:
parent
204748c518
commit
91f374edec
@ -218,7 +218,7 @@ public class DebugActivity extends GBActivity {
|
||||
musicSpec.artist = editContent.getText().toString() + "(artist)";
|
||||
musicSpec.album = editContent.getText().toString() + "(album)";
|
||||
musicSpec.track = editContent.getText().toString() + "(track)";
|
||||
musicSpec.duration = 10 * 1000;
|
||||
musicSpec.duration = 10;
|
||||
musicSpec.trackCount = 5;
|
||||
musicSpec.trackNr = 2;
|
||||
|
||||
|
@ -380,7 +380,7 @@ public class NotificationListener extends NotificationListenerService {
|
||||
if (d.containsKey(MediaMetadata.METADATA_KEY_TITLE))
|
||||
musicSpec.track = d.getString(MediaMetadata.METADATA_KEY_TITLE);
|
||||
if (d.containsKey(MediaMetadata.METADATA_KEY_DURATION))
|
||||
musicSpec.duration = (int)d.getLong(MediaMetadata.METADATA_KEY_DURATION);
|
||||
musicSpec.duration = (int)d.getLong(MediaMetadata.METADATA_KEY_DURATION) / 1000;
|
||||
|
||||
// finally, tell the device about it
|
||||
GBApplication.deviceService().onSetMusicInfo(musicSpec);
|
||||
|
@ -1159,7 +1159,7 @@ public class PebbleProtocol extends GBDeviceProtocol {
|
||||
}
|
||||
|
||||
buf.order(ByteOrder.LITTLE_ENDIAN);
|
||||
buf.putInt(duration);
|
||||
buf.putInt(duration * 1000);
|
||||
buf.putShort((short) (trackCount & 0xffff));
|
||||
buf.putShort((short) (trackNr & 0xffff));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user