Skip to content

Commit

Permalink
Merge pull request #8 from maks/fix-program-change-ui
Browse files Browse the repository at this point in the history
Fix program change indication in UI, bump version for release
  • Loading branch information
maks authored Apr 27, 2022
2 parents e687f57 + 52007e4 commit 0de05fa
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ android {
defaultConfig {
applicationId "com.manichord.synthesizer"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
targetSdkVersion 30
versionCode 2
versionName "1.1"
}
buildTypes {
release {
Expand Down
Binary file added app/release/app-release.aab
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ public boolean onCreateOptionsMenu(Menu menu) {

@Override
public boolean onOptionsItemSelected(MenuItem item) {


switch (item.getItemId()) {
case R.id.settings:
startActivity(new Intent(this, SettingsActivity.class));
Expand Down Expand Up @@ -123,7 +121,6 @@ public void onActivityResult(int requestCode, int resultCode,
} else {
// Get the file's content URI from the incoming Intent
Uri returnUri = returnIntent.getData();

try {
InputStream patchIs =
getContentResolver().openInputStream(returnUri);
Expand Down Expand Up @@ -297,6 +294,20 @@ public void run() {
}
});
}

@Override
public void onProgramChange(final int channel, final int program) {
// Log.d(TAG, "onProgramChange: chan"+channel+" prog:"+program);
runOnUiThread(new Runnable() {
public void run() {
if (program < 32) {
presetSpinner_.setSelection(program);
} else {
Log.i(TAG, "out of range Program change:"+program);
}
}
});
}
});

// Populate patch names (note: we could update an existing list rather than
Expand Down

0 comments on commit 0de05fa

Please sign in to comment.