Loading packages/SettingsLib/src/com/android/settingslib/media/InfoMediaDevice.java +15 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,21 @@ public class InfoMediaDevice extends MediaDevice { return true; } @Override public void requestSetVolume(int volume) { mRouterManager.requestSetVolume(mRouteInfo, volume); } @Override public int getMaxVolume() { return mRouteInfo.getVolumeMax(); } @Override public int getCurrentVolume() { return mRouteInfo.getVolume(); } @Override public void disconnect() { //TODO(b/144535188): disconnected last select device Loading packages/SettingsLib/src/com/android/settingslib/media/MediaDevice.java +53 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,59 @@ public abstract class MediaDevice implements Comparable<MediaDevice> { */ public abstract boolean isConnected(); /** * Request to set volume. * * @param volume is the new value. */ public void requestSetVolume(int volume) { } /** * Get max volume from MediaDevice. * * @return max volume. */ public int getMaxVolume() { return 100; } /** * Get current volume from MediaDevice. * * @return current volume. */ public int getCurrentVolume() { return 0; } /** * Get application package name. * * @return package name. */ public String getClientPackageName() { return null; } /** * Get application label from MediaDevice. * * @return application label. */ public String getClientAppLabel() { return null; } /** * Get application label from MediaDevice. * * @return application label. */ public int getDeviceType() { return mType; } /** * Rules: * 1. If there is one of the connected devices identified as a carkit, this carkit will Loading Loading
packages/SettingsLib/src/com/android/settingslib/media/InfoMediaDevice.java +15 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,21 @@ public class InfoMediaDevice extends MediaDevice { return true; } @Override public void requestSetVolume(int volume) { mRouterManager.requestSetVolume(mRouteInfo, volume); } @Override public int getMaxVolume() { return mRouteInfo.getVolumeMax(); } @Override public int getCurrentVolume() { return mRouteInfo.getVolume(); } @Override public void disconnect() { //TODO(b/144535188): disconnected last select device Loading
packages/SettingsLib/src/com/android/settingslib/media/MediaDevice.java +53 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,59 @@ public abstract class MediaDevice implements Comparable<MediaDevice> { */ public abstract boolean isConnected(); /** * Request to set volume. * * @param volume is the new value. */ public void requestSetVolume(int volume) { } /** * Get max volume from MediaDevice. * * @return max volume. */ public int getMaxVolume() { return 100; } /** * Get current volume from MediaDevice. * * @return current volume. */ public int getCurrentVolume() { return 0; } /** * Get application package name. * * @return package name. */ public String getClientPackageName() { return null; } /** * Get application label from MediaDevice. * * @return application label. */ public String getClientAppLabel() { return null; } /** * Get application label from MediaDevice. * * @return application label. */ public int getDeviceType() { return mType; } /** * Rules: * 1. If there is one of the connected devices identified as a carkit, this carkit will Loading