This commit is contained in:
Alexey Kuznetsov 2019-07-01 22:15:02 +03:00
commit 8744b75c95
3 changed files with 14 additions and 4 deletions

View file

@ -188,7 +188,6 @@ public class MainActivity extends AppCompatThemeActivity {
if (recordings.onOptionsItemSelected(this, item))
return true;
final SharedPreferences shared = PreferenceManager.getDefaultSharedPreferences(this);
switch (item.getItemId()) {
case R.id.action_settings:
startActivity(new Intent(this, SettingsActivity.class));

View file

@ -506,9 +506,8 @@ public class RecordingActivity extends AppCompatThemeActivity {
start = false;
stopRecording(getString(R.string.recording_status_pause));
}
if (a != null && a.equals(ERROR)) {
if (a != null && a.equals(ERROR))
muted = new ErrorDialog(this, intent.getStringExtra("msg")).setTitle(intent.getStringExtra("title")).show();
}
}
@Override

View file

@ -399,7 +399,7 @@ public class AudioApplication extends com.github.axet.audiolibrary.app.MainAppli
else
edit.putString(AudioApplication.PREFERENCE_ENCODING, FormatFLAC.EXT);
}
edit.putInt(PREFERENCE_VERSION, 3);
edit.putInt(PREFERENCE_VERSION, 4);
edit.commit();
break;
case 0:
@ -412,6 +412,9 @@ public class AudioApplication extends com.github.axet.audiolibrary.app.MainAppli
case 2:
version_2_to_3();
break;
case 3:
version_3_to_4();
break;
}
}
@ -468,4 +471,13 @@ public class AudioApplication extends com.github.axet.audiolibrary.app.MainAppli
edit.putInt(PREFERENCE_VERSION, 3);
edit.commit();
}
@SuppressLint("RestrictedApi")
void version_3_to_4() {
SharedPreferences shared = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor edit = shared.edit();
edit.remove(PREFERENCE_SORT);
edit.putInt(PREFERENCE_VERSION, 4);
edit.commit();
}
}