Add volume controll interface in settinglib
Bug: 148756190 Test: make -j42 RunSettingsLibRoboTests Change-Id: I3bfdb5bf48d27ce17ceffc3db28bec7e12357ab1
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user