修改图片
6
.idea/AndroidProjectSystem.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="AndroidProjectSystem">
|
||||
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
|
||||
</component>
|
||||
</project>
|
||||
10
.idea/deploymentTargetSelector.xml
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="deploymentTargetSelector">
|
||||
<selectionStates>
|
||||
<SelectionState runConfigName="app">
|
||||
<option name="selectionMode" value="DROPDOWN" />
|
||||
</SelectionState>
|
||||
</selectionStates>
|
||||
</component>
|
||||
</project>
|
||||
17
.idea/runConfigurations.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RunConfigurationProducerService">
|
||||
<option name="ignoredProducers">
|
||||
<set>
|
||||
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
|
||||
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
|
||||
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
|
||||
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
|
||||
</set>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.xscm.moduleutil.rtc;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* com.xscm.moduleutil.rtc
|
||||
* qx
|
||||
* 2025/11/3
|
||||
* 声网声音管理类
|
||||
*/
|
||||
public class VolumeManager {
|
||||
private static VolumeManager instance;
|
||||
private Map<String, Integer> userMusicVolumeMap = new HashMap<>();
|
||||
private Map<String, Integer> userPlayoutVolumeMap = new HashMap<>();
|
||||
private Map<String, Boolean> userPlayoutBzMap = new HashMap<>();
|
||||
private String currentUserId;
|
||||
|
||||
private VolumeManager() {}
|
||||
|
||||
public static VolumeManager getInstance() {
|
||||
if (instance == null) {
|
||||
synchronized (VolumeManager.class) {
|
||||
if (instance == null) {
|
||||
instance = new VolumeManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public void setCurrentUserId(String userId) {
|
||||
this.currentUserId = userId;
|
||||
}
|
||||
|
||||
public void saveCurrentVolumes(int musicVolume, int playoutVolume) {
|
||||
if (currentUserId != null) {
|
||||
userMusicVolumeMap.put(currentUserId, musicVolume);
|
||||
userPlayoutVolumeMap.put(currentUserId, playoutVolume);
|
||||
}
|
||||
}
|
||||
public void clearCurrentVolumes() {
|
||||
if (currentUserId != null) {
|
||||
userMusicVolumeMap.remove(currentUserId);
|
||||
userPlayoutVolumeMap.remove(currentUserId);
|
||||
}
|
||||
userPlayoutBzMap.clear();
|
||||
}
|
||||
|
||||
public void saveBz(String userId, boolean bz){
|
||||
userPlayoutBzMap.clear();
|
||||
userPlayoutBzMap.put(userId, bz);
|
||||
}
|
||||
|
||||
public boolean getBz(String userId){
|
||||
Boolean bz = userPlayoutBzMap.get(userId);
|
||||
if (bz == null) {
|
||||
bz = true; // 默认值原唱 false 伴奏
|
||||
}
|
||||
return bz;
|
||||
}
|
||||
|
||||
public int[] getUserVolumes(String userId) {
|
||||
Integer musicVolume = userMusicVolumeMap.get(userId);
|
||||
Integer playoutVolume = userPlayoutVolumeMap.get(userId);
|
||||
|
||||
if (musicVolume == null) {
|
||||
musicVolume = 100; // 默认值
|
||||
}
|
||||
if (playoutVolume == null) {
|
||||
playoutVolume = 50; // 默认值
|
||||
}
|
||||
|
||||
return new int[]{musicVolume, playoutVolume};
|
||||
}
|
||||
}
|
||||
|
||||
BIN
moduleUtil/src/main/res/mipmap-hdpi/accompany_off.webp
Normal file
|
After Width: | Height: | Size: 858 B |
BIN
moduleUtil/src/main/res/mipmap-hdpi/accompany_on.webp
Normal file
|
After Width: | Height: | Size: 822 B |
BIN
moduleUtil/src/main/res/mipmap-hdpi/icon_liang.webp
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
moduleUtil/src/main/res/mipmap-hdpi/muisc_reward.webp
Normal file
|
After Width: | Height: | Size: 738 B |
BIN
moduleUtil/src/main/res/mipmap-hdpi/muisc_switch.webp
Normal file
|
After Width: | Height: | Size: 556 B |
BIN
moduleUtil/src/main/res/mipmap-hdpi/muisc_tyt.webp
Normal file
|
After Width: | Height: | Size: 692 B |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/accompany_off.webp
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/accompany_on.webp
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/icon_liang.webp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/muisc_reward.webp
Normal file
|
After Width: | Height: | Size: 988 B |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/muisc_switch.webp
Normal file
|
After Width: | Height: | Size: 646 B |
BIN
moduleUtil/src/main/res/mipmap-xhdpi/muisc_tyt.webp
Normal file
|
After Width: | Height: | Size: 754 B |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/accompany_off.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/accompany_on.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/icon_liang.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/muisc_reward.webp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/muisc_switch.webp
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
moduleUtil/src/main/res/mipmap-xxhdpi/muisc_tyt.webp
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,26 @@
|
||||
package com.example.moduletablayout;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry;
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
public class ExampleInstrumentedTest {
|
||||
@Test
|
||||
public void useAppContext() {
|
||||
// Context of the app under test.
|
||||
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
|
||||
assertEquals("com.example.moduletablayout", appContext.getPackageName());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.example.moduletablayout;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
|
||||
*/
|
||||
public class ExampleUnitTest {
|
||||
@Test
|
||||
public void addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2);
|
||||
}
|
||||
}
|
||||