Better support for revoked audio permissions.

// FREEBIE
This commit is contained in:
Moxie Marlinspike 2015-10-27 15:14:54 -07:00
parent 79cb6166d5
commit 339d352d6e
2 changed files with 14 additions and 7 deletions

View file

@ -3,9 +3,6 @@ package org.thoughtcrime.redphone.audio;
import android.os.Build;
import android.util.Log;
import org.thoughtcrime.securesms.R;
import java.io.FileDescriptor;
import java.lang.reflect.Field;
import java.net.DatagramSocket;
@ -44,9 +41,9 @@ public class CallAudioManager {
public void start() throws AudioException {
try {
start(handle);
} catch (NativeAudioException e) {
} catch (NativeAudioException | NoSuchMethodError e) {
Log.w(TAG, e);
throw new AudioException("sorry_there_was_a_problem_initializing_the_audio_on_your_device");
throw new AudioException("Sorry, there was a problem initiating the audio on your device.");
}
}

View file

@ -1,11 +1,21 @@
package org.thoughtcrime.redphone.audio;
public class NativeAudioException extends Exception {
public NativeAudioException() {
super();
}
public NativeAudioException(String message) {
super(message);
public NativeAudioException(String detailMessage) {
super(detailMessage);
}
public NativeAudioException(String detailMessage, Throwable throwable) {
super(detailMessage, throwable);
}
public NativeAudioException(Throwable throwable) {
super(throwable);
}
}