Add zero state in output switcher

-Update visibility of switcher preference in SoundSetting
-Update visibility of indicator slice in Volume Panel
-Add test case

Bug: 152357002
Test: make -j50 RunSettingsRoboTests
Change-Id: I8aa4e960b72f2c3c26ced78153c4ff620a123f40
This commit is contained in:
Tim Peng
2020-03-27 20:24:06 +08:00
committed by tim peng
parent df8b9acc69
commit 9d3092cb7f
6 changed files with 126 additions and 91 deletions

View File

@@ -129,9 +129,9 @@ public class MediaOutputIndicatorSlice implements CustomSliceable {
// Return true if
// 1. AudioMode is not in on-going call
// 2. worker is not null
// 3. Available devices are more than 1
// 3. Available devices are more than 0
return getWorker() != null
&& !com.android.settingslib.Utils.isAudioModeOngoingCall(mContext)
&& getWorker().getMediaDevices().size() > 1;
&& getWorker().getMediaDevices().size() > 0;
}
}