stable decoder
This commit is contained in:
parent
e61dc2985e
commit
fcb66ecdf2
3 changed files with 8 additions and 12 deletions
|
|
@ -101,20 +101,17 @@ public class SettingsActivity extends AppCompatSettingsThemeActivity implements
|
|||
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
|
||||
super.onSharedPreferenceChanged(sharedPreferences, key);
|
||||
if (key.equals(AudioApplication.PREFERENCE_CONTROLS)) {
|
||||
if (sharedPreferences.getBoolean(AudioApplication.PREFERENCE_CONTROLS, false)) {
|
||||
if (sharedPreferences.getBoolean(AudioApplication.PREFERENCE_CONTROLS, false))
|
||||
RecordingService.start(this);
|
||||
} else {
|
||||
RecordingService.stopService(this);
|
||||
}
|
||||
else
|
||||
RecordingService.stop(this);
|
||||
}
|
||||
if (key.equals(AudioApplication.PREFERENCE_STORAGE)) {
|
||||
if (key.equals(AudioApplication.PREFERENCE_STORAGE))
|
||||
storage.migrateLocalStorageDialog(this);
|
||||
}
|
||||
if (key.equals(AudioApplication.PREFERENCE_RATE)) {
|
||||
int sampleRate = Integer.parseInt(sharedPreferences.getString(AudioApplication.PREFERENCE_RATE, ""));
|
||||
if (sampleRate != Sound.getValidRecordRate(Sound.getInMode(this), sampleRate)) {
|
||||
if (sampleRate != Sound.getValidRecordRate(Sound.getInMode(this), sampleRate))
|
||||
Toast.Error(this, "Not supported Hz");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -102,10 +102,10 @@ public class RecordingService extends PersistentService {
|
|||
start(context);
|
||||
return;
|
||||
}
|
||||
stopService(context);
|
||||
stop(context);
|
||||
}
|
||||
|
||||
public static void stopService(Context context) {
|
||||
public static void stop(Context context) {
|
||||
stop(context, new Intent(context, RecordingService.class));
|
||||
}
|
||||
|
||||
|
|
@ -126,7 +126,6 @@ public class RecordingService extends PersistentService {
|
|||
}
|
||||
};
|
||||
optimization.create();
|
||||
|
||||
storage = new Storage(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue