Make work profile sounds section as its own entry

Also rephrase the strings by request.

Bug: 174964721
Test: manual
Change-Id: I760249cd48832f2739ab7ca33706cd11dd34a6b5
This commit is contained in:
Yanting Yang
2021-03-09 14:35:21 +08:00
parent 21cf6c04db
commit e14a3a3022
12 changed files with 991 additions and 50 deletions

View File

@@ -23,17 +23,35 @@ import com.android.settings.notification.AudioHelper;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.Resetter;
@Implements(AudioHelper.class)
public class ShadowAudioHelper {
private static boolean sIsSingleVolume = true;
private static int sManagedProfileId = UserHandle.USER_CURRENT;
@Resetter
public static void reset() {
sIsSingleVolume = true;
sManagedProfileId = UserHandle.USER_CURRENT;
}
public static void setIsSingleVolume(boolean isSingleVolume) {
sIsSingleVolume = isSingleVolume;
}
public static void setManagedProfileId(int managedProfileId) {
sManagedProfileId = managedProfileId;
}
@Implementation
protected boolean isSingleVolume() {
return true;
return sIsSingleVolume;
}
@Implementation
protected int getManagedProfileId(UserManager um) {
return UserHandle.USER_CURRENT;
return sManagedProfileId;
}
}