You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
API stubs and fixes for composeUI
This commit is contained in:
@@ -16,6 +16,14 @@ public class AudioAttributes {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setFlags(int flags) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setLegacyStreamType(int legacy_stream_type) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public AudioAttributes build() {
|
||||
return new AudioAttributes();
|
||||
}
|
||||
|
||||
@@ -10,4 +10,8 @@ public class MediaController {
|
||||
public MediaMetadata getMetadata() {
|
||||
return new MediaMetadata();
|
||||
}
|
||||
|
||||
public CharSequence getQueueTitle() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.util.List;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
import android.media.AudioAttributes;
|
||||
import android.media.MediaDescription;
|
||||
import android.media.MediaMetadata;
|
||||
import android.os.Handler;
|
||||
@@ -54,7 +55,7 @@ public class MediaSession {
|
||||
if (item.id == state.activeQueueItemId) {
|
||||
title = item.description.title.toString();
|
||||
subTitle = item.description.subtitle.toString();
|
||||
artUrl = item.description.iconUri.toString();
|
||||
artUrl = item.description.iconUri == null ? null : item.description.iconUri.toString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -69,6 +70,8 @@ public class MediaSession {
|
||||
|
||||
public void release() {}
|
||||
|
||||
public void setPlaybackToLocal(AudioAttributes audioAttributes) {}
|
||||
|
||||
protected native void nativeSetState(int state, long actions, long position, long updateTime, String title, String subTitle, String artUrl);
|
||||
protected native void nativeSetCallback(Callback callback);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user