Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a3faa35
Add direct Hype Steady Chill controls to Android DJ
gitwide-cloud Dec 3, 2026
130e53c
Keep played queue entries fixed when reselecting mix energy
gitwide-cloud Dec 3, 2026
be53aab
Keep DJ transport visible with compact landscape style controls
gitwide-cloud Dec 3, 2026
ca039bc
Build section-aware energy preparation and shared mix style policy
gitwide-cloud Dec 3, 2026
4636716
Preserve explicit Android ramps and refresh waiting-deck style entries
gitwide-cloud Dec 3, 2026
6c5803e
Keep smart-cycle energy ranking and pass outgoing section context exp…
gitwide-cloud Dec 3, 2026
53a64af
Stabilize section energy and portable transition choices
gitwide-cloud Dec 3, 2026
31c4363
Preserve preparation measurements through JSON reload
gitwide-cloud Dec 3, 2026
a6f59dc
Capture Android audio diagnostics before emulator teardown
gitwide-cloud Dec 3, 2026
74a8461
Run compiled Android fixtures without late Gradle host downloads
gitwide-cloud Dec 3, 2026
a76df41
Refine section changes before beat alignment and retain audio diagnos…
gitwide-cloud Dec 3, 2026
23d1efe
Keep reconnect control outside capture and separate media notifications
gitwide-cloud Dec 3, 2026
f3b91fe
Keep empty cue notifications from clearing active playback
gitwide-cloud Dec 3, 2026
136e75a
test: expose post-delivery sender failures and record broader energy …
gitwide-cloud Dec 3, 2026
f0b3f1c
fix(android): restrict media notifications to the current playback owner
gitwide-cloud Dec 3, 2026
77cc7ad
fix(android): keep one notification controlling the active room mix
gitwide-cloud Dec 3, 2026
f634c5e
fix(android): separate initial broadcast control from live audio timing
gitwide-cloud Dec 3, 2026
749e085
fix(android): keep private cues outside platform media sessions
gitwide-cloud Dec 3, 2026
4726ef9
fix(android): keep retired deck controls from stopping the room mix
gitwide-cloud Dec 3, 2026
711c567
fix(android): decouple bounded live uploads from audio encoding
gitwide-cloud Dec 3, 2026
417f423
test(android): type notification tokens in failure diagnostics
gitwide-cloud Dec 3, 2026
ed0119b
Diagnose PCM rejection and actual notification service state
gitwide-cloud Dec 3, 2026
5672d2b
Isolate card checks from emulator Messages ANR
gitwide-cloud Dec 3, 2026
8054818
Refine default set ordering with bounded energy arc moves
gitwide-cloud Dec 3, 2026
eeebe21
Trace native notification updates and prioritize PCM feeder
gitwide-cloud Dec 3, 2026
ebf0592
Coalesce playback notifications after observed Android quota rejection
gitwide-cloud Dec 3, 2026
8573c4a
Exclude generated legacy RMS from normalized mix ranking
gitwide-cloud Dec 3, 2026
2d9e148
Prepare RC34 and analysis engine 1.0.23 identities
gitwide-cloud Dec 3, 2026
4e85183
Align normalized entry fixtures and record native qualification
gitwide-cloud Dec 3, 2026
572be4b
Use normalized profile in automatic entry regression fixture
gitwide-cloud Dec 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/android-card-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- 'android/**'
- 'crates/amp-dj-policy/**'
- 'tools/build_android_dj.py'
- 'tools/run_android_emulator_tests.py'
- 'tools/test_run_android_emulator_tests.py'
- '.github/workflows/android-card-ui.yml'
permissions:
contents: read
Expand Down Expand Up @@ -41,6 +43,7 @@ jobs:
- name: Build emulator-only debug APKs and all optional modules
run: |
test -z "$AMP_ANDROID_KEYSTORE"
python3 tools/test_run_android_emulator_tests.py
python3 tools/test_build_android_dj.py
gradle -p android :app:assembleFullDebug :app:assembleFullDebugAndroidTest :app:testFullDebugUnitTest :app:lintFullDebug :amp-dj:assembleRelease :amp-lab:assembleRelease :amp-cast:assembleRelease :amp-podcasts:assembleRelease :amp-remote:assembleRelease
python3 - <<'PY'
Expand All @@ -67,9 +70,14 @@ jobs:
adb shell input keyevent KEYCODE_WAKEUP
adb shell wm dismiss-keyguard
adb shell am force-stop com.google.android.apps.nexuslauncher
# This image's Messages carrier-config receiver also ANRs over the app
# (run 47110335905, clean-library.png and logcat). Disable only that
# unrelated package on this disposable image so later carrier broadcasts
# cannot relaunch it. Do not suppress ANRs or change app assertions.
adb shell pm disable-user --user 0 com.google.android.apps.messaging
sleep 10
set +e
gradle -p android :app:connectedFullDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=cloud.gitwide.ampverse.CardUiDeviceTest,cloud.gitwide.ampverse.CleanUiDeviceTest,cloud.gitwide.ampverse.RadioOfflineTest,cloud.gitwide.ampverse.IncrementalSyncDeviceTest,cloud.gitwide.ampverse.PhoneListeningDeviceTest,cloud.gitwide.ampverse.DjLoadPadsDeviceTest,cloud.gitwide.ampverse.AudioFeatureDeviceTest,cloud.gitwide.ampverse.CastBadgeLayoutDeviceTest,cloud.gitwide.ampverse.RemoteDiscoveryDeviceTest,cloud.gitwide.ampverse.DiscoveryDeviceTest,cloud.gitwide.ampverse.RemoteTaskCardsDeviceTest,cloud.gitwide.ampverse.LabNavigationDeviceTest,cloud.gitwide.ampverse.lab.EditingSessionTest,cloud.gitwide.ampverse.ModuleBadgesDeviceTest,cloud.gitwide.ampverse.LibrarySyncCardsDeviceTest,cloud.gitwide.ampverse.LibraryChooserDeviceTest,cloud.gitwide.ampverse.MusicBackupDeviceTest,cloud.gitwide.ampverse.LibraryStoreDeviceTest,cloud.gitwide.ampverse.CatalogDeviceTest,cloud.gitwide.ampverse.lab.UrlImportDeviceTest
python3 tools/run_android_emulator_tests.py --output test-output/android-card-ui --classes cloud.gitwide.ampverse.CardUiDeviceTest,cloud.gitwide.ampverse.CleanUiDeviceTest,cloud.gitwide.ampverse.RadioOfflineTest,cloud.gitwide.ampverse.IncrementalSyncDeviceTest,cloud.gitwide.ampverse.PhoneListeningDeviceTest,cloud.gitwide.ampverse.DjLoadPadsDeviceTest,cloud.gitwide.ampverse.AudioFeatureDeviceTest,cloud.gitwide.ampverse.CastBadgeLayoutDeviceTest,cloud.gitwide.ampverse.RemoteDiscoveryDeviceTest,cloud.gitwide.ampverse.DiscoveryDeviceTest,cloud.gitwide.ampverse.RemoteTaskCardsDeviceTest,cloud.gitwide.ampverse.LabNavigationDeviceTest,cloud.gitwide.ampverse.lab.EditingSessionTest,cloud.gitwide.ampverse.ModuleBadgesDeviceTest,cloud.gitwide.ampverse.LibrarySyncCardsDeviceTest,cloud.gitwide.ampverse.LibraryChooserDeviceTest,cloud.gitwide.ampverse.MusicBackupDeviceTest,cloud.gitwide.ampverse.LibraryStoreDeviceTest,cloud.gitwide.ampverse.CatalogDeviceTest,cloud.gitwide.ampverse.lab.UrlImportDeviceTest
result=$?
mkdir -p test-output/android-card-ui
adb logcat -d > test-output/android-card-ui/logcat.txt
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/android-owned-pcm-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- 'android/**'
- 'tools/test_android_owned_pcm.py'
- 'tools/verify_android_owned_native.py'
- 'tools/run_android_emulator_tests.py'
- 'tools/test_run_android_emulator_tests.py'
- '.github/workflows/android-owned-pcm-native.yml'
permissions:
contents: read
Expand Down Expand Up @@ -43,6 +45,7 @@ jobs:
- name: Compile all editions, modules and native fixture
run: |
test -z "$AMP_ANDROID_KEYSTORE"
python3 tools/test_run_android_emulator_tests.py
python3 tools/test_android_rc.py
gradle -p android :app:assembleLiteDebug :app:assembleFullDebug :app:assembleFullDebugAndroidTest :app:testFullDebugUnitTest :app:lintFullDebug :app:lintLiteDebug :amp-dj:assembleDebug :amp-lab:assembleDebug :amp-cast:assembleDebug :amp-podcasts:assembleDebug :amp-remote:assembleDebug
cargo build --locked -p amp-cast --bin amp-cast
Expand Down Expand Up @@ -71,12 +74,12 @@ jobs:
disk-size: 4096M
disable-animations: true
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: python3 tools/verify_android_owned_native.py --server-binary target/debug/amp-cast --output test-output/android-owned-native -- gradle -p android :app:connectedFullDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=cloud.gitwide.ampverse.OwnedMasterNativeDeviceTest,cloud.gitwide.ampverse.OwnedMixerSettingsDeviceTest,cloud.gitwide.ampverse.ExternalAudioDeviceTest -Pandroid.testInstrumentationRunnerArguments.amp_server=http://10.0.2.2:28987
script: python3 tools/verify_android_owned_native.py --server-binary target/debug/amp-cast --output test-output/android-owned-native -- python3 tools/run_android_emulator_tests.py --output test-output/android-owned-native/instrumentation --classes cloud.gitwide.ampverse.OwnedMasterNativeDeviceTest,cloud.gitwide.ampverse.OwnedMixerSettingsDeviceTest,cloud.gitwide.ampverse.ExternalAudioDeviceTest --argument amp_server=http://127.0.0.1:28987
- name: Collect emulator logs
if: always()
run: |
mkdir -p test-output/android-owned-native
timeout 10s adb logcat -d > test-output/android-owned-native/logcat.txt || true
timeout 10s adb logcat -d > test-output/android-owned-native/logcat-after-emulator.txt || true
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = ["crates/amp-plugin", "crates/amp-updater", "crates/amp-stems", "crate
resolver = "2"

[workspace.package]
version = "1.1.0-rc.33"
version = "1.1.0-rc.34"
edition = "2024"
license = "MIT"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,40 @@
@RunWith(AndroidJUnit4.class)
@androidx.annotation.OptIn(markerClass=androidx.media3.common.util.UnstableApi.class)
public class DjLoadPadsDeviceTest {
@Test public void mixStyleButtonsChangeUpcomingEnergyWithoutChangingTransport()throws Exception {
Context context=InstrumentationRegistry.getInstrumentation().getTargetContext();
Intent intent=new Intent(context,MainActivity.class).putExtra("module","AMP DJ").putExtra("phone-ui",true);
SharedPreferences details=context.getSharedPreferences("phone-track-details",0);
MediaItem current=new MediaItem.Builder().setMediaId("style-current").setUri("file:///style-current.wav").build(),low=new MediaItem.Builder().setMediaId("style-low").setUri("file:///style-low.wav").build(),high=new MediaItem.Builder().setMediaId("style-high").setUri("file:///style-high.wav").build();
details.edit().putFloat(current.mediaId+":energy",.5f).putFloat(low.mediaId+":energy",.2f).putFloat(high.mediaId+":energy",.8f).commit();
org.json.JSONObject rules=new org.json.JSONObject().put("name","Style fixture").put("style","Chill");
try(ActivityScenario<MainActivity> scenario=ActivityScenario.launch(intent)){
scenario.onActivity(a->{try{
DjEngine e=PlaybackService.dj();assertNotNull(e);e.pauseAll();assertTrue(e.queue(Arrays.asList(low,high),rules));e.decks[0].setMediaItem(current);e.setFader(.25f);
DjPanel panel=new DjPanel(a,new Appearance(a),e,new DjPanel.Host(){public void effect(int s,int p){}public void beforeMainPlay(){}public void equalizer(){}});
assertEquals(3,tags(panel,"dj-mix-style-"));assertTrue(panel.findViewWithTag("dj-mix-style-Chill").isSelected());
java.lang.reflect.Method plan=DjEngine.class.getDeclaredMethod("planAuto",int.class,int.class);plan.setAccessible(true);
assertTrue(panel.findViewWithTag("dj-mix-style-Hype").performClick());plan.invoke(e,0,1);assertEquals(high,e.autoQueue.get(0));
assertEquals("Chill",rules.getString("style"));assertEquals("Style fixture",e.playlistName());assertFalse(e.auto);assertFalse(e.active(0));assertFalse(e.active(1));assertEquals(.25f,e.fader,0f);assertEquals(current,e.decks[0].getCurrentMediaItem());
assertTrue(panel.findViewWithTag("dj-mix-style-Chill").performClick());plan.invoke(e,0,1);assertEquals(low,e.autoQueue.get(0));
assertTrue(panel.findViewWithTag("dj-mix-style-Steady").performClick());assertEquals("Steady",e.mixStyle());
// A new source must use its own rules, not the previous session override.
assertTrue(e.queue(Arrays.asList(low,high),rules));assertEquals("Chill",e.mixStyle());
assertTrue(e.queue(Arrays.asList(high,low,high),rules));java.lang.reflect.Field cursor=DjEngine.class.getDeclaredField("nextAuto");cursor.setAccessible(true);cursor.setInt(e,1);e.mixStyle("Hype");plan.invoke(e,0,1);assertEquals("Keep the played prefix when a song occurs again later",high,e.autoQueue.get(0));assertEquals(high,e.autoQueue.get(1));assertEquals(low,e.autoQueue.get(2));
org.json.JSONObject ramp=new org.json.JSONObject(rules.toString()).put("smart",true).put("energy",.2).put("energy_progression",new org.json.JSONObject().put("target",.9).put("transitions",4));
assertTrue(e.queue(Arrays.asList(low,high),ramp));e.mixStyle("Hype");plan.invoke(e,0,1);assertEquals("Keep the explicit ramp's planned order",low,e.autoQueue.get(0));
assertNotNull("Unknown outgoing energy must use the shared unknown-data policy, not make every cost NaN",DjLogic.replacement(context,null,Arrays.asList(low,high),new org.json.JSONObject().put("style","Hype"),Collections.emptyList()));
android.os.Bundle unknown=new android.os.Bundle();unknown.putString("amp-preparation",new org.json.JSONObject().put("energy",.8).put("perceptual_energy",org.json.JSONObject.NULL).toString());
MediaItem uncertain=new MediaItem.Builder().setMediaId("style-unknown-measurement").setUri("file:///unknown.wav").setMediaMetadata(new androidx.media3.common.MediaMetadata.Builder().setExtras(unknown).build()).build();
assertTrue("A missing normalized score cannot silently become legacy loudness",Double.isNaN(PhonePlaylists.knownEnergy(context,uncertain)));
android.os.Bundle metadata=new android.os.Bundle();metadata.putString("amp-preparation",new org.json.JSONObject().put("cue_out",120).put("manual_cues",new org.json.JSONArray().put(new org.json.JSONObject().put("kind","drop").put("seconds",24))).toString());
MediaItem sameSong=high.buildUpon().setMediaMetadata(new androidx.media3.common.MediaMetadata.Builder().setExtras(metadata).build()).build();
assertTrue(e.queue(Collections.singletonList(sameSong),new org.json.JSONObject().put("style","Steady")));e.load(1,sameSong,0);assertEquals(0,e.loadedEntry[1]);e.mixStyle("Hype");
java.lang.reflect.Method prepare=DjEngine.class.getDeclaredMethod("prepareAutoDeck",int.class);prepare.setAccessible(true);prepare.invoke(e,1);assertEquals("Retarget an already preloaded song to its marked drop",24000,e.loadedEntry[1]);assertFalse(e.active(1));assertEquals(.25f,e.fader,0f);assertEquals(current,e.decks[0].getCurrentMediaItem());
e.decks[0].clearMediaItems();e.decks[1].clearMediaItems();
}catch(Exception error){throw new AssertionError(error);}});
}finally{details.edit().remove(current.mediaId+":energy").remove(low.mediaId+":energy").remove(high.mediaId+":energy").commit();}
}
@Test public void explicitPlaylistStartsAutoButQueueStagingStaysManual()throws Exception {
Context context=InstrumentationRegistry.getInstrumentation().getTargetContext();
java.io.File source=OwnedMixerSettingsDeviceTest.input(context);
Expand Down Expand Up @@ -52,9 +86,11 @@ public class DjLoadPadsDeviceTest {
while(returns.get()<4&&android.os.SystemClock.elapsedRealtime()<deadline)Thread.sleep(25);
assertTrue("Initial return plus three real loop-end seeks: "+returns.get(),returns.get()>=4);
scenario.onActivity(a->{DjEngine e=PlaybackService.dj();playing[0]=e.decks[0].getPlayWhenReady()&&e.decks[0].getPlayerError()==null;e.decks[0].removeListener(loopObserver);e.holdLoop(0);assertFalse(e.sectionLoopActive(0));});
assertTrue("Loop keeps play intent and has no decoder error",playing[0]);deadline=android.os.SystemClock.elapsedRealtime()+3000;
// Releasing near the loop start can require the entire captured span
// before passing its end; a fixed three-second limit is not sufficient.
assertTrue("Loop keeps play intent and has no decoder error",playing[0]);deadline=android.os.SystemClock.elapsedRealtime()+loopSpan[0]+3000;
do{scenario.onActivity(a->position[0]=PlaybackService.dj().decks[0].getCurrentPosition());if(position[0]>loopStart[0]+loopSpan[0]+50)break;Thread.sleep(25);}while(android.os.SystemClock.elapsedRealtime()<deadline);
assertTrue("After tap playback passes the captured loop end",position[0]>loopStart[0]+loopSpan[0]+50);
assertTrue("After tap playback passes the captured loop end: at="+position[0]+" start="+loopStart[0]+" span="+loopSpan[0],position[0]>loopStart[0]+loopSpan[0]+50);
}finally{InstrumentationRegistry.getInstrumentation().runOnMainSync(()->{DjEngine e=PlaybackService.existingDj();if(e!=null){if(observerRef[0]!=null)e.decks[0].removeListener(observerRef[0]);e.cancelSectionLoop(0);e.pauseAll();e.decks[0].clearMediaItems();}});assertTrue(source.delete());}
}
@Test public void dislikeButtonSavesSmartExclusionWithoutDeletingTheSong()throws Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@ private interface Check {boolean ready()throws Exception;}
}
@Test public void castPlaylistCanBeSentOnlyToDjAndPrivateDeckAudioActuallyAdvances()throws Exception{
Context c=ApplicationProvider.getApplicationContext();
try(Fixture fixture=new Fixture();ActivityScenario<MainActivity> screen=ActivityScenario.launch(new Intent(c,MainActivity.class).putExtra("module","AMP Cast"))){
// A one-second fixture can consume/refill the entire queue during the
// three-second automatic handoff before the UI assertion observes it.
// Keep the playback long enough to observe the initial two-song queue.
try(Fixture fixture=new Fixture(30);ActivityScenario<MainActivity> screen=ActivityScenario.launch(new Intent(c,MainActivity.class).putExtra("module","AMP Cast"))){
await(()->{AtomicBoolean ready=new AtomicBoolean();screen.onActivity(a->ready.set(PlaybackService.player()!=null&&PlaybackService.dj()!=null));return ready.get();});
CastClient client=new CastClient(fixture.base(),"fixture-secret");JSONObject identity=client.connect();AtomicReference<CastLibraryView> view=new AtomicReference<>();
screen.onActivity(a->{try{PlaybackService.dj().auto(false);PlaybackService.dj().pauseAll();PlaybackService.dj().queue(Collections.emptyList());PlaybackService.player().stop();PlaybackService.player().setMediaItem(new MediaItem.Builder().setMediaId("unchanged-player-queue").setUri("file:///not-started.wav").build());java.lang.reflect.Field f=MainActivity.class.getDeclaredField("appearance");f.setAccessible(true);CastLibraryView panel=new CastLibraryView(a,(Appearance)f.get(a),new CastPanel.Listener(){public void listen(String url,String name){throw new AssertionError("Must not start station listening");}public void stopListening(){}},()->client,id->{});a.setContentView(panel);view.set(panel);panel.bind(client,identity);}catch(Exception e){throw new AssertionError(e);}});
Expand Down
Loading
Loading