mirror of
https://github.com/KDE/kasts.git
synced 2024-12-27 00:43:25 +01:00
Fix signatures and types.
This commit is contained in:
parent
8ffd205296
commit
80187812e1
@ -7,7 +7,7 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="org.kde.kasts"
|
package="org.kde.kasts"
|
||||||
android:versionName="0.0.1"
|
android:versionName="0.0.1"
|
||||||
android:versionCode="1628976728"
|
android:versionCode="1628978137"
|
||||||
android:installLocation="auto">
|
android:installLocation="auto">
|
||||||
|
|
||||||
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
<supports-screens android:largeScreens="true" android:normalScreens="true" android:anyDensity="true" android:smallScreens="true"/>
|
||||||
|
@ -243,7 +243,7 @@ public class KastsActivity extends QtActivity
|
|||||||
activity.updateNotification();
|
activity.updateNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setDuration(int duration)
|
public static void setDuration(long duration)
|
||||||
{
|
{
|
||||||
Log.d(TAG, "JAVA setDuration called.");
|
Log.d(TAG, "JAVA setDuration called.");
|
||||||
mediaData.duration = duration;
|
mediaData.duration = duration;
|
||||||
@ -251,7 +251,7 @@ public class KastsActivity extends QtActivity
|
|||||||
activity.updateNotification();
|
activity.updateNotification();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setPosition(int position)
|
public static void setPosition(long position)
|
||||||
{
|
{
|
||||||
Log.d(TAG, "JAVA setPosition called.");
|
Log.d(TAG, "JAVA setPosition called.");
|
||||||
mediaData.position = position;
|
mediaData.position = position;
|
||||||
|
@ -125,7 +125,7 @@ void MediaSessionClient::setSessionMetadata()
|
|||||||
int rate = m_audioPlayer->playbackRate();
|
int rate = m_audioPlayer->playbackRate();
|
||||||
// Playback rate
|
// Playback rate
|
||||||
|
|
||||||
QAndroidJniObject::callStaticMethod<void>("org/kde/kasts/KastsActivity", "setMetadata","(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JJF)V",title.object<jstring>(), author.object<jstring>(), album.object<jstring>(), position, duration, rate);
|
QAndroidJniObject::callStaticMethod<void>("org/kde/kasts/KastsActivity", "setMetadata","(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;JJF)V",title.object<jstring>(), author.object<jstring>(), album.object<jstring>(), (jlong)position, (jlong)duration, (jfloat)rate);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaSessionClient::setPlaybackRate()
|
void MediaSessionClient::setPlaybackRate()
|
||||||
@ -143,7 +143,7 @@ void MediaSessionClient::setDuration()
|
|||||||
* Sets the media session's playback duration.
|
* Sets the media session's playback duration.
|
||||||
*/
|
*/
|
||||||
qint64 duration = qint64(m_audioPlayer->duration());
|
qint64 duration = qint64(m_audioPlayer->duration());
|
||||||
QAndroidJniObject::callStaticMethod<void>("org/kde/kasts/KastsActivity", "setDuration", "(I)V", duration);
|
QAndroidJniObject::callStaticMethod<void>("org/kde/kasts/KastsActivity", "setDuration", "(J)V", (jlong)duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MediaSessionClient::setPosition()
|
void MediaSessionClient::setPosition()
|
||||||
@ -152,5 +152,5 @@ void MediaSessionClient::setPosition()
|
|||||||
* Sets the media session's current playback position.
|
* Sets the media session's current playback position.
|
||||||
*/
|
*/
|
||||||
qint64 position = qint64(m_audioPlayer->position());
|
qint64 position = qint64(m_audioPlayer->position());
|
||||||
QAndroidJniObject::callStaticMethod<void>("org/kde/kasts/KastsActivity", "setPosition", "(I)V", position);
|
QAndroidJniObject::callStaticMethod<void>("org/kde/kasts/KastsActivity", "setPosition", "(J)V", (jlong)position);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user