fix encoding crashes
This commit is contained in:
parent
2a7e32343e
commit
c4fb7126f3
5 changed files with 5 additions and 3 deletions
|
|
@ -53,7 +53,7 @@ android {
|
|||
|
||||
dependencies {
|
||||
testImplementation 'junit:junit:4.12'
|
||||
implementation 'com.github.axet:android-audio-library:1.0.177' // implementation project(':android-audio-library')
|
||||
implementation 'com.github.axet:android-audio-library:1.0.178' // implementation project(':android-audio-library')
|
||||
implementation ('com.github.axet:wget:1.6.1') { exclude group: 'org.json', module: 'json' }
|
||||
assets('com.google.android.exoplayer:exoplayer:2.7.3') { exclude group: 'com.android.support' }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@ public class MainActivity extends AppCompatThemeActivity {
|
|||
public void close() {
|
||||
synchronized (encodings.handlers) {
|
||||
encodings.handlers.remove(this);
|
||||
removeCallbacksAndMessages(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ public class SettingsActivity extends AppCompatSettingsThemeActivity implements
|
|||
if (key.equals(AudioApplication.PREFERENCE_RATE)) {
|
||||
int sampleRate = Integer.parseInt(sharedPreferences.getString(AudioApplication.PREFERENCE_RATE, ""));
|
||||
if (sampleRate != Sound.getValidRecordRate(Sound.getInMode(this), sampleRate))
|
||||
Toast.Error(this, "Not supported Hz");
|
||||
Toast.Text(this, "Not supported Hz");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -191,6 +191,7 @@ public class EncodingService extends PersistentService {
|
|||
EncodingStorage encodings = ((AudioApplication) getApplication()).encodings;
|
||||
synchronized (encodings.handlers) {
|
||||
encodings.handlers.remove(handler);
|
||||
handler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ buildscript {
|
|||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath 'com.android.tools.build:gradle:4.1.1'
|
||||
classpath 'com.github.axet:gradle-android-dx:0.0.4'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue