Android 10 changes

main
h4h13 2019-12-30 09:44:04 +05:30
parent 09c056f5ca
commit 1a10984307
5 changed files with 6 additions and 4 deletions

View File

@ -4,7 +4,7 @@ apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 28
compileSdkVersion 29
defaultConfig {
minSdkVersion 21
targetSdkVersion 28

View File

@ -17,6 +17,7 @@
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application
android:requestLegacyExternalStorage="true"
android:name=".App"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"

View File

@ -686,7 +686,7 @@ public class MusicService extends Service implements
.build());
}
private void updateMediaSessionMetaData() {
void updateMediaSessionMetaData() {
final Song song = getCurrentSong();
if (song.getId() == -1) {
@ -1047,7 +1047,6 @@ public class MusicService extends Service implements
try {
int newPosition = playback.seek(millis);
throttledSeekHandler.notifySeek();
updateMediaSessionPlaybackState();
return newPosition;
} catch (Exception e) {
return -1;

View File

@ -25,6 +25,8 @@ class ThrottledSeekHandler(
) : Runnable {
fun notifySeek() {
musicService.updateMediaSessionPlaybackState()
musicService.updateMediaSessionMetaData()
handler.removeCallbacks(this)
handler.postDelayed(this, THROTTLE)
}

View File

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.41'
ext.kotlin_version = '1.3.61'
repositories {
jcenter()
google()