Add title and icon in output switcher panel header

-title shows artist
-subtitle shows album
-add test cases

Bug: 147776885
Test: make -j42 RunSettingsRoboTests
Change-Id: Ib33e5550e668d8cc5d70051ea2e7dd74d61c767a
This commit is contained in:
timhypeng
2020-02-03 14:58:12 +08:00
parent b7f5bf4682
commit 0c4db3170d
6 changed files with 207 additions and 16 deletions

View File

@@ -19,6 +19,8 @@ package com.android.settings.panel;
import android.content.Intent;
import android.net.Uri;
import androidx.core.graphics.drawable.IconCompat;
import com.android.settingslib.core.instrumentation.Instrumentable;
import java.util.List;
@@ -28,13 +30,11 @@ import java.util.List;
*/
public interface PanelContent extends Instrumentable {
int ICON_UNAVAILABLE = -1;
/**
* @return a icon resource for the title of the Panel.
* @return a icon for the title of the Panel.
*/
default int getIcon() {
return ICON_UNAVAILABLE;
default IconCompat getIcon() {
return null;
}
/**