Fix potential null pointer exception.
This commit is contained in:
parent
eddcf28501
commit
036ad41d39
1 changed files with 1 additions and 2 deletions
|
@ -42,7 +42,6 @@ import android.support.v4.app.Fragment;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Toast;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Ghislain MARY
|
* @author Ghislain MARY
|
||||||
|
@ -66,7 +65,7 @@ public class EchoCancellerCalibrationFragment extends Fragment implements EcCali
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEcCalibrationStatus(EcCalibratorStatus status, int delayMs) {
|
public void onEcCalibrationStatus(EcCalibratorStatus status, int delayMs) {
|
||||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(SetupActivity.instance());
|
||||||
SharedPreferences.Editor editor = prefs.edit();
|
SharedPreferences.Editor editor = prefs.edit();
|
||||||
if (status == EcCalibratorStatus.DoneNoEcho) {
|
if (status == EcCalibratorStatus.DoneNoEcho) {
|
||||||
editor.putBoolean(getString(R.string.pref_echo_cancellation_key), false);
|
editor.putBoolean(getString(R.string.pref_echo_cancellation_key), false);
|
||||||
|
|
Loading…
Reference in a new issue